summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan.olivier@wanadoo.fr>2009-04-05 17:00:43 +0000
committerOlivier Fourdan <fourdan.olivier@wanadoo.fr>2009-04-05 17:00:43 +0000
commitbad5e1cda6ecf8698398fcc230b05e4e40337026 (patch)
tree4dd92a4abebf65aa15d700365dfa445a3248c2c7
parentbf34252a7548f8370f3fee2e00282b2c753440e3 (diff)
downloadxfwm4-bad5e1cda6ecf8698398fcc230b05e4e40337026.tar.gz
* src/compositor.c: Check fullscreen status against each monitor and not
just the overall screen size in the compositor (Old svn revision: 29704)
-rw-r--r--ChangeLog5
-rw-r--r--NEWS2
-rw-r--r--src/compositor.c38
3 files changed, 37 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index c5623a727..6401c53a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-05 olivier
+
+ * src/compositor.c: Check fullscreen status against each monitor and not
+ just the overall screen size in the compositor
+
2009-03-28 olivier
* src/netwm.c: Keep window layer when status is above, below or
diff --git a/NEWS b/NEWS
index 4e8599960..5456292c8 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@
- Do not go over adjacent windows with fill (Bug #5152)
- Do not actually change window layer when status is above, below or fullscreen
(Bug #5030)
+- Check fullscreen status against each monitor and not just the overall screen
+ size in the compositor.
4.6.0
=====
diff --git a/src/compositor.c b/src/compositor.c
index 4c30916fa..b352ee7cb 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -73,10 +73,6 @@
#define WIN_IS_ARGB(cw) (cw->argb)
#define WIN_IS_OPAQUE(cw) ((cw->opacity == NET_WM_OPAQUE) && !WIN_IS_ARGB(cw))
#define WIN_IS_NATIVE_OPAQUE(cw) ((cw->native_opacity) && !WIN_IS_ARGB(cw))
-#define WIN_IS_FULLSCREEN(cw) ((cw->attr.x <= 0) && \
- (cw->attr.y <= 0) && \
- (cw->attr.width + 2 * cw->attr.border_width >= cw->screen_info->width) && \
- (cw->attr.height + 2 * cw->attr.border_width >= cw->screen_info->height))
#define WIN_IS_SHAPED(cw) ((WIN_HAS_CLIENT(cw) && FLAG_TEST (cw->c->flags, CLIENT_FLAG_HAS_SHAPE)) || \
(WIN_IS_OVERRIDE(cw) && (cw->shaped)))
#define WIN_IS_VIEWABLE(cw) (cw->viewable)
@@ -188,6 +184,32 @@ is_shaped (DisplayInfo *display_info, Window id)
return FALSE;
}
+static gboolean
+is_fullscreen (CWindow *cw)
+{
+ GdkRectangle rect;
+
+ /* First, check the good old way, the window is larger than the screen size */
+ if ((cw->attr.x <= 0) &&
+ (cw->attr.y <= 0) &&
+ (cw->attr.width + 2 * cw->attr.border_width >= cw->screen_info->width) &&
+ (cw->attr.height + 2 * cw->attr.border_width >= cw->screen_info->height))
+ {
+ return TRUE;
+ }
+
+ /* Next check against the monitors which compose the entire screen */
+ myScreenFindMonitorAtPoint (cw->screen_info,
+ cw->attr.x + (cw->attr.width + 2 * cw->attr.border_width) / 2,
+ cw->attr.y + (cw->attr.height + 2 * cw->attr.border_width) / 2,
+ &rect);
+
+ return ((cw->attr.x == rect.x) &&
+ (cw->attr.y == rect.y) &&
+ (cw->attr.width + 2 * cw->attr.border_width == rect.width) &&
+ (cw->attr.height + 2 * cw->attr.border_width == rect.height));
+}
+
static gdouble
gaussian (gdouble r, gdouble x, gdouble y)
{
@@ -928,8 +950,8 @@ win_extents (CWindow *cw)
if ((screen_info->params->show_popup_shadow &&
WIN_IS_OVERRIDE(cw) &&
- !WIN_IS_FULLSCREEN(cw) &&
- !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) ||
+ !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw)) &&
+ !is_fullscreen(cw)) ||
(screen_info->params->show_frame_shadow &&
!WIN_IS_OVERRIDE(cw) &&
!WIN_NO_SHADOW(cw) &&
@@ -1745,7 +1767,7 @@ map_win (CWindow *cw)
if (!WIN_IS_REDIRECTED(cw))
{
- cw->fulloverlay = WIN_IS_FULLSCREEN(cw);
+ cw->fulloverlay = is_fullscreen(cw);
if (cw->fulloverlay)
{
/*
@@ -1778,7 +1800,7 @@ map_win (CWindow *cw)
}
/* Check for new windows to un-redirect. */
- if ((WIN_IS_FULLSCREEN(cw) || (screen_info->wins_unredirected > 0)) && WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
+ if (((screen_info->wins_unredirected > 0) || is_fullscreen(cw)) && WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
WIN_IS_NATIVE_OPAQUE(cw) && WIN_IS_REDIRECTED(cw) && !WIN_IS_SHAPED(cw))
{
CWindow *top;