Merge branch 'backport' into work

Conflicts:

	openbox/frame.c
	openbox/menuframe.c
This commit is contained in:
Dana Jansens 2008-02-15 10:02:07 -05:00
commit db49122dec
4 changed files with 12 additions and 5 deletions

View 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;

View 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,

View 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 */
}

View 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));