Re: [PATCH 2/2] NEWS: Add note about dragging maximized windows.
On 09/24/2014 11:16 PM, Yury Tarasievich wrote: > I'd change the wording to "in desktop environments like GNOME, > Cinnamon, and Unity". Sounds good. Revised patch sent.
[PATCH v2] NEWS: Add note about dragging maximized windows.
--- NEWS | 28 1 file changed, 28 insertions(+) diff --git a/NEWS b/NEWS index ce8b86e..f83ae0b 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,34 @@ dragging windows" is selected under "Workspace Preferences" in WPrefs.app, or if "DontLinkWorkspaces = NO" in ~/GNUstep/Defaults/WindowMaker, as this feature also involves dragging a window to one side of the screen. +Dragging maximized windows +-- +You can now control the behavior when a maximized window is dragged by setting +the "DragMaximizedWindow" option in ~/GNUstep/Defaults/WindowMaker or by +selecting an option from the "When dragging a maximized window..." pop-up button +under "Window Handling Preferences" in WPrefs.app. + +There are four choices: +* "Move" ("...change position (normal behavior)" in WPrefs.app) is the default + and traditional behavior. A maximized window is moved when dragged and + remains maximized, i.e., it keeps its maximized geometry and can later be + unmaximized. +* "RestoreGeometry" ("...restore unmaximized geometry") is the behavior standard + in desktop environments like GNOME, Cinnamon, and Unity. A maximized window + is moved when dragged and is completely unmaximized, i.e., its unmaximized + geometry is restored. +* "Unmaximize" ("...consider the window unmaximized") causes a maximized window + to be moved when dragged and remains partially maximized, i.e., it keeps its + maximized geometry, but is consider to be unmaximized. In particular, it can + be immediately re-maximized. +* "NoMove" ("...do not move the window") prevents a maximized window from being + moved when dragged. + +Note that, to accomodate this option in the "Window Handling Preferences" tab in +WPrefs.app, the option to "Open dialogs in the same workspace as their owners" +(which sets the "OpenTransientOnOwnerWorkspace" option from +~/GNUstep/Defaults/WindowMaker) has been moved to "Expert User Preferences". + --- 0.95.6 More image format supported -- 1.9.1 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
Re: [PATCH 2/2] NEWS: Add note about dragging maximized windows.
On 09/25/2014 06:30 AM, Doug Torrance wrote: ... + in many modern desktop enviroments, e.g., GNOME, Cinnamon, and Unity. A I'd change the wording to "in desktop environments like GNOME, Cinnamon, and Unity". Yury -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
[PATCH 1/2] WPrefs.app: Add ability to set behavior when dragging a maximized window.
You can now set the behavior when dragging a maximized window, i.e., the "DragMaximizedWindow" option from ~/GNUstep/Defaults/WindowMaker, from the "Window Handling" tab of WPrefs.app. Note that to make room for the pop-up button required to set this option, the switch button to set the "OpenTransientOnOwnerWorkspace" option has been moved to the "Expert User Preferences" tab and the "Edge Resistance" frame has been made slightly smaller. --- WPrefs.app/Expert.c | 4 +-- WPrefs.app/WindowHandling.c | 72 - 2 files changed, 54 insertions(+), 22 deletions(-) diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c index 888ccaa..2f6cb7f 100644 --- a/WPrefs.app/Expert.c +++ b/WPrefs.app/Expert.c @@ -84,8 +84,8 @@ static const struct { { N_("Enable window snapping."), /* default: */ False, OPTION_WMAKER, "WindowSnapping" }, - { N_("Return maximized windows to original geometry when moved."), - /* default: */ False, OPTION_WMAKER, "UnmaximizeOnMove" } + { N_("Open dialogs in the same workspace as their owners."), + /* default: */ False, OPTION_WMAKER, "OpenTransientOnOwnerWorkspace" } }; diff --git a/WPrefs.app/WindowHandling.c b/WPrefs.app/WindowHandling.c index 0976b17..4a8f1bc 100644 --- a/WPrefs.app/WindowHandling.c +++ b/WPrefs.app/WindowHandling.c @@ -61,8 +61,8 @@ typedef struct _Panel { WMButton *opaqresizeB; WMButton *opaqkeybB; - WMFrame *tranF; - WMButton *tranB; + WMFrame *dragmaxF; + WMPopUpButton *dragmaxP; } _Panel; #define ICON_FILE "whandling" @@ -77,7 +77,7 @@ typedef struct _Panel { #define THUMB_SIZE 16 -static const char *placements[] = { +static const char *const placements[] = { "auto", "random", "manual", @@ -86,6 +86,13 @@ static const char *placements[] = { "center" }; +static const char *const dragMaximizedWindowOptions[] = { + "Move", + "RestoreGeometry", + "Unmaximize", + "NoMove" +}; + static void sliderCallback(WMWidget * w, void *data) { _Panel *panel = (_Panel *) data; @@ -168,6 +175,25 @@ static int getPlacement(const char *str) return 0; } +static int getDragMaximizedWindow(const char *str) +{ + if (!str) + return 0; + + if (strcasecmp(str, "Move") == 0) + return 0; + else if (strcasecmp(str, "RestoreGeometry") == 0) + return 1; + else if (strcasecmp(str, "Unmaximize") == 0) + return 2; + else if (strcasecmp(str, "NoMove") == 0) + return 3; + else + wwarning(_("bad option value %s in WindowPlacement. Using default value"), str); + return 0; +} + + static void showData(_Panel * panel) { char *str; @@ -200,12 +226,13 @@ static void showData(_Panel * panel) WMSetSliderValue(panel->resS, x); resistanceCallback(NULL, panel); + str = GetStringForKey("DragMaximizedWindow"); + WMSetPopUpButtonSelectedItem(panel->dragmaxP, getDragMaximizedWindow(str)); + x = GetIntegerForKey("ResizeIncrement"); WMSetSliderValue(panel->resizeS, x); resizeCallback(NULL, panel); - WMSetButtonSelected(panel->tranB, GetBoolForKey("OpenTransientOnOwnerWorkspace")); - WMSetButtonSelected(panel->opaqB, GetBoolForKey("OpaqueMove")); WMSetButtonSelected(panel->opaqresizeB, GetBoolForKey("OpaqueResize")); WMSetButtonSelected(panel->opaqkeybB, GetBoolForKey("OpaqueMoveResizeKeyboard")); @@ -232,8 +259,6 @@ static void storeData(_Panel * panel) SetBoolForKey(WMGetButtonSelected(panel->opaqresizeB), "OpaqueResize"); SetBoolForKey(WMGetButtonSelected(panel->opaqkeybB), "OpaqueMoveResizeKeyboard"); - SetBoolForKey(WMGetButtonSelected(panel->tranB), "OpenTransientOnOwnerWorkspace"); - SetStringForKey(placements[WMGetPopUpButtonSelectedItem(panel->placP)], "WindowPlacement"); sprintf(buf, "%i", WMGetSliderValue(panel->hsli)); x = WMCreatePLString(buf); @@ -246,6 +271,9 @@ static void storeData(_Panel * panel) SetIntegerForKey(WMGetSliderValue(panel->resS), "EdgeResistance"); + SetStringForKey(dragMaximizedWindowOptions[WMGetPopUpButtonSelectedItem(panel->dragmaxP)], + "DragMaximizedWindow"); + SetIntegerForKey(WMGetSliderValue(panel->resizeS), "ResizeIncrement"); SetBoolForKey(WMGetButtonSelected(panel->resrB), "Attraction"); @@ -463,7 +491,7 @@ static void createPanel(Panel * p) / Edge Resistance / panel->resF = WMCreateFrame(panel->box); - WMResizeWidget(panel->resF, 289, 50); + WMResizeWidget(panel->resF, 289, 47); WMMoveWidget(panel->resF, 8, 125); WMSetFrameTitle(panel->resF, _("Edge Resistance")); @@ -474,7 +502,7 @@ static void createPanel(Panel * p) panel->re
[PATCH 2/2] NEWS: Add note about dragging maximized windows.
--- NEWS | 28 1 file changed, 28 insertions(+) diff --git a/NEWS b/NEWS index ce8b86e..c48b836 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,34 @@ dragging windows" is selected under "Workspace Preferences" in WPrefs.app, or if "DontLinkWorkspaces = NO" in ~/GNUstep/Defaults/WindowMaker, as this feature also involves dragging a window to one side of the screen. +Dragging maximized windows +-- +You can now control the behavior when a maximized window is dragged by setting +the "DragMaximizedWindow" option in ~/GNUstep/Defaults/WindowMaker or by +selecting an option from the "When dragging a maximized window..." pop-up button +under "Window Handling Preferences" in WPrefs.app. + +There are four choices: +* "Move" ("...change position (normal behavior)" in WPrefs.app) is the default + and traditional behavior. A maximized window is moved when dragged and + remains maximized, i.e., it keeps its maximized geometry and can later be + unmaximized. +* "RestoreGeometry" ("...restore unmaximized geometry") is the behavior standard + in many modern desktop enviroments, e.g., GNOME, Cinnamon, and Unity. A + maximized window is moved when dragged and is completely unmaximized, i.e., + its unmaximized geometry is restored. +* "Unmaximize" ("...consider the window unmaximized") causes a maximized window + to be moved when dragged and remains partially maximized, i.e., it keeps its + maximized geometry, but is consider to be unmaximized. In particular, it can + be immediately re-maximized. +* "NoMove" ("...do not move the window") prevents a maximized window from being + moved when dragged. + +Note that, to accomodate this option in the "Window Handling Preferences" tab in +WPrefs.app, the option to "Open dialogs in the same workspace as their owners" +(which sets the "OpenTransientOnOwnerWorkspace" from +~/GNUstep/Defaults/WindowMaker) has been moved to "Expert User Preferences". + --- 0.95.6 More image format supported -- 1.9.1 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.
[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.95.6-25-g451cc641
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project wmaker-crm.git. The branch, next has been updated via 451cc64132837a324accf1f1304a6aac70615ada (commit) from 59537ec4cd4d7ba5060b5b2f6dad8e8f92f4c002 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://repo.or.cz/w/wmaker-crm.git/commit/451cc64132837a324accf1f1304a6aac70615ada commit 451cc64132837a324accf1f1304a6aac70615ada Author: Doug Torrance Date: Tue Sep 23 18:44:07 2014 -0500 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. diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 30eca95a..b3ec6564 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -233,6 +233,13 @@ typedef enum { #defineWB_TOPBOTTOM2 #defineWB_ALLDIRS (WB_LEFTRIGHT|WB_TOPBOTTOM) +/* drag maximized window behaviors */ +enum { + DRAGMAX_MOVE, + DRAGMAX_RESTORE, + DRAGMAX_UNMAXIMIZE, + DRAGMAX_NOMOVE +}; /* program states */ typedef enum { @@ -353,7 +360,7 @@ extern struct WPreferences { char no_animations; /* enable/disable animations */ char no_autowrap; /* wrap workspace when window is moved to the edge */ char window_snapping; /* enable window snapping */ -char unmaximize_on_move; /* unmaximize a maximized window when it is moved */ +char drag_maximized_window;/* behavior when a maximized window is dragged */ char highlight_active_app; /* show the focused app by highlighting its icon */ char auto_arrange_icons; /* automagically arrange icons */ diff --git a/src/actions.c b/src/actions.c index b8e4fc4e..21082cfe 100644 --- a/src/actions.c +++ b/src/actions.c @@ -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); diff --git a/src/defaults.c b/src/defaults.c index 8dadc212..6ca7f3f7 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -309,6 +309,14 @@ static WOptionEnumeration seWorkspaceBorder[] = { {NULL, 0, 0} }; +static WOptionEnumeration seDragMaximizedWindow[] = { + {"Move", DRAGMAX_MOVE, 0}, + {"RestoreGeometry", DRAGMAX_RESTORE, 0}, + {"Unmaximize", DRAGMAX_UNMAXIMIZE, 0}, + {"NoMove", DRAGMAX_NOMOVE, 0}, + {NULL, 0, 0} +}; + /* * ALL entries in the tables bellow, NEED to have a default value * defined, and this value needs to be correct. @@ -452,8 +460,8 @@ WDefaultEntry optionList[] = { &wPreferences.no_autowrap, getBool, NULL, NULL, NULL}, {"WindowSnapping", "NO", NULL, &wPreferences.window_snapping, getBool, NULL, NULL, NULL}, - {"UnmaximizeOnMove", "NO", NULL, - &wPreferences.unmaximize_on_move, getBool, NULL, NULL, NULL}, + {"DragMaximizedWindow", "Move", seDragMaximizedWindow, + &wPreferences.drag_maximized_window, getEnum, NULL, NULL, NULL}, {"HighlightActiveApp", "YES", NULL, &wPreferences.highlight_active_app, getBool, NULL, NULL, NULL}, {"AutoArrangeIcons", "NO", NULL, diff --git a/src/moveres.c b/src/moveres.c index 34de9b35..c77a1058 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -1724,7 +1724,7 @@ int wMouseMoveWindow(WWindow * wwin, XEvent * ev) || abs(ev->xmotion.y_root - event.xmotion.y_root) >= MOVE_THRESHOLD) { if (wwin->flags.maximized) { - if (wPreferences.unmaximize_on_move) { + if (wPreferences.drag_maximized