summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2009-01-11 14:19:12 +0100
committerDanny Baumann <dannybaumann@web.de>2009-01-11 14:19:12 +0100
commitc46bccb6392fec054e33084413d09e63a041eee3 (patch)
tree6d2a48a6812e3c77a1da1a5f5d1fd08daf6eca16
parent43f781b9770e15a695c40cdf9d9b94e72e81946a (diff)
parentec264594b16f599deaeb11f1d062034f1b9af07b (diff)
Merge branch 'master' of git+ssh://maniac@git.freedesktop.org/git/xorg/app/compiz
-rw-r--r--plugins/decoration.c3
-rw-r--r--src/window.c35
2 files changed, 21 insertions, 17 deletions
diff --git a/plugins/decoration.c b/plugins/decoration.c
index 3ce3615e..e42a83a5 100644
--- a/plugins/decoration.c
+++ b/plugins/decoration.c
@@ -748,6 +748,9 @@ decorWindowUpdate (CompWindow *w,
break;
}
+ if (w->wmType & (CompWindowTypeDockMask | CompWindowTypeDesktopMask))
+ decorate = FALSE;
+
if (w->attrib.override_redirect)
decorate = FALSE;
diff --git a/src/window.c b/src/window.c
index 04a816d5..d0b8d5e3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1426,6 +1426,7 @@ bindWindow (CompWindow *w)
if (!w->pixmap)
{
XWindowAttributes attr;
+ Display *dpy = w->screen->display->display;
/* don't try to bind window again if it failed previously */
if (w->bindFailed)
@@ -1433,20 +1434,20 @@ bindWindow (CompWindow *w)
/* We have to grab the server here to make sure that window
is mapped when getting the window pixmap */
- XGrabServer (w->screen->display->display);
- XGetWindowAttributes (w->screen->display->display, w->id, &attr);
- if (attr.map_state != IsViewable)
+ XGrabServer (dpy);
+
+ if (!XGetWindowAttributes (dpy, w->id, &attr) ||
+ attr.map_state != IsViewable)
{
- XUngrabServer (w->screen->display->display);
+ XUngrabServer (dpy);
finiTexture (w->screen, w->texture);
w->bindFailed = TRUE;
return FALSE;
}
- w->pixmap = XCompositeNameWindowPixmap (w->screen->display->display,
- w->id);
+ w->pixmap = XCompositeNameWindowPixmap (dpy, w->id);
- XUngrabServer (w->screen->display->display);
+ XUngrabServer (dpy);
}
if (!bindPixmapToTexture (w->screen, w->texture, w->pixmap,
@@ -3931,6 +3932,16 @@ moveResizeWindow (CompWindow *w,
if (!(xwcm & CWHeight))
xwc->height = w->serverHeight;
+ /* when horizontally maximized only allow width changes added by
+ addWindowSizeChanges or constrainNewWindowState */
+ if (w->state & CompWindowStateMaximizedHorzMask)
+ xwcm &= ~CWWidth;
+
+ /* when vertically maximized only allow height changes added by
+ addWindowSizeChanges or constrainNewWindowState */
+ if (w->state & CompWindowStateMaximizedVertMask)
+ xwcm &= ~CWHeight;
+
if (xwcm & (CWWidth | CWHeight))
{
int width, height;
@@ -3991,16 +4002,6 @@ moveResizeWindow (CompWindow *w,
(*w->screen->validateWindowResizeRequest) (w, &xwcm, xwc, source);
- /* when horizontally maximized only allow width changes added by
- addWindowSizeChanges */
- if (w->state & CompWindowStateMaximizedHorzMask)
- xwcm &= ~CWWidth;
-
- /* when vertically maximized only allow height changes added by
- addWindowSizeChanges */
- if (w->state & CompWindowStateMaximizedVertMask)
- xwcm &= ~CWHeight;
-
xwcm |= addWindowSizeChanges (w, xwc,
xwc->x, xwc->y,
xwc->width, xwc->height,