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 be13729f28ae8aa722797fc67e6aa2a644ad2b76 (commit)
from e1325900ea6cb9d911be654cc2a58f23dbd42dfe (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/be13729f28ae8aa722797fc67e6aa2a644ad2b76
commit be13729f28ae8aa722797fc67e6aa2a644ad2b76
Author: Amadeusz SÅawiÅski <[email protected]>
Date: Sun Nov 24 13:47:08 2013 +0100
move dock/icons size adjustments, to fix window placement
Functions placing windows (PlaceWindow - src/placement.c, wMaximizeWindow -
src/actions.c) need to calculate area differently than ones placing icons
(PlaceIcon - src/placement.c, wArrangeIcons - src/actions.c).
So this patch puts adjustment code in wGetUsableAreaForHead which is
used by all those functions but called with different 'bool noicons'
argument depending on if it's called in window or icon placement
function.
Reported-by: Carlos R. Mafra <[email protected]>
Signed-off-by: Amadeusz SÅawiÅski <[email protected]>
diff --git a/src/actions.c b/src/actions.c
index 4b336c9..13dffec 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -387,26 +387,6 @@ void wMaximizeWindow(WWindow *wwin, int directions)
usableArea = wGetUsableAreaForHead(scr, head, &totalArea, True);
}
- /* check if user wants dock covered */
- if (scr->dock && (!scr->dock->lowered ||
wPreferences.no_window_over_dock)) {
- int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE;
-
- if (scr->dock->on_right_side)
- usableArea.x2 -= offset;
- else
- usableArea.x1 += offset;
- }
-
- /* check if icons are on the same side as dock, and adjust if not done
already */
- if (scr->dock && wPreferences.no_window_over_icons &&
!wPreferences.no_window_over_dock && (wPreferences.icon_yard & IY_VERT)) {
- int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE;
-
- if (scr->dock->on_right_side && (wPreferences.icon_yard &
IY_RIGHT))
- usableArea.x2 -= offset;
- /* can't use IY_LEFT in if, it's 0 ... */
- if (!scr->dock->on_right_side && !(wPreferences.icon_yard &
IY_RIGHT))
- usableArea.x1 += offset;
- }
/* Only save directions, not kbd or xinerama hints */
directions &= (MAX_HORIZONTAL | MAX_VERTICAL | MAX_LEFTHALF |
MAX_RIGHTHALF | MAX_TOPHALF | MAX_BOTTOMHALF | MAX_MAXIMUS);
diff --git a/src/xinerama.c b/src/xinerama.c
index 92944b1..e1e47ee 100644
--- a/src/xinerama.c
+++ b/src/xinerama.c
@@ -26,6 +26,7 @@
#include "window.h"
#include "framewin.h"
#include "placement.h"
+#include "dock.h"
#ifdef USE_XINERAMA
# ifdef SOLARIS_XINERAMA /* sucks */
@@ -303,6 +304,29 @@ WArea wGetUsableAreaForHead(WScreen * scr, int head, WArea
* totalAreaPtr, Bool
} else
usableArea = totalArea;
+ if (noicons) {
+ /* check if user wants dock covered */
+ if (scr->dock && (!scr->dock->lowered ||
wPreferences.no_window_over_dock)) {
+ int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE;
+
+ if (scr->dock->on_right_side)
+ usableArea.x2 -= offset;
+ else
+ usableArea.x1 += offset;
+ }
+
+ /* check if icons are on the same side as dock, and adjust if
not done already */
+ if (scr->dock && wPreferences.no_window_over_icons &&
!wPreferences.no_window_over_dock && (wPreferences.icon_yard & IY_VERT)) {
+ int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE;
+
+ if (scr->dock->on_right_side && (wPreferences.icon_yard
& IY_RIGHT))
+ usableArea.x2 -= offset;
+ /* can't use IY_LEFT in if, it's 0 ... */
+ if (!scr->dock->on_right_side &&
!(wPreferences.icon_yard & IY_RIGHT))
+ usableArea.x1 += offset;
+ }
+ }
+
return usableArea;
}
-----------------------------------------------------------------------
Summary of changes:
src/actions.c | 20 --------------------
src/xinerama.c | 24 ++++++++++++++++++++++++
2 files changed, 24 insertions(+), 20 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].