-
Notifications
You must be signed in to change notification settings - Fork 84
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
base: master
Are you sure you want to change the base?
Conversation
No interest? |
I asked for this feature from a while now, but apparently this is not their priority. I think i will try your commit... |
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
As discussed here.
PS. I'm not an expert at C so I hope this doesn't break anything or produce memleaks. :)