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:
David Maciejak authored and Carlos R. Mafra committed 2023-03-12 09:44:10 +00:00
1 parent 43edd37ee2
commit 4c52232ee7
1 file changed
+6 -5
+6 -5
View File
@@ -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;