[Pkg-xfce-commits] r2028 - in desktop/trunk/xfwm4/debian: . patches

corsac at alioth.debian.org corsac at alioth.debian.org
Sat May 17 14:53:29 UTC 2008


Author: corsac
Date: 2008-05-17 14:53:26 +0000 (Sat, 17 May 2008)
New Revision: 2028

Added:
   desktop/trunk/xfwm4/debian/patches/01_filter-grab-ungrab-events.patch
   desktop/trunk/xfwm4/debian/patches/02_exit-on-selectionclear.patch
   desktop/trunk/xfwm4/debian/patches/03_fix-compositing-overlay.patch
   desktop/trunk/xfwm4/debian/patches/04_fix-automaximize-on-move.patch
   desktop/trunk/xfwm4/debian/patches/05_awn-focus.patch
Removed:
   desktop/trunk/xfwm4/debian/patches/01_awn-focus.patch
   desktop/trunk/xfwm4/debian/patches/02_fix-compositing-overlay.patch
   desktop/trunk/xfwm4/debian/patches/03_fix-automaximize-on-move.patch
   desktop/trunk/xfwm4/debian/patches/04_exit-on-selectionclear.patch
   desktop/trunk/xfwm4/debian/patches/05_filter-grab-ungrab-events.patch
Modified:
   desktop/trunk/xfwm4/debian/changelog
   desktop/trunk/xfwm4/debian/patches/series
Log:
reorder patches so they apply cleanly


Modified: desktop/trunk/xfwm4/debian/changelog
===================================================================
--- desktop/trunk/xfwm4/debian/changelog	2008-05-17 14:44:40 UTC (rev 2027)
+++ desktop/trunk/xfwm4/debian/changelog	2008-05-17 14:53:26 UTC (rev 2028)
@@ -1,17 +1,18 @@
 xfwm4 (4.4.2-4) UNRELEASED; urgency=low
 
   * debian/patches: 
-    - 02_compositing-overlay added, fix compositing with overlay
+    - 01_filter-grab-ungrab-events added, prevents redrawing the frame twice.
+      (Xfce r26363).
+    - 02_exit-on-selectionclear added, improve “--replace” protocol.
+      (Xfce #2374 and r26585).
+    - 03_compositing-overlay added, fix compositing with overlay
       windows (video players and screensavers).
       Xfce #3849, taken from r26691.                            closes: #476396
-    - 03_fix-automaximize-on-move added. (Xfce r26966)
-    - 04_exit-on-selectionclear added, improve “--replace” protocol.
-      (Xfce #2374 and r26585).
-    - 05_filter-grab-ungrab-events added, prevents redrawing the frame twice.
-      (Xfce r26363).
+    - 04_fix-automaximize-on-move added. (Xfce r26966)
+    - 01_awn-focus moved to 05_awn-focus.
   * debian/copyright: update dates.
 
- -- Yves-Alexis Perez <corsac at debian.org>  Sat, 17 May 2008 16:32:07 +0200
+ -- Yves-Alexis Perez <corsac at debian.org>  Sat, 17 May 2008 16:52:54 +0200
 
 xfwm4 (4.4.2-3) unstable; urgency=low
 

Deleted: desktop/trunk/xfwm4/debian/patches/01_awn-focus.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/01_awn-focus.patch	2008-05-17 14:44:40 UTC (rev 2027)
+++ desktop/trunk/xfwm4/debian/patches/01_awn-focus.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -1,13 +0,0 @@
-Index: xfwm4/src/events.c
-===================================================================
---- xfwm4/src/events.c	(revision 26059)
-+++ xfwm4/src/events.c	(revision 26060)
-@@ -1430,7 +1430,7 @@
-            stealing prevention is not activated, otherwise we just set the "demands attention"
-            flag...
-          */
--        if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) && (wc.sibling == None))
-+        if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) && (wc.sibling == None) && !(c->type & WINDOW_TYPE_DONT_FOCUS))
-         {
-             Client *last_raised;
- 

Added: desktop/trunk/xfwm4/debian/patches/01_filter-grab-ungrab-events.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/01_filter-grab-ungrab-events.patch	                        (rev 0)
+++ desktop/trunk/xfwm4/debian/patches/01_filter-grab-ungrab-events.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -0,0 +1,190 @@
+Index: xfce_4_4/src/client.c
+===================================================================
+--- xfce_4_4/src/client.c	(revision 26362)
++++ xfce_4_4/src/client.c	(revision 26363)
+@@ -121,7 +121,7 @@
+ };
+ 
+ /* Forward decl */
+-static void 
++static void
+ clientUpdateIconPix (Client * c);
+ 
+ Display *
+@@ -348,8 +348,8 @@
+         if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
+         {
+             c->blink_timeout_id =
+-                g_timeout_add_full (G_PRIORITY_DEFAULT, 
+-                                    CLIENT_BLINK_TIMEOUT, 
++                g_timeout_add_full (G_PRIORITY_DEFAULT,
++                                    CLIENT_BLINK_TIMEOUT,
+                                     (GtkFunction) urgent_cb,
+                                     (gpointer) c, NULL);
+         }
+@@ -1183,11 +1183,11 @@
+     values.events = True;
+ 
+     c->xsync_alarm = XSyncCreateAlarm (display_info->dpy,
+-                                       XSyncCACounter | 
+-                                       XSyncCADelta | 
+-                                       XSyncCAEvents | 
+-                                       XSyncCATestType | 
+-                                       XSyncCAValue | 
++                                       XSyncCACounter |
++                                       XSyncCADelta |
++                                       XSyncCAEvents |
++                                       XSyncCATestType |
++                                       XSyncCAValue |
+                                        XSyncCAValueType,
+                                        &values);
+     return (c->xsync_alarm != None);
+@@ -1258,9 +1258,9 @@
+     TRACE ("entering clientXSyncResetTimeout");
+ 
+     clientXSyncClearTimeout (c);
+-    c->xsync_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 
+-                                              CLIENT_XSYNC_TIMEOUT, 
+-                                              (GtkFunction) clientXSyncTimeout, 
++    c->xsync_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT,
++                                              CLIENT_XSYNC_TIMEOUT,
++                                              (GtkFunction) clientXSyncTimeout,
+                                               (gpointer) c, NULL);
+ }
+ 
+@@ -1634,7 +1634,7 @@
+ update_icon_idle_cb (gpointer data)
+ {
+     Client *c;
+-    
++
+     TRACE ("entering update_icon_idle_cb");
+ 
+     c = (Client *) data;
+@@ -1659,7 +1659,7 @@
+ 
+     if (c->icon_timeout_id == 0)
+     {
+-        c->icon_timeout_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, 
++        c->icon_timeout_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
+                                               update_icon_idle_cb, c, NULL);
+     }
+ }
+@@ -1925,7 +1925,7 @@
+         }
+     }
+ 
+-    /* 
++    /*
+        Initialize "old" fields once the position is ensured, to avoid
+        initially maximized or fullscreen windows being placed offscreen
+        once de-maximized
+@@ -2590,7 +2590,7 @@
+         for (index = screen_info->windows_stack; index; index = g_list_next (index))
+         {
+             Client *c = (Client *) index->data;
+-            if ((c->type & WINDOW_REGULAR_FOCUSABLE) 
++            if ((c->type & WINDOW_REGULAR_FOCUSABLE)
+                 && !FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED | CLIENT_FLAG_SKIP_TASKBAR))
+             {
+                 FLAG_SET (c->xfwm_flags, XFWM_FLAG_WAS_SHOWN);
+@@ -2643,7 +2643,7 @@
+     }
+     else
+     {
+-        TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); 
++        TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
+         FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
+         clientSetNetState (c);
+     }
+@@ -2779,7 +2779,7 @@
+             wc.y = c->y;
+             mask |= (CWX | CWY);
+         }
+-        
++
+         if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
+         {
+             c->ignore_unmap++;
+@@ -4064,7 +4064,7 @@
+ 
+     g1 = myScreenGrabKeyboard (screen_info, myDisplayGetCurrentTime (display_info));
+     g2 = myScreenGrabPointer (screen_info, ButtonMotionMask | ButtonReleaseMask,
+-                              myDisplayGetCursorMove (display_info), 
++                              myDisplayGetCursorMove (display_info),
+                               myDisplayGetCurrentTime (display_info));
+     if (!g1 || !g2)
+     {
+@@ -4470,7 +4470,7 @@
+                 || (!clientCkeckTitle (c) && (frame_y < screen_info->margins [STRUTS_TOP])))
+             {
+                 temp = c->y + c->height;
+-                c->y = CLAMP (c->y, screen_info->margins [STRUTS_TOP] + frame_top, 
++                c->y = CLAMP (c->y, screen_info->margins [STRUTS_TOP] + frame_top,
+                          MAX (disp_max_y - min_visible,  screen_info->height - screen_info->margins [STRUTS_BOTTOM] - min_visible));
+                 clientSetHeight (c, temp - c->y);
+                 c->y = temp - c->height;
+@@ -4956,32 +4956,39 @@
+     status = EVENT_FILTER_STOP;
+     pressed = TRUE;
+ 
+-    if (xevent->type == EnterNotify)
++   switch (xevent->type)
+     {
+-        c->button_pressed[b] = TRUE;
+-        frameDraw (c, FALSE);
++        case EnterNotify:
++            if ((xevent->xcrossing.mode != NotifyGrab) && (xevent->xcrossing.mode != NotifyUngrab))
++            {
++                c->button_pressed[b] = TRUE;
++                frameDraw (c, FALSE);
++            }
++            break;
++        case LeaveNotify:
++            if ((xevent->xcrossing.mode != NotifyGrab) && (xevent->xcrossing.mode != NotifyUngrab))
++            {
++                c->button_pressed[b] = FALSE;
++                frameDraw (c, FALSE);
++            }
++            break;
++        case ButtonRelease:
++            pressed = FALSE;
++            break;
++        case UnmapNotify:
++            if (xevent->xunmap.window == c->window)
++            {
++                pressed = FALSE;
++                c->button_pressed[b] = FALSE;
++            }
++            break;
++        case KeyPress:
++        case KeyRelease:
++            break;
++        default:
++            status = EVENT_FILTER_CONTINUE;
++            break;
+     }
+-    else if (xevent->type == LeaveNotify)
+-    {
+-        c->button_pressed[b] = FALSE;
+-        frameDraw (c, FALSE);
+-    }
+-    else if (xevent->type == ButtonRelease)
+-    {
+-        pressed = FALSE;
+-    }
+-    else if ((xevent->type == UnmapNotify) && (xevent->xunmap.window == c->window))
+-    {
+-        pressed = FALSE;
+-        c->button_pressed[b] = FALSE;
+-    }
+-    else if ((xevent->type == KeyPress) || (xevent->type == KeyRelease))
+-    {
+-    }
+-    else
+-    {
+-        status = EVENT_FILTER_CONTINUE;
+-    }
+ 
+     if (!pressed)
+     {

Added: desktop/trunk/xfwm4/debian/patches/02_exit-on-selectionclear.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/02_exit-on-selectionclear.patch	                        (rev 0)
+++ desktop/trunk/xfwm4/debian/patches/02_exit-on-selectionclear.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -0,0 +1,237 @@
+Index: xfce_4_4/src/events.c
+===================================================================
+--- xfce_4_4/src/events.c	(revision 26584)
++++ xfce_4_4/src/events.c	(revision 26585)
+@@ -71,7 +71,7 @@
+                                  PointerMotionMask | \
+                                  ButtonPressMask | \
+                                  ButtonReleaseMask)
+-                  
++
+ #define MODIFIER_MASK           (ShiftMask | \
+                                  ControlMask | \
+                                  AltMask | \
+@@ -238,7 +238,7 @@
+     passdata.ycurrent = passdata.y;
+     passdata.clicks = 1;
+     passdata.allow_double_click = allow_double_click;
+-    passdata.timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, 
++    passdata.timeout = g_timeout_add_full (G_PRIORITY_DEFAULT,
+                                            display_info->dbl_click_time,
+                                            (GtkFunction) typeOfClick_break,
+                                            (gpointer) &passdata, NULL);
+@@ -304,9 +304,9 @@
+     {
+         g_source_remove (raise_timeout);
+     }
+-    raise_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, 
+-                                        screen_info->params->raise_delay, 
+-                                        (GtkFunction) raise_cb, 
++    raise_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT,
++                                        screen_info->params->raise_delay,
++                                        (GtkFunction) raise_cb,
+                                         NULL, NULL);
+ }
+ 
+@@ -487,13 +487,13 @@
+                 }
+                 break;
+             case KEY_POPUP_MENU:
+-                /* 
+-                   We need to release the events here prior to grabbing 
++                /*
++                   We need to release the events here prior to grabbing
+                    the keyboard in gtk menu otherwise we end with a dead lock...
+                   */
+                 XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
+-                show_window_menu (c, frameX (c) + frameLeft (c), 
+-                                     frameY (c) + frameTop (c), 
++                show_window_menu (c, frameX (c) + frameLeft (c),
++                                     frameY (c) + frameTop (c),
+                                      Button1, GDK_CURRENT_TIME);
+                 /* 'nuff for now */
+                 return;
+@@ -620,7 +620,7 @@
+     }
+ }
+ 
+-static int 
++static int
+ edgeGetPart (Client *c, XButtonEvent * ev)
+ {
+     int part, x_corner_pixels, y_corner_pixels, x_distance, y_distance;
+@@ -1432,22 +1432,22 @@
+             constrained = TRUE;
+         }
+ 
+-        /* 
+-           Let's say that if the client performs a XRaiseWindow, we show the window if focus 
++        /*
++           Let's say that if the client performs a XRaiseWindow, we show the window if focus
+            stealing prevention is not activated, otherwise we just set the "demands attention"
+            flag...
+          */
+         if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) && (wc.sibling == None))
+         {
+             Client *last_raised;
+-            
++
+             last_raised = clientGetLastRaise (screen_info);
+             if (last_raised && (c != last_raised))
+             {
+                 if ((screen_info->params->prevent_focus_stealing) && (screen_info->params->activate_action == ACTIVATE_ACTION_NONE))
+                 {
+                     ev->value_mask &= ~(CWSibling | CWStackMode);
+-                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); 
++                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
+                     FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
+                     clientSetNetState (c);
+                 }
+@@ -1680,10 +1680,10 @@
+     }
+ 
+     if ((ev->window == screen_info->xroot)
+-        && ((ev->detail == NotifyDetailNone) 
++        && ((ev->detail == NotifyDetailNone)
+             || ((ev->mode == NotifyNormal) && (ev->detail == NotifyInferior))))
+     {
+-        /* 
++        /*
+            Handle unexpected focus transition to root (means that an unknown
+            window has vanished and the focus is returned to the root).
+          */
+@@ -1710,10 +1710,10 @@
+         clientUpdateFocus (screen_info, c, FOCUS_SORT);
+         if ((user_focus != c) && (user_focus != NULL))
+         {
+-            /* 
++            /*
+                Focus stealing prevention:
+-               Some apps tend to focus the window directly. If focus stealing prevention is enabled, 
+-               we revert the user set focus to the window that we think has focus and then set the 
++               Some apps tend to focus the window directly. If focus stealing prevention is enabled,
++               we revert the user set focus to the window that we think has focus and then set the
+                demand attention flag.
+ 
+                Note that focus stealing prevention is ignored between windows of the same group or
+@@ -1725,12 +1725,12 @@
+                 !clientSameGroup (c, user_focus) &&
+                 !clientIsTransientOrModalFor (c, user_focus))
+             {
+-                TRACE ("Setting focus back to \"%s\" (0x%lx)", user_focus->name, user_focus->window); 
++                TRACE ("Setting focus back to \"%s\" (0x%lx)", user_focus->name, user_focus->window);
+                 clientSetFocus (user_focus->screen_info, user_focus, getXServerTime (display_info), NO_FOCUS_FLAG);
+ 
+                 if (current_focus)
+                 {
+-                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); 
++                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
+                     FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
+                     clientSetNetState (c);
+                 }
+@@ -1779,7 +1779,7 @@
+                 "NotifyDetailNone" :
+                 "(unknown)");
+ 
+-    if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab) || 
++    if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab) ||
+         (ev->detail == NotifyInferior) || (ev->detail > NotifyNonlinearVirtual))
+     {
+         /* We're not interested in such notifications */
+@@ -1871,19 +1871,19 @@
+             if (clientCheckTransientWindow (c, w))
+             {
+                 c->transient_for = w;
+-#if 0                
++#if 0
+                 /*
+                   Java 1.6 updates the WM_TRANSIENT_FOR properties "on-the-fly"
+-                  of its windows to maintain the z-order. 
+-                  
+-                  If we raise the transient then, we clearly have a race 
+-                  condition between the WM and Java... And that breaks 
++                  of its windows to maintain the z-order.
++
++                  If we raise the transient then, we clearly have a race
++                  condition between the WM and Java... And that breaks
+                   the z-order. Bug #2483.
+-                  
++
+                   I still think that raising here makes sense, to ensure
+                   that the newly promoted transient window is placed above
+                   its parent.
+-                  
++
+                   Chances are that Java 1.6 won't change any time soon (heh,
+                   it's not even released yet), so let's adjust the WM to
+                   work with Java 1.6...
+@@ -2105,7 +2105,7 @@
+                 TRACE ("Time of event received is %u, current XServer time is %u", (unsigned int) ev_time, (unsigned int) current);
+                 if ((screen_info->params->prevent_focus_stealing) && TIMESTAMP_IS_BEFORE(ev_time, current))
+                 {
+-                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); 
++                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
+                     FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
+                     clientSetNetState (c);
+                 }
+@@ -2139,10 +2139,10 @@
+              (ev->message_type == display_info->atoms[NET_CURRENT_DESKTOP])) && (ev->format == 32))
+         {
+             TRACE ("root has received a win_workspace or a NET_CURRENT_DESKTOP event %li", ev->data.l[0]);
+-            if ((ev->data.l[0] >= 0) && (ev->data.l[0] < screen_info->workspace_count) && 
++            if ((ev->data.l[0] >= 0) && (ev->data.l[0] < screen_info->workspace_count) &&
+                 (ev->data.l[0] != screen_info->current_ws))
+             {
+-                workspaceSwitch (screen_info, ev->data.l[0], NULL, TRUE, 
++                workspaceSwitch (screen_info, ev->data.l[0], NULL, TRUE,
+                                  myDisplayGetTime (display_info, (Time) ev->data.l[1]));
+             }
+         }
+@@ -2176,10 +2176,10 @@
+         else if ((ev->message_type == display_info->atoms[MANAGER]) && (ev->format == 32))
+         {
+             Atom selection;
+-            
++
+             TRACE ("window (0x%lx) has received a MANAGER event", ev->window);
+             selection = (Atom) ev->data.l[1];
+-            
++
+ #ifdef ENABLE_KDE_SYSTRAY_PROXY
+             if (selection == screen_info->net_system_tray_selection)
+             {
+@@ -2202,6 +2202,24 @@
+ }
+ 
+ static void
++handleSelectionClear (DisplayInfo *display_info, XSelectionClearEvent * ev)
++{
++    ScreenInfo *screen_info;
++
++    TRACE ("entering handleSelectionClear");
++
++    screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
++    if (screen_info)
++    {
++        if (myScreenCheckWMAtom (screen_info, ev->selection))
++        {
++            TRACE ("root has received a WM_Sn selection event");
++            display_info->quit = TRUE;
++        }
++    }
++}
++
++static void
+ handleShape (DisplayInfo *display_info, XShapeEvent * ev)
+ {
+     Client *c;
+@@ -2366,6 +2384,9 @@
+         case ClientMessage:
+             handleClientMessage (display_info, (XClientMessageEvent *) ev);
+             break;
++        case SelectionClear:
++            handleSelectionClear (display_info, (XSelectionClearEvent *) ev);
++            break;
+         case ColormapNotify:
+             handleColormapNotify (display_info, (XColormapEvent *) ev);
+             break;

Deleted: desktop/trunk/xfwm4/debian/patches/02_fix-compositing-overlay.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/02_fix-compositing-overlay.patch	2008-05-17 14:44:40 UTC (rev 2027)
+++ desktop/trunk/xfwm4/debian/patches/02_fix-compositing-overlay.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -1,510 +0,0 @@
-Index: xfce_4_4/src/display.h
-===================================================================
---- xfce_4_4/src/display.h	(revision 26690)
-+++ xfce_4_4/src/display.h	(revision 26691)
-@@ -48,6 +48,11 @@
- #define HAVE_NAME_WINDOW_PIXMAP 1
- #endif /* HAVE_NAME_WINDOW_PIXMAP */
- #endif /* COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 2 */
-+#if COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 3
-+#ifndef HAVE_OVERLAYS
-+#define HAVE_OVERLAYS 1
-+#endif /* HAVE_OVERLAYS */
-+#endif /* COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 3 */
- #endif /* HAVE_COMPOSITOR */
- 
- #include <gtk/gtk.h>
-@@ -286,6 +291,10 @@
-     gboolean have_name_window_pixmap;
- #endif /* HAVE_NAME_WINDOW_PIXMAP */
- 
-+#if HAVE_OVERLAYS
-+    gboolean have_overlays;
-+#endif /* HAVE_OVERLAYS */
-+
- #endif /* HAVE_COMPOSITOR */
- };
- 
-@@ -331,7 +340,7 @@
- Time                     myDisplayUpdateCurrentTime             (DisplayInfo *,
-                                                                  XEvent *);
- Time                     myDisplayGetCurrentTime                (DisplayInfo *);
--Time                     myDisplayGetTime                       (DisplayInfo *, 
-+Time                     myDisplayGetTime                       (DisplayInfo *,
-                                                                  Time);
- Time                     myDisplayGetLastUserTime               (DisplayInfo *);
- void                     myDisplaySetLastUserTime               (DisplayInfo *,
-Index: xfce_4_4/src/compositor.c
-===================================================================
---- xfce_4_4/src/compositor.c	(revision 26690)
-+++ xfce_4_4/src/compositor.c	(revision 26691)
-@@ -16,12 +16,12 @@
- 
-         xcompmgr - (c) 2003 Keith Packard
-         metacity - (c) 2003, 2004 Red Hat, Inc.
--        xfwm4    - (c) 2005-2006 Olivier Fourdan
-+        xfwm4    - (c) 2005-2008 Olivier Fourdan
- 
- */
- 
- #ifdef HAVE_CONFIG_H
--#include <config.h>
-+#include "config.h"
- #endif
- 
- #include <X11/Xlib.h>
-@@ -70,9 +70,10 @@
- #define WIN_NO_SHADOW(cw)               ((cw->c) && \
-                                            (FLAG_TEST (cw->c->flags, CLIENT_FLAG_FULLSCREEN | CLIENT_FLAG_BELOW) || \
-                                               (cw->c->type & (WINDOW_DOCK | WINDOW_DESKTOP))))
-+#define WIN_IS_DOCK(cw)                 (WIN_HAS_CLIENT(cw) && (cw->c->type & WINDOW_DOCK))
- #define WIN_IS_OVERRIDE(cw)             (cw->attr.override_redirect)
- #define WIN_IS_ARGB(cw)                 (cw->argb)
--#define WIN_IS_OPAQUE(cw)               (((cw->opacity == NET_WM_OPAQUE) && !WIN_IS_ARGB(cw)) || (cw->screen_info->overlays))
-+#define WIN_IS_OPAQUE(cw)               (((cw->opacity == NET_WM_OPAQUE) && !WIN_IS_ARGB(cw)) || (cw->screen_info->wins_unredirected))
- #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) && \
-@@ -549,7 +550,7 @@
-         return (None);
-     }
- 
--    shadowPixmap = XCreatePixmap (display_info->dpy, screen_info->xroot,
-+    shadowPixmap = XCreatePixmap (display_info->dpy, screen_info->output,
-                                 shadowImage->width, shadowImage->height, 8);
-     if (shadowPixmap == None)
-     {
-@@ -602,7 +603,7 @@
-     g_return_val_if_fail (render_format != NULL , None);
- 
-     pixmap = XCreatePixmap (display_info->dpy,
--                            screen_info->xroot, 1, 1, argb ? 32 : 8);
-+                            screen_info->output, 1, 1, argb ? 32 : 8);
-     g_return_val_if_fail (pixmap != None, None);
- 
-     pa.repeat = TRUE;
-@@ -814,7 +815,7 @@
- #endif
-     if (!pixmap)
-     {
--        pixmap = XCreatePixmap (dpy, screen_info->xroot, 1, 1,
-+        pixmap = XCreatePixmap (dpy, screen_info->output, 1, 1,
-                                 DefaultDepth (dpy, screen_info->screen));
-         g_return_val_if_fail (pixmap != None, None);
-         fill = TRUE;
-@@ -866,7 +867,7 @@
-     g_return_val_if_fail (format != NULL, None);
- 
-     rootPixmap = XCreatePixmap (display_info->dpy,
--                                screen_info->xroot,
-+                                screen_info->output,
-                                 screen_width, screen_height, depth);
-     g_return_val_if_fail (rootPixmap != None, None);
- 
-@@ -919,21 +920,21 @@
- 
-     /*
-        We apply a shadow to the window if:
--       - There is no overlay (ie unredirected windows)
-        - It's a window with a frame and the user asked for shadows under regular
-          windows,
-        - it's an override redirect window that is not shaped, not an argb and
-          the user asked for shadows on so called "popup" windows.
-      */
- 
--    if (!(screen_info->overlays) &&
--         ((screen_info->params->show_popup_shadow &&
-+    if ((screen_info->params->show_popup_shadow &&
-               WIN_IS_OVERRIDE(cw) &&
-+              !WIN_IS_FULLSCREEN(cw) &&
-               !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) ||
-           (screen_info->params->show_frame_shadow &&
-               !WIN_IS_OVERRIDE(cw) &&
-               !WIN_NO_SHADOW(cw) &&
--              (WIN_HAS_FRAME(cw) || !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))))))
-+              !WIN_IS_DOCK(cw) &&
-+              (WIN_HAS_FRAME(cw) || !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw)))))
-     {
-         XRectangle sr;
- 
-@@ -1083,7 +1084,7 @@
-         XCompositeUnredirectWindow (display_info->dpy, cw->id, display_info->composite_mode);
-         XSync (display_info->dpy, FALSE);
- 
--        TRACE ("Window 0x%lx unredirected, overlays is %i", cw->id, screen_info->overlays);
-+        TRACE ("Window 0x%lx unredirected, wins_unredirected is %i", cw->id, screen_info->wins_unredirected);
-     }
- }
- 
-@@ -1124,11 +1125,11 @@
-                                          * screen_info->params->frame_opacity
-                                          / (NET_WM_OPAQUE * 100.0);
- 
--                cw->alphaBorderPict = solid_picture (screen_info, 
--                                                     FALSE, 
--                                                     frame_opacity, 
--                                                     0.0, /* red   */ 
--                                                     0.0, /* green */ 
-+                cw->alphaBorderPict = solid_picture (screen_info,
-+                                                     FALSE,
-+                                                     frame_opacity,
-+                                                     0.0, /* red   */
-+                                                     0.0, /* green */
-                                                      0.0  /* blue  */);
-             }
- 
-@@ -1226,7 +1227,6 @@
-     gint screen_width;
-     gint screen_height;
-     gint screen_number;
--    Window xroot;
-     CWindow *cw;
- 
-     TRACE ("entering paint_all");
-@@ -1237,7 +1237,6 @@
-     screen_width = screen_info->width;
-     screen_height = screen_info->height;
-     screen_number = screen_info->screen;
--    xroot = screen_info->xroot;
- 
-     /* Create root buffer if not done yet */
-     if (screen_info->rootBuffer == None)
-@@ -1355,9 +1354,9 @@
-             if ((cw->opacity != NET_WM_OPAQUE) && !(cw->alphaPict))
-             {
-                 cw->alphaPict = solid_picture (screen_info, FALSE,
--                                               (double) cw->opacity / NET_WM_OPAQUE,  
--                                               0.0, /* red   */ 
--                                               0.0, /* green */ 
-+                                               (double) cw->opacity / NET_WM_OPAQUE,
-+                                               0.0, /* red   */
-+                                               0.0, /* green */
-                                                0.0  /* blue  */);
-             }
-             XFixesIntersectRegion (dpy, cw->borderClip, cw->borderClip, cw->borderSize);
-@@ -1755,28 +1754,43 @@
- map_win (CWindow *cw)
- {
-     ScreenInfo *screen_info;
-+    DisplayInfo *display_info;
- 
-     g_return_if_fail (cw != NULL);
--    TRACE ("entering map_win 0x%lx", cw->id);
-+    TRACE ("entering map_win 0x%lx\n", cw->id);
- 
--    cw->viewable = TRUE;
--    cw->damaged = FALSE;
-+    screen_info = cw->screen_info;
-+    display_info = screen_info->display_info;
- 
--    screen_info = cw->screen_info;
-     if (!WIN_IS_REDIRECTED(cw))
-     {
--        screen_info->overlays++;
--        TRACE ("Mapping unredirected window 0x%lx, overlays increased to %i", cw->id, screen_info->overlays);
-+        /* To be safe, we count only the fullscreen overlays */
-+        if (WIN_IS_FULLSCREEN(cw) && WIN_IS_VIEWABLE (cw))
-+        {
-+            screen_info->wins_unredirected++;
-+        }
-+#if HAVE_OVERLAYS
-+        if ((screen_info->wins_unredirected == 1) && (display_info->have_overlays))
-+        {
-+            TRACE ("Unmapping overlay window");
-+            XUnmapWindow (myScreenGetXDisplay (screen_info), screen_info->overlay);
-+        }
-+#endif /* HAVE_OVERLAYS */
-+        TRACE ("Mapping unredirected window 0x%lx, wins_unredirected increased to %i", cw->id, screen_info->wins_unredirected);
-         return;
-     }
-+
-+    cw->viewable = TRUE;
-+    cw->damaged = FALSE;
-+
-     if (!screen_info->params->unredirect_overlays)
-     {
--        TRACE ("Not unredirecting overlays");
-+        TRACE ("Not unredirecting wins_unredirected");
-         return;
-     }
- 
-     /* Check for new windows to un-redirect. */
--    if (WIN_IS_FULLSCREEN(cw) && WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
-+    if ((WIN_IS_FULLSCREEN(cw) || (screen_info->wins_unredirected > 0)) && WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
-         WIN_IS_NATIVE_OPAQUE(cw) && WIN_IS_REDIRECTED(cw) && !WIN_IS_SHAPED(cw))
-     {
-         CWindow *top;
-@@ -1797,31 +1811,37 @@
- unmap_win (CWindow *cw)
- {
-     ScreenInfo *screen_info;
-+    DisplayInfo *display_info;
- 
-     g_return_if_fail (cw != NULL);
-     TRACE ("entering unmap_win 0x%lx", cw->id);
- 
-     screen_info = cw->screen_info;
--    if (!WIN_IS_REDIRECTED(cw) && (screen_info->overlays > 0))
--    {
--        screen_info->overlays--;
--        TRACE ("Unmapped window 0x%lx, overlays decreased to %i", cw->id, screen_info->overlays);
--    }
-+    display_info = screen_info->display_info;
- 
--    if (!screen_info->overlays)
-+    if (!WIN_IS_REDIRECTED(cw) && WIN_IS_FULLSCREEN(cw) && (screen_info->wins_unredirected > 0))
-     {
--        /* Repaint immediately if that was the last unredirected window */
--
--        if (!WIN_IS_REDIRECTED(cw))
-+        screen_info->wins_unredirected--;
-+        TRACE ("Unmapped window 0x%lx, wins_unredirected decreased to %i", cw->id, screen_info->wins_unredirected);
-+        if (!screen_info->wins_unredirected)
-         {
-+            /* Restore the overlay if that was the last unredirected window */
-+#if HAVE_OVERLAYS
-+            if (display_info->have_overlays)
-+            {
-+                TRACE ("Remapping overlay window");
-+                XMapWindow (myScreenGetXDisplay (screen_info), screen_info->overlay);
-+            }
-+#endif /* HAVE_OVERLAYS */
-             damage_screen (screen_info);
-             repair_screen (screen_info);
--        }
--        else if (WIN_IS_VISIBLE(cw))
--        {
--            damage_win (cw);
--        }
-+       }
-     }
-+    else if (WIN_IS_VISIBLE(cw))
-+    {
-+        damage_win (cw);
-+    }
-+
-     cw->viewable = FALSE;
-     cw->damaged = FALSE;
-     free_win_data (cw, FALSE);
-@@ -1925,7 +1945,11 @@
-     new->shaped = is_shaped (display_info, id);
-     new->viewable = (new->attr.map_state == IsViewable);
- 
--    if ((new->attr.class != InputOnly) && (id != screen_info->xroot))
-+    if ((new->attr.class != InputOnly)
-+#if HAVE_OVERLAYS
-+         && ((!display_info->have_overlays) || (id != screen_info->overlay))
-+#endif
-+         && (id != screen_info->output))
-     {
-         new->damage = XDamageCreate (display_info->dpy, id, XDamageReportNonEmpty);
-     }
-@@ -2122,7 +2146,10 @@
-     {
-         ScreenInfo *screen_info;
- 
--        unmap_win (cw);
-+        if (WIN_IS_VIEWABLE (cw))
-+        {
-+            unmap_win (cw);
-+        }
-         screen_info = cw->screen_info;
-         screen_info->cwindows = g_list_remove (screen_info->cwindows, (gconstpointer) cw);
- 
-@@ -2184,7 +2211,7 @@
-             ScreenInfo *screen_info = myDisplayGetScreenFromRoot (display_info, ev->window);
-             if ((screen_info) && (screen_info->rootTile))
-             {
--                XClearArea (display_info->dpy, screen_info->xroot, 0, 0, 0, 0, TRUE);
-+                XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE);
-                 XRenderFreePicture (display_info->dpy, screen_info->rootTile);
-                 screen_info->rootTile = None;
-                 add_repair (display_info);
-@@ -2413,7 +2440,10 @@
-     cw = find_cwindow_in_display (display_info, ev->window);
-     if (cw)
-     {
--        unmap_win (cw);
-+        if (WIN_IS_VIEWABLE (cw))
-+        {
-+            unmap_win (cw);
-+        }
-     }
- }
- 
-@@ -2650,10 +2680,11 @@
- compositorInitDisplay (DisplayInfo *display_info)
- {
- #ifdef HAVE_COMPOSITOR
--#if HAVE_NAME_WINDOW_PIXMAP
-     int composite_major, composite_minor;
--#endif
- 
-+    composite_major = 0;
-+    composite_minor = 0;
-+
-     if (!XCompositeQueryExtension (display_info->dpy,
-                                 &display_info->composite_event_base,
-                                 &display_info->composite_error_base))
-@@ -2666,9 +2697,11 @@
-     else
-     {
-         display_info->have_composite = TRUE;
-+        XCompositeQueryVersion (display_info->dpy, &composite_major, &composite_minor);
- #if DEBUG
-         g_print ("composite event base: %i\n", display_info->composite_event_base);
-         g_print ("composite error base: %i\n", display_info->composite_error_base);
-+        g_print ("composite version: %i.%i\n", composite_major, composite_minor);
- #endif
-     }
- 
-@@ -2705,7 +2738,7 @@
- #if DEBUG
-         g_print ("fixes event base: %i\n", display_info->fixes_event_base);
-         g_print ("fixes error base: %i\n", display_info->fixes_error_base);
--#endif
-+#endif /* DEBUG */
-     }
- 
-     display_info->compositor_idle_id = 0;
-@@ -2723,12 +2756,15 @@
- 
-     display_info->composite_mode = 0;
- #if HAVE_NAME_WINDOW_PIXMAP
--    XCompositeQueryVersion (display_info->dpy, &composite_major, &composite_minor);
-     display_info->have_name_window_pixmap = ((composite_major > 0) || (composite_minor >= 2));
--#else
-+#else  /* HAVE_NAME_WINDOW_PIXMAP */
-     display_info->have_name_window_pixmap = FALSE;
--#endif
-+#endif /* HAVE_NAME_WINDOW_PIXMAP */
- 
-+#if HAVE_OVERLAYS
-+    display_info->have_overlays = ((composite_major > 0) || (composite_minor >= 3));
-+#endif /* HAVE_OVERLAYS */
-+
- #else /* HAVE_COMPOSITOR */
-     display_info->enable_compositor = FALSE;
- #endif /* HAVE_COMPOSITOR */
-@@ -2792,8 +2828,38 @@
-         return FALSE;
-     }
- 
-+    screen_info->output = screen_info->xroot;
-+#if HAVE_OVERLAYS
-+    if (display_info->have_overlays)
-+    {
-+        screen_info->overlay = XCompositeGetOverlayWindow (display_info->dpy, screen_info->xroot);
-+        if (screen_info->overlay != None)
-+        {
-+            XSetWindowAttributes attributes;
-+
-+            screen_info->root_overlay = XCreateWindow (display_info->dpy, screen_info->overlay,
-+                                                       0, 0, screen_info->width, screen_info->height, 0, screen_info->depth,
-+                                                       InputOutput, screen_info->visual, 0, &attributes);
-+            XMapWindow (display_info->dpy, screen_info->root_overlay);
-+            XRaiseWindow (display_info->dpy, screen_info->overlay);
-+            XShapeCombineRectangles (display_info->dpy, screen_info->overlay,
-+                                     ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted);
-+            XShapeCombineRectangles (display_info->dpy, screen_info->root_overlay,
-+                                     ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted);
-+            screen_info->output = screen_info->root_overlay;
-+            TRACE ("Overlay enabled");
-+        }
-+        else
-+        {
-+            /* Something is wrong with overlay support */
-+            TRACE ("Cannot get root window overlay, overlay support disabled");
-+            display_info->have_overlays = FALSE;
-+        }
-+    }
-+#endif /* HAVE_OVERLAYS */
-+
-     pa.subwindow_mode = IncludeInferiors;
--    screen_info->rootPicture = XRenderCreatePicture (display_info->dpy, screen_info->xroot,
-+    screen_info->rootPicture = XRenderCreatePicture (display_info->dpy, screen_info->output,
-                                                      visual_format, CPSubwindowMode, &pa);
- 
-     if (screen_info->rootPicture == None)
-@@ -2807,19 +2873,19 @@
-     presum_gaussian (screen_info);
-     screen_info->rootBuffer = None;
-     /* Change following argb values to play with shadow colors */
--    screen_info->blackPicture = solid_picture (screen_info, 
--                                               TRUE, 
--                                               1.0, /* alpha */ 
--                                               0.0, /* red   */ 
--                                               0.0, /* green */ 
-+    screen_info->blackPicture = solid_picture (screen_info,
-+                                               TRUE,
-+                                               1.0, /* alpha */
-+                                               0.0, /* red   */
-+                                               0.0, /* green */
-                                                0.0  /* blue  */);
-     screen_info->rootTile = None;
-     screen_info->allDamage = None;
-     screen_info->cwindows = NULL;
-     screen_info->compositor_active = TRUE;
--    screen_info->overlays = 0;
-+    screen_info->wins_unredirected = 0;
- 
--    XClearArea (display_info->dpy, screen_info->xroot, 0, 0, 0, 0, TRUE);
-+    XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE);
-     compositorSetCMSelection (screen_info, screen_info->xfwm4_win);
-     TRACE ("Manual compositing enabled");
- 
-@@ -2864,6 +2930,17 @@
-     screen_info->cwindows = NULL;
-     TRACE ("Compositor: removed %i window(s) remaining", i);
- 
-+#if HAVE_OVERLAYS
-+    if (display_info->have_overlays)
-+    {
-+        XDestroyWindow (display_info->dpy, screen_info->root_overlay);
-+        screen_info->root_overlay = None;
-+
-+        XCompositeReleaseOverlayWindow (display_info->dpy, screen_info->overlay);
-+        screen_info->overlay = None;
-+    }
-+#endif /* HAVE_OVERLAYS */
-+
-     if (screen_info->rootPicture)
-     {
-         XRenderFreePicture (display_info->dpy, screen_info->rootPicture);
-@@ -2894,7 +2971,7 @@
-     }
- 
-     screen_info->gaussianSize = -1;
--    screen_info->overlays = 0;
-+    screen_info->wins_unredirected = 0;
- 
-     XCompositeUnredirectSubwindows (display_info->dpy, screen_info->xroot,
-                                     display_info->composite_mode);
-Index: xfce_4_4/src/screen.h
-===================================================================
---- xfce_4_4/src/screen.h	(revision 26690)
-+++ xfce_4_4/src/screen.h	(revision 26691)
-@@ -133,8 +133,14 @@
- #endif
- 
- #ifdef HAVE_COMPOSITOR
-+#if HAVE_OVERLAYS
-+    Window overlay;
-+    Window root_overlay;
-+#endif
-     GList *cwindows;
-+    Window output;
- 
-+
-     gaussian_conv *gaussianMap;
-     gint gaussianSize;
-     guchar *shadowCorner;
-@@ -146,7 +152,7 @@
-     Picture rootTile;
-     XserverRegion allDamage;
- 
--    guint overlays;
-+    guint wins_unredirected;
-     gboolean compositor_active;
-     gboolean clipChanged;
- #endif /* HAVE_COMPOSITOR */

Deleted: desktop/trunk/xfwm4/debian/patches/03_fix-automaximize-on-move.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/03_fix-automaximize-on-move.patch	2008-05-17 14:44:40 UTC (rev 2027)
+++ desktop/trunk/xfwm4/debian/patches/03_fix-automaximize-on-move.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -1,95 +0,0 @@
-Index: xfce_4_4/src/placement.c
-===================================================================
---- xfce_4_4/src/placement.c	(revision 26965)
-+++ xfce_4_4/src/placement.c	(revision 26966)
-@@ -390,7 +390,7 @@
-             frame_y = frameY (c);
-             ret |= CLIENT_CONSTRAINED_BOTTOM;
-         }
--        if ((frame_y < disp_y) && (frame_y >= disp_y - frame_top))
-+        if ((frame_y <= disp_y) && (frame_y >= disp_y - frame_top))
-         {
-             c->y = disp_y + frame_top;
-             frame_y = frameY (c);
-Index: xfce_4_4/src/client.c
-===================================================================
---- xfce_4_4/src/client.c	(revision 26965)
-+++ xfce_4_4/src/client.c	(revision 26966)
-@@ -3630,6 +3630,7 @@
-         {
-             int key_move = 16;
-             unsigned int edge;
-+            int direction = 0;
- 
-             if ((screen_info->params->snap_to_border) || (screen_info->params->snap_to_windows))
-             {
-@@ -3648,18 +3649,22 @@
-             }
-             if (xevent->xkey.keycode == screen_info->params->keys[KEY_MOVE_LEFT].keycode)
-             {
-+                direction = KEY_MOVE_LEFT;
-                 c->x = c->x - key_move;
-             }
-             else if (xevent->xkey.keycode == screen_info->params->keys[KEY_MOVE_RIGHT].keycode)
-             {
-+                direction = KEY_MOVE_RIGHT;
-                 c->x = c->x + key_move;
-             }
-             else if (xevent->xkey.keycode == screen_info->params->keys[KEY_MOVE_UP].keycode)
-             {
-+                direction = KEY_MOVE_UP;
-                 c->y = c->y - key_move;
-             }
-             else if (xevent->xkey.keycode == screen_info->params->keys[KEY_MOVE_DOWN].keycode)
-             {
-+                direction = KEY_MOVE_DOWN;
-                 c->y = c->y + key_move;
-             }
- 
-@@ -3675,14 +3680,14 @@
-                 maxh = screen_info->height;
-                 clientMaxSpace (screen_info, &maxx, &maxy, &maxw, &maxh);
- 
--                if (edge & CLIENT_CONSTRAINED_TOP)
-+                if ((edge & CLIENT_CONSTRAINED_TOP) && (direction == KEY_MOVE_UP))
-                 {
-                     if (workspaceMove (screen_info, -1, 0, c, xevent->xkey.time))
-                     {
-                         c->y = maxy + maxh;
-                     }
-                 }
--                else if (edge & CLIENT_CONSTRAINED_BOTTOM)
-+                else if ((edge & CLIENT_CONSTRAINED_BOTTOM) && (direction == KEY_MOVE_DOWN))
-                 {
-                     if (workspaceMove (screen_info, 1, 0, c, xevent->xkey.time))
-                     {
-@@ -3690,14 +3695,14 @@
-                     }
-                 }
- 
--                if (edge & CLIENT_CONSTRAINED_LEFT)
-+                if ((edge & CLIENT_CONSTRAINED_LEFT) && (direction == KEY_MOVE_LEFT))
-                 {
-                     if (workspaceMove (screen_info, 0, -1, c, xevent->xkey.time))
-                     {
-                         c->x = maxx + maxw - frameWidth (c) + frameRight (c);
-                     }
-                 }
--                else if (edge & CLIENT_CONSTRAINED_RIGHT)
-+                else if ((edge & CLIENT_CONSTRAINED_RIGHT) && (direction == KEY_MOVE_RIGHT))
-                 {
-                     if (workspaceMove (screen_info, 0, 1, c, xevent->xkey.time))
-                     {
-Index: xfce_4_4/NEWS
-===================================================================
---- xfce_4_4/NEWS	(revision 26965)
-+++ xfce_4_4/NEWS	(revision 26966)
-@@ -1,3 +1,8 @@
-+4.4.3
-+=====
-+
-+- Fix automaximize on move
-+
- 4.4.2
- =====
- 

Added: desktop/trunk/xfwm4/debian/patches/03_fix-compositing-overlay.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/03_fix-compositing-overlay.patch	                        (rev 0)
+++ desktop/trunk/xfwm4/debian/patches/03_fix-compositing-overlay.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -0,0 +1,510 @@
+Index: xfce_4_4/src/display.h
+===================================================================
+--- xfce_4_4/src/display.h	(revision 26690)
++++ xfce_4_4/src/display.h	(revision 26691)
+@@ -48,6 +48,11 @@
+ #define HAVE_NAME_WINDOW_PIXMAP 1
+ #endif /* HAVE_NAME_WINDOW_PIXMAP */
+ #endif /* COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 2 */
++#if COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 3
++#ifndef HAVE_OVERLAYS
++#define HAVE_OVERLAYS 1
++#endif /* HAVE_OVERLAYS */
++#endif /* COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 3 */
+ #endif /* HAVE_COMPOSITOR */
+ 
+ #include <gtk/gtk.h>
+@@ -286,6 +291,10 @@
+     gboolean have_name_window_pixmap;
+ #endif /* HAVE_NAME_WINDOW_PIXMAP */
+ 
++#if HAVE_OVERLAYS
++    gboolean have_overlays;
++#endif /* HAVE_OVERLAYS */
++
+ #endif /* HAVE_COMPOSITOR */
+ };
+ 
+@@ -331,7 +340,7 @@
+ Time                     myDisplayUpdateCurrentTime             (DisplayInfo *,
+                                                                  XEvent *);
+ Time                     myDisplayGetCurrentTime                (DisplayInfo *);
+-Time                     myDisplayGetTime                       (DisplayInfo *, 
++Time                     myDisplayGetTime                       (DisplayInfo *,
+                                                                  Time);
+ Time                     myDisplayGetLastUserTime               (DisplayInfo *);
+ void                     myDisplaySetLastUserTime               (DisplayInfo *,
+Index: xfce_4_4/src/compositor.c
+===================================================================
+--- xfce_4_4/src/compositor.c	(revision 26690)
++++ xfce_4_4/src/compositor.c	(revision 26691)
+@@ -16,12 +16,12 @@
+ 
+         xcompmgr - (c) 2003 Keith Packard
+         metacity - (c) 2003, 2004 Red Hat, Inc.
+-        xfwm4    - (c) 2005-2006 Olivier Fourdan
++        xfwm4    - (c) 2005-2008 Olivier Fourdan
+ 
+ */
+ 
+ #ifdef HAVE_CONFIG_H
+-#include <config.h>
++#include "config.h"
+ #endif
+ 
+ #include <X11/Xlib.h>
+@@ -70,9 +70,10 @@
+ #define WIN_NO_SHADOW(cw)               ((cw->c) && \
+                                            (FLAG_TEST (cw->c->flags, CLIENT_FLAG_FULLSCREEN | CLIENT_FLAG_BELOW) || \
+                                               (cw->c->type & (WINDOW_DOCK | WINDOW_DESKTOP))))
++#define WIN_IS_DOCK(cw)                 (WIN_HAS_CLIENT(cw) && (cw->c->type & WINDOW_DOCK))
+ #define WIN_IS_OVERRIDE(cw)             (cw->attr.override_redirect)
+ #define WIN_IS_ARGB(cw)                 (cw->argb)
+-#define WIN_IS_OPAQUE(cw)               (((cw->opacity == NET_WM_OPAQUE) && !WIN_IS_ARGB(cw)) || (cw->screen_info->overlays))
++#define WIN_IS_OPAQUE(cw)               (((cw->opacity == NET_WM_OPAQUE) && !WIN_IS_ARGB(cw)) || (cw->screen_info->wins_unredirected))
+ #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) && \
+@@ -549,7 +550,7 @@
+         return (None);
+     }
+ 
+-    shadowPixmap = XCreatePixmap (display_info->dpy, screen_info->xroot,
++    shadowPixmap = XCreatePixmap (display_info->dpy, screen_info->output,
+                                 shadowImage->width, shadowImage->height, 8);
+     if (shadowPixmap == None)
+     {
+@@ -602,7 +603,7 @@
+     g_return_val_if_fail (render_format != NULL , None);
+ 
+     pixmap = XCreatePixmap (display_info->dpy,
+-                            screen_info->xroot, 1, 1, argb ? 32 : 8);
++                            screen_info->output, 1, 1, argb ? 32 : 8);
+     g_return_val_if_fail (pixmap != None, None);
+ 
+     pa.repeat = TRUE;
+@@ -814,7 +815,7 @@
+ #endif
+     if (!pixmap)
+     {
+-        pixmap = XCreatePixmap (dpy, screen_info->xroot, 1, 1,
++        pixmap = XCreatePixmap (dpy, screen_info->output, 1, 1,
+                                 DefaultDepth (dpy, screen_info->screen));
+         g_return_val_if_fail (pixmap != None, None);
+         fill = TRUE;
+@@ -866,7 +867,7 @@
+     g_return_val_if_fail (format != NULL, None);
+ 
+     rootPixmap = XCreatePixmap (display_info->dpy,
+-                                screen_info->xroot,
++                                screen_info->output,
+                                 screen_width, screen_height, depth);
+     g_return_val_if_fail (rootPixmap != None, None);
+ 
+@@ -919,21 +920,21 @@
+ 
+     /*
+        We apply a shadow to the window if:
+-       - There is no overlay (ie unredirected windows)
+        - It's a window with a frame and the user asked for shadows under regular
+          windows,
+        - it's an override redirect window that is not shaped, not an argb and
+          the user asked for shadows on so called "popup" windows.
+      */
+ 
+-    if (!(screen_info->overlays) &&
+-         ((screen_info->params->show_popup_shadow &&
++    if ((screen_info->params->show_popup_shadow &&
+               WIN_IS_OVERRIDE(cw) &&
++              !WIN_IS_FULLSCREEN(cw) &&
+               !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) ||
+           (screen_info->params->show_frame_shadow &&
+               !WIN_IS_OVERRIDE(cw) &&
+               !WIN_NO_SHADOW(cw) &&
+-              (WIN_HAS_FRAME(cw) || !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))))))
++              !WIN_IS_DOCK(cw) &&
++              (WIN_HAS_FRAME(cw) || !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw)))))
+     {
+         XRectangle sr;
+ 
+@@ -1083,7 +1084,7 @@
+         XCompositeUnredirectWindow (display_info->dpy, cw->id, display_info->composite_mode);
+         XSync (display_info->dpy, FALSE);
+ 
+-        TRACE ("Window 0x%lx unredirected, overlays is %i", cw->id, screen_info->overlays);
++        TRACE ("Window 0x%lx unredirected, wins_unredirected is %i", cw->id, screen_info->wins_unredirected);
+     }
+ }
+ 
+@@ -1124,11 +1125,11 @@
+                                          * screen_info->params->frame_opacity
+                                          / (NET_WM_OPAQUE * 100.0);
+ 
+-                cw->alphaBorderPict = solid_picture (screen_info, 
+-                                                     FALSE, 
+-                                                     frame_opacity, 
+-                                                     0.0, /* red   */ 
+-                                                     0.0, /* green */ 
++                cw->alphaBorderPict = solid_picture (screen_info,
++                                                     FALSE,
++                                                     frame_opacity,
++                                                     0.0, /* red   */
++                                                     0.0, /* green */
+                                                      0.0  /* blue  */);
+             }
+ 
+@@ -1226,7 +1227,6 @@
+     gint screen_width;
+     gint screen_height;
+     gint screen_number;
+-    Window xroot;
+     CWindow *cw;
+ 
+     TRACE ("entering paint_all");
+@@ -1237,7 +1237,6 @@
+     screen_width = screen_info->width;
+     screen_height = screen_info->height;
+     screen_number = screen_info->screen;
+-    xroot = screen_info->xroot;
+ 
+     /* Create root buffer if not done yet */
+     if (screen_info->rootBuffer == None)
+@@ -1355,9 +1354,9 @@
+             if ((cw->opacity != NET_WM_OPAQUE) && !(cw->alphaPict))
+             {
+                 cw->alphaPict = solid_picture (screen_info, FALSE,
+-                                               (double) cw->opacity / NET_WM_OPAQUE,  
+-                                               0.0, /* red   */ 
+-                                               0.0, /* green */ 
++                                               (double) cw->opacity / NET_WM_OPAQUE,
++                                               0.0, /* red   */
++                                               0.0, /* green */
+                                                0.0  /* blue  */);
+             }
+             XFixesIntersectRegion (dpy, cw->borderClip, cw->borderClip, cw->borderSize);
+@@ -1755,28 +1754,43 @@
+ map_win (CWindow *cw)
+ {
+     ScreenInfo *screen_info;
++    DisplayInfo *display_info;
+ 
+     g_return_if_fail (cw != NULL);
+-    TRACE ("entering map_win 0x%lx", cw->id);
++    TRACE ("entering map_win 0x%lx\n", cw->id);
+ 
+-    cw->viewable = TRUE;
+-    cw->damaged = FALSE;
++    screen_info = cw->screen_info;
++    display_info = screen_info->display_info;
+ 
+-    screen_info = cw->screen_info;
+     if (!WIN_IS_REDIRECTED(cw))
+     {
+-        screen_info->overlays++;
+-        TRACE ("Mapping unredirected window 0x%lx, overlays increased to %i", cw->id, screen_info->overlays);
++        /* To be safe, we count only the fullscreen overlays */
++        if (WIN_IS_FULLSCREEN(cw) && WIN_IS_VIEWABLE (cw))
++        {
++            screen_info->wins_unredirected++;
++        }
++#if HAVE_OVERLAYS
++        if ((screen_info->wins_unredirected == 1) && (display_info->have_overlays))
++        {
++            TRACE ("Unmapping overlay window");
++            XUnmapWindow (myScreenGetXDisplay (screen_info), screen_info->overlay);
++        }
++#endif /* HAVE_OVERLAYS */
++        TRACE ("Mapping unredirected window 0x%lx, wins_unredirected increased to %i", cw->id, screen_info->wins_unredirected);
+         return;
+     }
++
++    cw->viewable = TRUE;
++    cw->damaged = FALSE;
++
+     if (!screen_info->params->unredirect_overlays)
+     {
+-        TRACE ("Not unredirecting overlays");
++        TRACE ("Not unredirecting wins_unredirected");
+         return;
+     }
+ 
+     /* Check for new windows to un-redirect. */
+-    if (WIN_IS_FULLSCREEN(cw) && WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
++    if ((WIN_IS_FULLSCREEN(cw) || (screen_info->wins_unredirected > 0)) && WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
+         WIN_IS_NATIVE_OPAQUE(cw) && WIN_IS_REDIRECTED(cw) && !WIN_IS_SHAPED(cw))
+     {
+         CWindow *top;
+@@ -1797,31 +1811,37 @@
+ unmap_win (CWindow *cw)
+ {
+     ScreenInfo *screen_info;
++    DisplayInfo *display_info;
+ 
+     g_return_if_fail (cw != NULL);
+     TRACE ("entering unmap_win 0x%lx", cw->id);
+ 
+     screen_info = cw->screen_info;
+-    if (!WIN_IS_REDIRECTED(cw) && (screen_info->overlays > 0))
+-    {
+-        screen_info->overlays--;
+-        TRACE ("Unmapped window 0x%lx, overlays decreased to %i", cw->id, screen_info->overlays);
+-    }
++    display_info = screen_info->display_info;
+ 
+-    if (!screen_info->overlays)
++    if (!WIN_IS_REDIRECTED(cw) && WIN_IS_FULLSCREEN(cw) && (screen_info->wins_unredirected > 0))
+     {
+-        /* Repaint immediately if that was the last unredirected window */
+-
+-        if (!WIN_IS_REDIRECTED(cw))
++        screen_info->wins_unredirected--;
++        TRACE ("Unmapped window 0x%lx, wins_unredirected decreased to %i", cw->id, screen_info->wins_unredirected);
++        if (!screen_info->wins_unredirected)
+         {
++            /* Restore the overlay if that was the last unredirected window */
++#if HAVE_OVERLAYS
++            if (display_info->have_overlays)
++            {
++                TRACE ("Remapping overlay window");
++                XMapWindow (myScreenGetXDisplay (screen_info), screen_info->overlay);
++            }
++#endif /* HAVE_OVERLAYS */
+             damage_screen (screen_info);
+             repair_screen (screen_info);
+-        }
+-        else if (WIN_IS_VISIBLE(cw))
+-        {
+-            damage_win (cw);
+-        }
++       }
+     }
++    else if (WIN_IS_VISIBLE(cw))
++    {
++        damage_win (cw);
++    }
++
+     cw->viewable = FALSE;
+     cw->damaged = FALSE;
+     free_win_data (cw, FALSE);
+@@ -1925,7 +1945,11 @@
+     new->shaped = is_shaped (display_info, id);
+     new->viewable = (new->attr.map_state == IsViewable);
+ 
+-    if ((new->attr.class != InputOnly) && (id != screen_info->xroot))
++    if ((new->attr.class != InputOnly)
++#if HAVE_OVERLAYS
++         && ((!display_info->have_overlays) || (id != screen_info->overlay))
++#endif
++         && (id != screen_info->output))
+     {
+         new->damage = XDamageCreate (display_info->dpy, id, XDamageReportNonEmpty);
+     }
+@@ -2122,7 +2146,10 @@
+     {
+         ScreenInfo *screen_info;
+ 
+-        unmap_win (cw);
++        if (WIN_IS_VIEWABLE (cw))
++        {
++            unmap_win (cw);
++        }
+         screen_info = cw->screen_info;
+         screen_info->cwindows = g_list_remove (screen_info->cwindows, (gconstpointer) cw);
+ 
+@@ -2184,7 +2211,7 @@
+             ScreenInfo *screen_info = myDisplayGetScreenFromRoot (display_info, ev->window);
+             if ((screen_info) && (screen_info->rootTile))
+             {
+-                XClearArea (display_info->dpy, screen_info->xroot, 0, 0, 0, 0, TRUE);
++                XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE);
+                 XRenderFreePicture (display_info->dpy, screen_info->rootTile);
+                 screen_info->rootTile = None;
+                 add_repair (display_info);
+@@ -2413,7 +2440,10 @@
+     cw = find_cwindow_in_display (display_info, ev->window);
+     if (cw)
+     {
+-        unmap_win (cw);
++        if (WIN_IS_VIEWABLE (cw))
++        {
++            unmap_win (cw);
++        }
+     }
+ }
+ 
+@@ -2650,10 +2680,11 @@
+ compositorInitDisplay (DisplayInfo *display_info)
+ {
+ #ifdef HAVE_COMPOSITOR
+-#if HAVE_NAME_WINDOW_PIXMAP
+     int composite_major, composite_minor;
+-#endif
+ 
++    composite_major = 0;
++    composite_minor = 0;
++
+     if (!XCompositeQueryExtension (display_info->dpy,
+                                 &display_info->composite_event_base,
+                                 &display_info->composite_error_base))
+@@ -2666,9 +2697,11 @@
+     else
+     {
+         display_info->have_composite = TRUE;
++        XCompositeQueryVersion (display_info->dpy, &composite_major, &composite_minor);
+ #if DEBUG
+         g_print ("composite event base: %i\n", display_info->composite_event_base);
+         g_print ("composite error base: %i\n", display_info->composite_error_base);
++        g_print ("composite version: %i.%i\n", composite_major, composite_minor);
+ #endif
+     }
+ 
+@@ -2705,7 +2738,7 @@
+ #if DEBUG
+         g_print ("fixes event base: %i\n", display_info->fixes_event_base);
+         g_print ("fixes error base: %i\n", display_info->fixes_error_base);
+-#endif
++#endif /* DEBUG */
+     }
+ 
+     display_info->compositor_idle_id = 0;
+@@ -2723,12 +2756,15 @@
+ 
+     display_info->composite_mode = 0;
+ #if HAVE_NAME_WINDOW_PIXMAP
+-    XCompositeQueryVersion (display_info->dpy, &composite_major, &composite_minor);
+     display_info->have_name_window_pixmap = ((composite_major > 0) || (composite_minor >= 2));
+-#else
++#else  /* HAVE_NAME_WINDOW_PIXMAP */
+     display_info->have_name_window_pixmap = FALSE;
+-#endif
++#endif /* HAVE_NAME_WINDOW_PIXMAP */
+ 
++#if HAVE_OVERLAYS
++    display_info->have_overlays = ((composite_major > 0) || (composite_minor >= 3));
++#endif /* HAVE_OVERLAYS */
++
+ #else /* HAVE_COMPOSITOR */
+     display_info->enable_compositor = FALSE;
+ #endif /* HAVE_COMPOSITOR */
+@@ -2792,8 +2828,38 @@
+         return FALSE;
+     }
+ 
++    screen_info->output = screen_info->xroot;
++#if HAVE_OVERLAYS
++    if (display_info->have_overlays)
++    {
++        screen_info->overlay = XCompositeGetOverlayWindow (display_info->dpy, screen_info->xroot);
++        if (screen_info->overlay != None)
++        {
++            XSetWindowAttributes attributes;
++
++            screen_info->root_overlay = XCreateWindow (display_info->dpy, screen_info->overlay,
++                                                       0, 0, screen_info->width, screen_info->height, 0, screen_info->depth,
++                                                       InputOutput, screen_info->visual, 0, &attributes);
++            XMapWindow (display_info->dpy, screen_info->root_overlay);
++            XRaiseWindow (display_info->dpy, screen_info->overlay);
++            XShapeCombineRectangles (display_info->dpy, screen_info->overlay,
++                                     ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted);
++            XShapeCombineRectangles (display_info->dpy, screen_info->root_overlay,
++                                     ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted);
++            screen_info->output = screen_info->root_overlay;
++            TRACE ("Overlay enabled");
++        }
++        else
++        {
++            /* Something is wrong with overlay support */
++            TRACE ("Cannot get root window overlay, overlay support disabled");
++            display_info->have_overlays = FALSE;
++        }
++    }
++#endif /* HAVE_OVERLAYS */
++
+     pa.subwindow_mode = IncludeInferiors;
+-    screen_info->rootPicture = XRenderCreatePicture (display_info->dpy, screen_info->xroot,
++    screen_info->rootPicture = XRenderCreatePicture (display_info->dpy, screen_info->output,
+                                                      visual_format, CPSubwindowMode, &pa);
+ 
+     if (screen_info->rootPicture == None)
+@@ -2807,19 +2873,19 @@
+     presum_gaussian (screen_info);
+     screen_info->rootBuffer = None;
+     /* Change following argb values to play with shadow colors */
+-    screen_info->blackPicture = solid_picture (screen_info, 
+-                                               TRUE, 
+-                                               1.0, /* alpha */ 
+-                                               0.0, /* red   */ 
+-                                               0.0, /* green */ 
++    screen_info->blackPicture = solid_picture (screen_info,
++                                               TRUE,
++                                               1.0, /* alpha */
++                                               0.0, /* red   */
++                                               0.0, /* green */
+                                                0.0  /* blue  */);
+     screen_info->rootTile = None;
+     screen_info->allDamage = None;
+     screen_info->cwindows = NULL;
+     screen_info->compositor_active = TRUE;
+-    screen_info->overlays = 0;
++    screen_info->wins_unredirected = 0;
+ 
+-    XClearArea (display_info->dpy, screen_info->xroot, 0, 0, 0, 0, TRUE);
++    XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE);
+     compositorSetCMSelection (screen_info, screen_info->xfwm4_win);
+     TRACE ("Manual compositing enabled");
+ 
+@@ -2864,6 +2930,17 @@
+     screen_info->cwindows = NULL;
+     TRACE ("Compositor: removed %i window(s) remaining", i);
+ 
++#if HAVE_OVERLAYS
++    if (display_info->have_overlays)
++    {
++        XDestroyWindow (display_info->dpy, screen_info->root_overlay);
++        screen_info->root_overlay = None;
++
++        XCompositeReleaseOverlayWindow (display_info->dpy, screen_info->overlay);
++        screen_info->overlay = None;
++    }
++#endif /* HAVE_OVERLAYS */
++
+     if (screen_info->rootPicture)
+     {
+         XRenderFreePicture (display_info->dpy, screen_info->rootPicture);
+@@ -2894,7 +2971,7 @@
+     }
+ 
+     screen_info->gaussianSize = -1;
+-    screen_info->overlays = 0;
++    screen_info->wins_unredirected = 0;
+ 
+     XCompositeUnredirectSubwindows (display_info->dpy, screen_info->xroot,
+                                     display_info->composite_mode);
+Index: xfce_4_4/src/screen.h
+===================================================================
+--- xfce_4_4/src/screen.h	(revision 26690)
++++ xfce_4_4/src/screen.h	(revision 26691)
+@@ -133,8 +133,14 @@
+ #endif
+ 
+ #ifdef HAVE_COMPOSITOR
++#if HAVE_OVERLAYS
++    Window overlay;
++    Window root_overlay;
++#endif
+     GList *cwindows;
++    Window output;
+ 
++
+     gaussian_conv *gaussianMap;
+     gint gaussianSize;
+     guchar *shadowCorner;
+@@ -146,7 +152,7 @@
+     Picture rootTile;
+     XserverRegion allDamage;
+ 
+-    guint overlays;
++    guint wins_unredirected;
+     gboolean compositor_active;
+     gboolean clipChanged;
+ #endif /* HAVE_COMPOSITOR */

Deleted: desktop/trunk/xfwm4/debian/patches/04_exit-on-selectionclear.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/04_exit-on-selectionclear.patch	2008-05-17 14:44:40 UTC (rev 2027)
+++ desktop/trunk/xfwm4/debian/patches/04_exit-on-selectionclear.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -1,237 +0,0 @@
-Index: xfce_4_4/src/events.c
-===================================================================
---- xfce_4_4/src/events.c	(revision 26584)
-+++ xfce_4_4/src/events.c	(revision 26585)
-@@ -71,7 +71,7 @@
-                                  PointerMotionMask | \
-                                  ButtonPressMask | \
-                                  ButtonReleaseMask)
--                  
-+
- #define MODIFIER_MASK           (ShiftMask | \
-                                  ControlMask | \
-                                  AltMask | \
-@@ -238,7 +238,7 @@
-     passdata.ycurrent = passdata.y;
-     passdata.clicks = 1;
-     passdata.allow_double_click = allow_double_click;
--    passdata.timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, 
-+    passdata.timeout = g_timeout_add_full (G_PRIORITY_DEFAULT,
-                                            display_info->dbl_click_time,
-                                            (GtkFunction) typeOfClick_break,
-                                            (gpointer) &passdata, NULL);
-@@ -304,9 +304,9 @@
-     {
-         g_source_remove (raise_timeout);
-     }
--    raise_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, 
--                                        screen_info->params->raise_delay, 
--                                        (GtkFunction) raise_cb, 
-+    raise_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT,
-+                                        screen_info->params->raise_delay,
-+                                        (GtkFunction) raise_cb,
-                                         NULL, NULL);
- }
- 
-@@ -487,13 +487,13 @@
-                 }
-                 break;
-             case KEY_POPUP_MENU:
--                /* 
--                   We need to release the events here prior to grabbing 
-+                /*
-+                   We need to release the events here prior to grabbing
-                    the keyboard in gtk menu otherwise we end with a dead lock...
-                   */
-                 XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
--                show_window_menu (c, frameX (c) + frameLeft (c), 
--                                     frameY (c) + frameTop (c), 
-+                show_window_menu (c, frameX (c) + frameLeft (c),
-+                                     frameY (c) + frameTop (c),
-                                      Button1, GDK_CURRENT_TIME);
-                 /* 'nuff for now */
-                 return;
-@@ -620,7 +620,7 @@
-     }
- }
- 
--static int 
-+static int
- edgeGetPart (Client *c, XButtonEvent * ev)
- {
-     int part, x_corner_pixels, y_corner_pixels, x_distance, y_distance;
-@@ -1432,22 +1432,22 @@
-             constrained = TRUE;
-         }
- 
--        /* 
--           Let's say that if the client performs a XRaiseWindow, we show the window if focus 
-+        /*
-+           Let's say that if the client performs a XRaiseWindow, we show the window if focus
-            stealing prevention is not activated, otherwise we just set the "demands attention"
-            flag...
-          */
-         if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) && (wc.sibling == None))
-         {
-             Client *last_raised;
--            
-+
-             last_raised = clientGetLastRaise (screen_info);
-             if (last_raised && (c != last_raised))
-             {
-                 if ((screen_info->params->prevent_focus_stealing) && (screen_info->params->activate_action == ACTIVATE_ACTION_NONE))
-                 {
-                     ev->value_mask &= ~(CWSibling | CWStackMode);
--                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); 
-+                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
-                     FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
-                     clientSetNetState (c);
-                 }
-@@ -1680,10 +1680,10 @@
-     }
- 
-     if ((ev->window == screen_info->xroot)
--        && ((ev->detail == NotifyDetailNone) 
-+        && ((ev->detail == NotifyDetailNone)
-             || ((ev->mode == NotifyNormal) && (ev->detail == NotifyInferior))))
-     {
--        /* 
-+        /*
-            Handle unexpected focus transition to root (means that an unknown
-            window has vanished and the focus is returned to the root).
-          */
-@@ -1710,10 +1710,10 @@
-         clientUpdateFocus (screen_info, c, FOCUS_SORT);
-         if ((user_focus != c) && (user_focus != NULL))
-         {
--            /* 
-+            /*
-                Focus stealing prevention:
--               Some apps tend to focus the window directly. If focus stealing prevention is enabled, 
--               we revert the user set focus to the window that we think has focus and then set the 
-+               Some apps tend to focus the window directly. If focus stealing prevention is enabled,
-+               we revert the user set focus to the window that we think has focus and then set the
-                demand attention flag.
- 
-                Note that focus stealing prevention is ignored between windows of the same group or
-@@ -1725,12 +1725,12 @@
-                 !clientSameGroup (c, user_focus) &&
-                 !clientIsTransientOrModalFor (c, user_focus))
-             {
--                TRACE ("Setting focus back to \"%s\" (0x%lx)", user_focus->name, user_focus->window); 
-+                TRACE ("Setting focus back to \"%s\" (0x%lx)", user_focus->name, user_focus->window);
-                 clientSetFocus (user_focus->screen_info, user_focus, getXServerTime (display_info), NO_FOCUS_FLAG);
- 
-                 if (current_focus)
-                 {
--                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); 
-+                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
-                     FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
-                     clientSetNetState (c);
-                 }
-@@ -1779,7 +1779,7 @@
-                 "NotifyDetailNone" :
-                 "(unknown)");
- 
--    if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab) || 
-+    if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab) ||
-         (ev->detail == NotifyInferior) || (ev->detail > NotifyNonlinearVirtual))
-     {
-         /* We're not interested in such notifications */
-@@ -1871,19 +1871,19 @@
-             if (clientCheckTransientWindow (c, w))
-             {
-                 c->transient_for = w;
--#if 0                
-+#if 0
-                 /*
-                   Java 1.6 updates the WM_TRANSIENT_FOR properties "on-the-fly"
--                  of its windows to maintain the z-order. 
--                  
--                  If we raise the transient then, we clearly have a race 
--                  condition between the WM and Java... And that breaks 
-+                  of its windows to maintain the z-order.
-+
-+                  If we raise the transient then, we clearly have a race
-+                  condition between the WM and Java... And that breaks
-                   the z-order. Bug #2483.
--                  
-+
-                   I still think that raising here makes sense, to ensure
-                   that the newly promoted transient window is placed above
-                   its parent.
--                  
-+
-                   Chances are that Java 1.6 won't change any time soon (heh,
-                   it's not even released yet), so let's adjust the WM to
-                   work with Java 1.6...
-@@ -2105,7 +2105,7 @@
-                 TRACE ("Time of event received is %u, current XServer time is %u", (unsigned int) ev_time, (unsigned int) current);
-                 if ((screen_info->params->prevent_focus_stealing) && TIMESTAMP_IS_BEFORE(ev_time, current))
-                 {
--                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); 
-+                    TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
-                     FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
-                     clientSetNetState (c);
-                 }
-@@ -2139,10 +2139,10 @@
-              (ev->message_type == display_info->atoms[NET_CURRENT_DESKTOP])) && (ev->format == 32))
-         {
-             TRACE ("root has received a win_workspace or a NET_CURRENT_DESKTOP event %li", ev->data.l[0]);
--            if ((ev->data.l[0] >= 0) && (ev->data.l[0] < screen_info->workspace_count) && 
-+            if ((ev->data.l[0] >= 0) && (ev->data.l[0] < screen_info->workspace_count) &&
-                 (ev->data.l[0] != screen_info->current_ws))
-             {
--                workspaceSwitch (screen_info, ev->data.l[0], NULL, TRUE, 
-+                workspaceSwitch (screen_info, ev->data.l[0], NULL, TRUE,
-                                  myDisplayGetTime (display_info, (Time) ev->data.l[1]));
-             }
-         }
-@@ -2176,10 +2176,10 @@
-         else if ((ev->message_type == display_info->atoms[MANAGER]) && (ev->format == 32))
-         {
-             Atom selection;
--            
-+
-             TRACE ("window (0x%lx) has received a MANAGER event", ev->window);
-             selection = (Atom) ev->data.l[1];
--            
-+
- #ifdef ENABLE_KDE_SYSTRAY_PROXY
-             if (selection == screen_info->net_system_tray_selection)
-             {
-@@ -2202,6 +2202,24 @@
- }
- 
- static void
-+handleSelectionClear (DisplayInfo *display_info, XSelectionClearEvent * ev)
-+{
-+    ScreenInfo *screen_info;
-+
-+    TRACE ("entering handleSelectionClear");
-+
-+    screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
-+    if (screen_info)
-+    {
-+        if (myScreenCheckWMAtom (screen_info, ev->selection))
-+        {
-+            TRACE ("root has received a WM_Sn selection event");
-+            display_info->quit = TRUE;
-+        }
-+    }
-+}
-+
-+static void
- handleShape (DisplayInfo *display_info, XShapeEvent * ev)
- {
-     Client *c;
-@@ -2366,6 +2384,9 @@
-         case ClientMessage:
-             handleClientMessage (display_info, (XClientMessageEvent *) ev);
-             break;
-+        case SelectionClear:
-+            handleSelectionClear (display_info, (XSelectionClearEvent *) ev);
-+            break;
-         case ColormapNotify:
-             handleColormapNotify (display_info, (XColormapEvent *) ev);
-             break;

Added: desktop/trunk/xfwm4/debian/patches/04_fix-automaximize-on-move.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/04_fix-automaximize-on-move.patch	                        (rev 0)
+++ desktop/trunk/xfwm4/debian/patches/04_fix-automaximize-on-move.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -0,0 +1,95 @@
+Index: xfce_4_4/src/placement.c
+===================================================================
+--- xfce_4_4/src/placement.c	(revision 26965)
++++ xfce_4_4/src/placement.c	(revision 26966)
+@@ -390,7 +390,7 @@
+             frame_y = frameY (c);
+             ret |= CLIENT_CONSTRAINED_BOTTOM;
+         }
+-        if ((frame_y < disp_y) && (frame_y >= disp_y - frame_top))
++        if ((frame_y <= disp_y) && (frame_y >= disp_y - frame_top))
+         {
+             c->y = disp_y + frame_top;
+             frame_y = frameY (c);
+Index: xfce_4_4/src/client.c
+===================================================================
+--- xfce_4_4/src/client.c	(revision 26965)
++++ xfce_4_4/src/client.c	(revision 26966)
+@@ -3630,6 +3630,7 @@
+         {
+             int key_move = 16;
+             unsigned int edge;
++            int direction = 0;
+ 
+             if ((screen_info->params->snap_to_border) || (screen_info->params->snap_to_windows))
+             {
+@@ -3648,18 +3649,22 @@
+             }
+             if (xevent->xkey.keycode == screen_info->params->keys[KEY_MOVE_LEFT].keycode)
+             {
++                direction = KEY_MOVE_LEFT;
+                 c->x = c->x - key_move;
+             }
+             else if (xevent->xkey.keycode == screen_info->params->keys[KEY_MOVE_RIGHT].keycode)
+             {
++                direction = KEY_MOVE_RIGHT;
+                 c->x = c->x + key_move;
+             }
+             else if (xevent->xkey.keycode == screen_info->params->keys[KEY_MOVE_UP].keycode)
+             {
++                direction = KEY_MOVE_UP;
+                 c->y = c->y - key_move;
+             }
+             else if (xevent->xkey.keycode == screen_info->params->keys[KEY_MOVE_DOWN].keycode)
+             {
++                direction = KEY_MOVE_DOWN;
+                 c->y = c->y + key_move;
+             }
+ 
+@@ -3675,14 +3680,14 @@
+                 maxh = screen_info->height;
+                 clientMaxSpace (screen_info, &maxx, &maxy, &maxw, &maxh);
+ 
+-                if (edge & CLIENT_CONSTRAINED_TOP)
++                if ((edge & CLIENT_CONSTRAINED_TOP) && (direction == KEY_MOVE_UP))
+                 {
+                     if (workspaceMove (screen_info, -1, 0, c, xevent->xkey.time))
+                     {
+                         c->y = maxy + maxh;
+                     }
+                 }
+-                else if (edge & CLIENT_CONSTRAINED_BOTTOM)
++                else if ((edge & CLIENT_CONSTRAINED_BOTTOM) && (direction == KEY_MOVE_DOWN))
+                 {
+                     if (workspaceMove (screen_info, 1, 0, c, xevent->xkey.time))
+                     {
+@@ -3690,14 +3695,14 @@
+                     }
+                 }
+ 
+-                if (edge & CLIENT_CONSTRAINED_LEFT)
++                if ((edge & CLIENT_CONSTRAINED_LEFT) && (direction == KEY_MOVE_LEFT))
+                 {
+                     if (workspaceMove (screen_info, 0, -1, c, xevent->xkey.time))
+                     {
+                         c->x = maxx + maxw - frameWidth (c) + frameRight (c);
+                     }
+                 }
+-                else if (edge & CLIENT_CONSTRAINED_RIGHT)
++                else if ((edge & CLIENT_CONSTRAINED_RIGHT) && (direction == KEY_MOVE_RIGHT))
+                 {
+                     if (workspaceMove (screen_info, 0, 1, c, xevent->xkey.time))
+                     {
+Index: xfce_4_4/NEWS
+===================================================================
+--- xfce_4_4/NEWS	(revision 26965)
++++ xfce_4_4/NEWS	(revision 26966)
+@@ -1,3 +1,8 @@
++4.4.3
++=====
++
++- Fix automaximize on move
++
+ 4.4.2
+ =====
+ 

Added: desktop/trunk/xfwm4/debian/patches/05_awn-focus.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/05_awn-focus.patch	                        (rev 0)
+++ desktop/trunk/xfwm4/debian/patches/05_awn-focus.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -0,0 +1,13 @@
+Index: xfwm4/src/events.c
+===================================================================
+--- xfwm4/src/events.c	(revision 26059)
++++ xfwm4/src/events.c	(revision 26060)
+@@ -1430,7 +1430,7 @@
+            stealing prevention is not activated, otherwise we just set the "demands attention"
+            flag...
+          */
+-        if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) && (wc.sibling == None))
++        if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) && (wc.sibling == None) && !(c->type & WINDOW_TYPE_DONT_FOCUS))
+         {
+             Client *last_raised;
+ 

Deleted: desktop/trunk/xfwm4/debian/patches/05_filter-grab-ungrab-events.patch
===================================================================
--- desktop/trunk/xfwm4/debian/patches/05_filter-grab-ungrab-events.patch	2008-05-17 14:44:40 UTC (rev 2027)
+++ desktop/trunk/xfwm4/debian/patches/05_filter-grab-ungrab-events.patch	2008-05-17 14:53:26 UTC (rev 2028)
@@ -1,190 +0,0 @@
-Index: xfce_4_4/src/client.c
-===================================================================
---- xfce_4_4/src/client.c	(revision 26362)
-+++ xfce_4_4/src/client.c	(revision 26363)
-@@ -121,7 +121,7 @@
- };
- 
- /* Forward decl */
--static void 
-+static void
- clientUpdateIconPix (Client * c);
- 
- Display *
-@@ -348,8 +348,8 @@
-         if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
-         {
-             c->blink_timeout_id =
--                g_timeout_add_full (G_PRIORITY_DEFAULT, 
--                                    CLIENT_BLINK_TIMEOUT, 
-+                g_timeout_add_full (G_PRIORITY_DEFAULT,
-+                                    CLIENT_BLINK_TIMEOUT,
-                                     (GtkFunction) urgent_cb,
-                                     (gpointer) c, NULL);
-         }
-@@ -1183,11 +1183,11 @@
-     values.events = True;
- 
-     c->xsync_alarm = XSyncCreateAlarm (display_info->dpy,
--                                       XSyncCACounter | 
--                                       XSyncCADelta | 
--                                       XSyncCAEvents | 
--                                       XSyncCATestType | 
--                                       XSyncCAValue | 
-+                                       XSyncCACounter |
-+                                       XSyncCADelta |
-+                                       XSyncCAEvents |
-+                                       XSyncCATestType |
-+                                       XSyncCAValue |
-                                        XSyncCAValueType,
-                                        &values);
-     return (c->xsync_alarm != None);
-@@ -1258,9 +1258,9 @@
-     TRACE ("entering clientXSyncResetTimeout");
- 
-     clientXSyncClearTimeout (c);
--    c->xsync_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 
--                                              CLIENT_XSYNC_TIMEOUT, 
--                                              (GtkFunction) clientXSyncTimeout, 
-+    c->xsync_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT,
-+                                              CLIENT_XSYNC_TIMEOUT,
-+                                              (GtkFunction) clientXSyncTimeout,
-                                               (gpointer) c, NULL);
- }
- 
-@@ -1634,7 +1634,7 @@
- update_icon_idle_cb (gpointer data)
- {
-     Client *c;
--    
-+
-     TRACE ("entering update_icon_idle_cb");
- 
-     c = (Client *) data;
-@@ -1659,7 +1659,7 @@
- 
-     if (c->icon_timeout_id == 0)
-     {
--        c->icon_timeout_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, 
-+        c->icon_timeout_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
-                                               update_icon_idle_cb, c, NULL);
-     }
- }
-@@ -1925,7 +1925,7 @@
-         }
-     }
- 
--    /* 
-+    /*
-        Initialize "old" fields once the position is ensured, to avoid
-        initially maximized or fullscreen windows being placed offscreen
-        once de-maximized
-@@ -2590,7 +2590,7 @@
-         for (index = screen_info->windows_stack; index; index = g_list_next (index))
-         {
-             Client *c = (Client *) index->data;
--            if ((c->type & WINDOW_REGULAR_FOCUSABLE) 
-+            if ((c->type & WINDOW_REGULAR_FOCUSABLE)
-                 && !FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED | CLIENT_FLAG_SKIP_TASKBAR))
-             {
-                 FLAG_SET (c->xfwm_flags, XFWM_FLAG_WAS_SHOWN);
-@@ -2643,7 +2643,7 @@
-     }
-     else
-     {
--        TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window); 
-+        TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
-         FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
-         clientSetNetState (c);
-     }
-@@ -2779,7 +2779,7 @@
-             wc.y = c->y;
-             mask |= (CWX | CWY);
-         }
--        
-+
-         if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
-         {
-             c->ignore_unmap++;
-@@ -4064,7 +4064,7 @@
- 
-     g1 = myScreenGrabKeyboard (screen_info, myDisplayGetCurrentTime (display_info));
-     g2 = myScreenGrabPointer (screen_info, ButtonMotionMask | ButtonReleaseMask,
--                              myDisplayGetCursorMove (display_info), 
-+                              myDisplayGetCursorMove (display_info),
-                               myDisplayGetCurrentTime (display_info));
-     if (!g1 || !g2)
-     {
-@@ -4470,7 +4470,7 @@
-                 || (!clientCkeckTitle (c) && (frame_y < screen_info->margins [STRUTS_TOP])))
-             {
-                 temp = c->y + c->height;
--                c->y = CLAMP (c->y, screen_info->margins [STRUTS_TOP] + frame_top, 
-+                c->y = CLAMP (c->y, screen_info->margins [STRUTS_TOP] + frame_top,
-                          MAX (disp_max_y - min_visible,  screen_info->height - screen_info->margins [STRUTS_BOTTOM] - min_visible));
-                 clientSetHeight (c, temp - c->y);
-                 c->y = temp - c->height;
-@@ -4956,32 +4956,39 @@
-     status = EVENT_FILTER_STOP;
-     pressed = TRUE;
- 
--    if (xevent->type == EnterNotify)
-+   switch (xevent->type)
-     {
--        c->button_pressed[b] = TRUE;
--        frameDraw (c, FALSE);
-+        case EnterNotify:
-+            if ((xevent->xcrossing.mode != NotifyGrab) && (xevent->xcrossing.mode != NotifyUngrab))
-+            {
-+                c->button_pressed[b] = TRUE;
-+                frameDraw (c, FALSE);
-+            }
-+            break;
-+        case LeaveNotify:
-+            if ((xevent->xcrossing.mode != NotifyGrab) && (xevent->xcrossing.mode != NotifyUngrab))
-+            {
-+                c->button_pressed[b] = FALSE;
-+                frameDraw (c, FALSE);
-+            }
-+            break;
-+        case ButtonRelease:
-+            pressed = FALSE;
-+            break;
-+        case UnmapNotify:
-+            if (xevent->xunmap.window == c->window)
-+            {
-+                pressed = FALSE;
-+                c->button_pressed[b] = FALSE;
-+            }
-+            break;
-+        case KeyPress:
-+        case KeyRelease:
-+            break;
-+        default:
-+            status = EVENT_FILTER_CONTINUE;
-+            break;
-     }
--    else if (xevent->type == LeaveNotify)
--    {
--        c->button_pressed[b] = FALSE;
--        frameDraw (c, FALSE);
--    }
--    else if (xevent->type == ButtonRelease)
--    {
--        pressed = FALSE;
--    }
--    else if ((xevent->type == UnmapNotify) && (xevent->xunmap.window == c->window))
--    {
--        pressed = FALSE;
--        c->button_pressed[b] = FALSE;
--    }
--    else if ((xevent->type == KeyPress) || (xevent->type == KeyRelease))
--    {
--    }
--    else
--    {
--        status = EVENT_FILTER_CONTINUE;
--    }
- 
-     if (!pressed)
-     {

Modified: desktop/trunk/xfwm4/debian/patches/series
===================================================================
--- desktop/trunk/xfwm4/debian/patches/series	2008-05-17 14:44:40 UTC (rev 2027)
+++ desktop/trunk/xfwm4/debian/patches/series	2008-05-17 14:53:26 UTC (rev 2028)
@@ -1,5 +1,5 @@
-01_awn-focus.patch
-02_fix-compositing-overlay.patch
-03_fix-automaximize-on-move.patch
-04_exit-on-selectionclear.patch
-05_filter-grab-ungrab-events.patch
+01_filter-grab-ungrab-events.patch
+02_exit-on-selectionclear.patch
+03_fix-compositing-overlay.patch
+04_fix-automaximize-on-move.patch
+05_awn-focus.patch




More information about the Pkg-xfce-commits mailing list