Merge branch 'backport' into work
Conflicts: openbox/frame.c openbox/menuframe.c
This commit is contained in:
commit
db49122dec
4 changed files with 12 additions and 5 deletions
|
@ -123,6 +123,7 @@ void obt_prop_startup()
|
||||||
CREATE_(NET_WM_WINDOW_TYPE_SPLASH);
|
CREATE_(NET_WM_WINDOW_TYPE_SPLASH);
|
||||||
CREATE_(NET_WM_WINDOW_TYPE_DIALOG);
|
CREATE_(NET_WM_WINDOW_TYPE_DIALOG);
|
||||||
CREATE_(NET_WM_WINDOW_TYPE_NORMAL);
|
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_TOPLEFT] = 0;
|
||||||
prop_atoms[OBT_PROP_NET_WM_MOVERESIZE_SIZE_TOP] = 1;
|
prop_atoms[OBT_PROP_NET_WM_MOVERESIZE_SIZE_TOP] = 1;
|
||||||
|
|
|
@ -84,6 +84,8 @@ typedef enum {
|
||||||
OBT_PROP_NET_WM_BOTTOMRIGHT,
|
OBT_PROP_NET_WM_BOTTOMRIGHT,
|
||||||
OBT_PROP_NET_WM_BOTTOMLEFT,
|
OBT_PROP_NET_WM_BOTTOMLEFT,
|
||||||
|
|
||||||
|
OBT_PROP_NET_WM_WINDOW_TYPE_POPUP_MENU,
|
||||||
|
|
||||||
OBT_PROP_PRIVATE_PADDING1,
|
OBT_PROP_PRIVATE_PADDING1,
|
||||||
OBT_PROP_PRIVATE_PADDING2,
|
OBT_PROP_PRIVATE_PADDING2,
|
||||||
OBT_PROP_PRIVATE_PADDING3,
|
OBT_PROP_PRIVATE_PADDING3,
|
||||||
|
|
|
@ -1690,7 +1690,7 @@ static gboolean frame_animate_iconify(gpointer p)
|
||||||
g_get_current_time(&now);
|
g_get_current_time(&now);
|
||||||
time = frame_animate_iconify_time_left(self, &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 */
|
/* start where the frame is supposed to be */
|
||||||
x = self->area.x;
|
x = self->area.x;
|
||||||
y = self->area.y;
|
y = self->area.y;
|
||||||
|
@ -1721,12 +1721,11 @@ static gboolean frame_animate_iconify(gpointer p)
|
||||||
h = self->size.top; /* just the titlebar */
|
h = self->size.top; /* just the titlebar */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XMoveResizeWindow(obt_display, self->window, x, y, w, h);
|
||||||
|
XFlush(obt_display);
|
||||||
|
|
||||||
if (time == 0)
|
if (time == 0)
|
||||||
frame_end_iconify_animation(self);
|
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 */
|
return time > 0; /* repeat until we're out of time */
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "grab.h"
|
#include "grab.h"
|
||||||
#include "openbox.h"
|
#include "openbox.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "obt/prop.h"
|
||||||
#include "render/theme.h"
|
#include "render/theme.h"
|
||||||
|
|
||||||
#define PADDING 2
|
#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),
|
self->window = createWindow(obt_root(ob_screen),
|
||||||
CWEventMask, &attr);
|
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);
|
XSetWindowBorderWidth(obt_display, self->window, ob_rr_theme->mbwidth);
|
||||||
XSetWindowBorder(obt_display, self->window,
|
XSetWindowBorder(obt_display, self->window,
|
||||||
RrColorPixel(ob_rr_theme->menu_border_color));
|
RrColorPixel(ob_rr_theme->menu_border_color));
|
||||||
|
|
Loading…
Reference in a new issue