]> Dogcows Code - chaz/openbox/commitdiff
Merge branch 'backport' into work
authorDana Jansens <danakj@orodu.net>
Fri, 15 Feb 2008 15:02:07 +0000 (10:02 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 15 Feb 2008 15:03:55 +0000 (10:03 -0500)
Conflicts:

openbox/frame.c
openbox/menuframe.c

obt/prop.c
obt/prop.h
openbox/frame.c
openbox/menuframe.c

index 89d3950dbf810bfca2639e5090f35e492eaa4939..5fe0f730615f47e808bca59bd53c093621689913 100644 (file)
@@ -123,6 +123,7 @@ void obt_prop_startup()
     CREATE_(NET_WM_WINDOW_TYPE_SPLASH);
     CREATE_(NET_WM_WINDOW_TYPE_DIALOG);
     CREATE_(NET_WM_WINDOW_TYPE_NORMAL);
+    CREATE_(NET_WM_WINDOW_TYPE_POPUP_MENU);
 
     prop_atoms[OBT_PROP_NET_WM_MOVERESIZE_SIZE_TOPLEFT] = 0;
     prop_atoms[OBT_PROP_NET_WM_MOVERESIZE_SIZE_TOP] = 1;
index e1236116403faaedcb1abb53771f980bd7983dbf..97a2c9f57ed9a3a11858de78bd663292257b517c 100644 (file)
@@ -84,6 +84,8 @@ typedef enum {
     OBT_PROP_NET_WM_BOTTOMRIGHT,
     OBT_PROP_NET_WM_BOTTOMLEFT,
 
+    OBT_PROP_NET_WM_WINDOW_TYPE_POPUP_MENU,
+
     OBT_PROP_PRIVATE_PADDING1,
     OBT_PROP_PRIVATE_PADDING2,
     OBT_PROP_PRIVATE_PADDING3,
index 0975214cbf4ddef804dc7e849d49a9c171b4fec8..e8a532cc4feaba18152f14374d072f322b49b72d 100644 (file)
@@ -1690,7 +1690,7 @@ static gboolean frame_animate_iconify(gpointer p)
     g_get_current_time(&now);
     time = frame_animate_iconify_time_left(self, &now);
 
-    if (time == 0 || iconifying) {
+    if ((time > 0 && iconifying) || (time == 0 && !iconifying)) {
         /* start where the frame is supposed to be */
         x = self->area.x;
         y = self->area.y;
@@ -1721,12 +1721,11 @@ static gboolean frame_animate_iconify(gpointer p)
         h = self->size.top; /* just the titlebar */
     }
 
+    XMoveResizeWindow(obt_display, self->window, x, y, w, h);
+    XFlush(obt_display);
+
     if (time == 0)
         frame_end_iconify_animation(self);
-    else {
-        XMoveResizeWindow(obt_display, self->window, x, y, w, h);
-        XFlush(obt_display);
-    }
 
     return time > 0; /* repeat until we're out of time */
 }
index 730f23f7c00307567e19dcf0650d6776d5236793..867aa81c2b782d3606fcec4180d8108c817e971b 100644 (file)
@@ -25,6 +25,7 @@
 #include "grab.h"
 #include "openbox.h"
 #include "config.h"
+#include "obt/prop.h"
 #include "render/theme.h"
 
 #define PADDING 2
@@ -88,6 +89,10 @@ ObMenuFrame* menu_frame_new(ObMenu *menu, guint show_from, ObClient *client)
     self->window = createWindow(obt_root(ob_screen),
                                 CWEventMask, &attr);
 
+    /* make it a popup menu type window */
+    OBT_PROP_SET32(self->window, NET_WM_WINDOW_TYPE, ATOM,
+                   OBT_PROP_ATOM(NET_WM_WINDOW_TYPE_POPUP_MENU));
+
     XSetWindowBorderWidth(obt_display, self->window, ob_rr_theme->mbwidth);
     XSetWindowBorder(obt_display, self->window,
                      RrColorPixel(ob_rr_theme->menu_border_color));
This page took 0.030515 seconds and 4 git commands to generate.