mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +01:00
wmaker: Add new options for dragging maximized windows.
You can now configure the behavior when dragging a maximized window by setting DragMaximizedWindow in ~/GNUstep/Defaults/WindowMaker. The options are: - Move: Move the window and retain its maximized status and geometry (the current behavior and the default). - RestoreGeometry: Move the window and unmaximize it, restoring its original geometry. - Unmaximize: Move the window and unmaximize it, retaining its maximized geometry. - NoMove: Don't move the window. Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
81e2b42746
commit
9937566ec4
@@ -364,6 +364,9 @@ void wMaximizeWindow(WWindow *wwin, int directions)
|
||||
if (!HAS_BORDER(wwin))
|
||||
has_border = 0;
|
||||
|
||||
if (wPreferences.drag_maximized_window == DRAGMAX_NOMOVE)
|
||||
wwin->client_flags.no_movable = 1;
|
||||
|
||||
/* the size to adjust the geometry */
|
||||
adj_size = scr->frame_border_width * 2 * has_border;
|
||||
|
||||
@@ -681,6 +684,9 @@ void wUnmaximizeWindow(WWindow *wwin)
|
||||
wUnshadeWindow(wwin);
|
||||
}
|
||||
|
||||
if (wPreferences.drag_maximized_window == DRAGMAX_NOMOVE)
|
||||
wwin->client_flags.no_movable = 0;
|
||||
|
||||
/* Use old coordinates if they are set, current values otherwise */
|
||||
remember_geometry(wwin, &x, &y, &w, &h);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user