[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.95.7-63-g160f879cce42

crmafra <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
This is an automated email generated because a ref change occurred in the
git repository for project wmaker-crm.git.

The branch, next has been updated
       via  160f879cce42cfefa8afcaadbf401d1127a795ef (commit)
      from  28da4c98e38db6ac783e2b95ae96ec1928653672 (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 -----------------------------------------------------------------
commit 160f879cce42cfefa8afcaadbf401d1127a795ef
Author: gryf <[email protected]>
Date:   Mon, 13 Feb 2017 20:31:11 +0100
URL:    <http://repo.or.cz/wmaker-crm.git/160f879cce42cfef>

    Fixed wrong (re)stored dimensions for unmaximized window.
    
---
 NEWS                | 24 ++++++++++++------------
 WPrefs.app/Expert.c |  2 +-
 src/actions.c       | 26 +++++++++++++++-----------
 3 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/NEWS b/NEWS
index b407b7868440..cdb41d595a5a 100644
--- a/NEWS
+++ b/NEWS
@@ -4,17 +4,6 @@ NEWS for veteran Window Maker users
 -- 0.95.8
 
 
-Snapping a window to the top
-----------------------------
-
-You can now choose whether snapping a window to the top edge of the screen
-maximizes it to the top half (the previous and default behavior) or to the
-full screen by setting "SnapToTopMaximizesFullscreen" to "NO" or "YES",
-respectively.  This setting can also be changed by unchecking or checking
-"Snapping a window to the top maximizes it to the full screen" in the
-"Expert User Preferences" tab in WPrefs.app.
-
-
 Move half-maximized windows between the screens
 -----------------------------------------------
 
@@ -97,10 +86,21 @@ on the layout of displays.
 Note, that only windows that are half-maximized vertically or horizontally can
 be moved to another screen due to the fact, that direction of movement of
 quarter-maximized windows is ambiguous. As for vertical/horizontal-maximize,
-since doesn't move the window but only strech it vertically/horizontally this
+since doesn't move the window but only stretch it vertically/horizontally this
 feature also doesn't apply.
 
 
+Snapping a window to the top
+----------------------------
+
+You can now choose whether snapping a window to the top edge of the screen
+maximizes it to the top half (the previous and default behavior) or to the
+full screen by setting "SnapToTopMaximizesFullscreen" to "NO" or "YES",
+respectively.  This setting can also be changed by unchecking or checking
+"Snapping a window to the top maximizes it to the full screen" in the
+"Expert User Preferences" tab in WPrefs.app.
+
+
 -- 0.95.7
 
 Window snapping
diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c
index e4c922ae5625..aae55ed4e8ea 100644
--- a/WPrefs.app/Expert.c
+++ b/WPrefs.app/Expert.c
@@ -100,7 +100,7 @@ static const struct {
 	{ N_("Snapping a window to the top maximizes it to the full screen."),
 	  /* default: */ False, OPTION_WMAKER, "SnapToTopMaximizesFullscreen" },
 
-	{ N_("Allow move half-maximized windows betweem multiple screens."),
+	{ N_("Allow move half-maximized windows between multiple screens."),
 	  /* default: */ False, OPTION_WMAKER, "MoveHalfMaximizedWindowsBetweenScreens" },
 
 	{ N_("Open dialogs in the same workspace as their owners."),
diff --git a/src/actions.c b/src/actions.c
index 4a96ce31ef6d..a1099a42dea1 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -393,6 +393,9 @@ void wMaximizeWindow(WWindow *wwin, int directions, int head)
 	totalArea.y2 = scr->scr_height;
 	totalArea.x1 = 0;
 	totalArea.y1 = 0;
+	/* ignore provided head information for toggling full maximize/unmaximize */
+	if (directions & MAX_KEYBOARD)
+		head = wGetHeadForWindow(wwin);
 	usableArea = wGetUsableAreaForHead(scr, head, &totalArea, True);
 
 	/* Only save directions, not kbd or xinerama hints */
@@ -490,6 +493,7 @@ void handleMaximize(WWindow *wwin, int directions)
 	int effective = requested ^ current;
 	int flags = directions & ~requested;
 	int head = wGetHeadForWindow(wwin);
+	int dest_head = -1;
 
 	if (!effective) {
 		/* allow wMaximizeWindow to restore the Maximusized size */
@@ -503,43 +507,43 @@ void handleMaximize(WWindow *wwin, int directions)
 			 * clear on which direction user intend to move such window. */
 			if ((current & MAX_VERTICAL) || (current & MAX_HORIZONTAL)) {
 				if (requested & MAX_LEFTHALF && current & MAX_LEFTHALF) {
-					head = wGetHeadRelativeToCurrentHead(wwin->screen_ptr,
+					dest_head = wGetHeadRelativeToCurrentHead(wwin->screen_ptr,
 							head, DIRECTION_LEFT);
-					if (head != -1) {
+					if (dest_head != -1) {
 						effective |= MAX_RIGHTHALF;
 						effective |= MAX_VERTICAL;
 						effective &= ~(MAX_HORIZONTAL | MAX_LEFTHALF);
 					}
 				} else if (requested & MAX_RIGHTHALF &&
 						current & MAX_RIGHTHALF) {
-					head = wGetHeadRelativeToCurrentHead(wwin->screen_ptr,
+					dest_head = wGetHeadRelativeToCurrentHead(wwin->screen_ptr,
 							head, DIRECTION_RIGHT);
-					if (head != -1) {
+					if (dest_head != -1) {
 						effective |= MAX_LEFTHALF;
 						effective |= MAX_VERTICAL;
 						effective &= ~(MAX_HORIZONTAL | MAX_RIGHTHALF);
 					}
 				} else if (requested & MAX_TOPHALF && current & MAX_TOPHALF) {
-					head = wGetHeadRelativeToCurrentHead(wwin->screen_ptr,
+					dest_head = wGetHeadRelativeToCurrentHead(wwin->screen_ptr,
 							head, DIRECTION_UP);
-					if (head != -1) {
+					if (dest_head != -1) {
 						effective |= MAX_BOTTOMHALF;
 						effective |= MAX_HORIZONTAL;
 						effective &= ~(MAX_VERTICAL | MAX_TOPHALF);
 					}
-				} else if (requested & MAX_BOTTOMHALF && 
+				} else if (requested & MAX_BOTTOMHALF &&
 						current & MAX_BOTTOMHALF) {
-					head = wGetHeadRelativeToCurrentHead(wwin->screen_ptr,
+					dest_head = wGetHeadRelativeToCurrentHead(wwin->screen_ptr,
 							head, DIRECTION_DOWN);
-					if (head != -1) {
+					if (dest_head != -1) {
 						effective |= MAX_TOPHALF;
 						effective |= MAX_HORIZONTAL;
 						effective &= ~(MAX_VERTICAL | MAX_BOTTOMHALF);
 					}
-				} if (head == -1)
+				} if (dest_head == -1)
 					wUnmaximizeWindow(wwin);
 				else
-					wMaximizeWindow(wwin, effective | flags, head);
+					wMaximizeWindow(wwin, effective | flags, dest_head);
 			} else
 				wUnmaximizeWindow(wwin);
 		} else

-----------------------------------------------------------------------

Summary of changes:
 NEWS                | 24 ++++++++++++------------
 WPrefs.app/Expert.c |  2 +-
 src/actions.c       | 26 +++++++++++++++-----------
 3 files changed, 28 insertions(+), 24 deletions(-)


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.