Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt+RightClick: Resize appropiate corner depending on cursor position in window #492

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomas
Copy link

@tomas tomas commented Aug 18, 2019

Peek 2019-08-18 02-35

As discussed here.

PS. I'm not an expert at C so I hope this doesn't break anything or produce memleaks. :)

@tomas
Copy link
Author

tomas commented Sep 17, 2019

No interest?

@Obarun
Copy link

Obarun commented Sep 17, 2019

I asked for this feature from a while now, but apparently this is not their priority. I think i will try your commit...

@legkamran
Copy link

its really amazing!

@@ -371,7 +382,7 @@ void ResizeClientKeyboard(ClientNode *np, MouseContextType context)
DiscardMotionEvents(&event, np->window);

UpdateSize(np, context, event.xmotion.x, event.xmotion.y,
startx, starty, oldx, oldy, oldw, oldh);
startx, starty, oldx, oldy, oldw, oldh, 0);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that either UpdateSize needs to check for the case that prevContext is NULL or this should pass a valid pointer into UpdateSize?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean passing something else instead of 0?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 turns into a null pointer dereference in UpdateSize, which leads to a seg fault for me when I select resize from the window menu. I think passing &context might give the desired effect.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. As I said, I'm definitely not an expert at C so feel free to modify the code as you see fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants