mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
Window titlebar double click to unmaximize
Commit 6e2075f3df from 2020 added
a feature to maximize window when double clicking on the titlebar.
But unmaximizing is not supported so when double clicking again
on the window titlebar the window geometry was not reverted back.
This commit is contained in:
committed by
Carlos R. Mafra
parent
43edd37ee2
commit
4c52232ee7
11
src/window.c
11
src/window.c
@@ -2913,17 +2913,18 @@ static void titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
if (wPreferences.double_click_fullscreen){
|
||||
if (wPreferences.double_click_fullscreen) {
|
||||
int dir = 0;
|
||||
|
||||
if (event->xbutton.state == 0) {
|
||||
/* maximize window full screen*/
|
||||
dir |= (MAX_VERTICAL|MAX_HORIZONTAL);
|
||||
int ndir = dir ^ wwin->flags.maximized;
|
||||
if (ndir != 0)
|
||||
wMaximizeWindow(wwin, ndir, wGetHeadForWindow(wwin));
|
||||
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
wUnmaximizeWindow(wwin);
|
||||
}
|
||||
} else {
|
||||
int dir = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user