#include "client.h"
#include "menu.h"
#include "screen.h"
+#include "prop.h"
#include "actions.h"
#include "grab.h"
#include "openbox.h"
self->window = createWindow(RootWindow(ob_display, ob_screen),
CWEventMask, &attr);
+ /* make it a popup menu type window */
+ PROP_SET32(self->window, net_wm_window_type, atom,
+ prop_atoms.net_wm_window_type_popup_menu);
+
XSetWindowBorderWidth(ob_display, self->window, ob_rr_theme->mbwidth);
XSetWindowBorder(ob_display, self->window,
RrColorPixel(ob_rr_theme->menu_border_color));
static void menu_frame_place_submenu(ObMenuFrame *self, gint *x, gint *y)
{
- gint overlap;
+ gint overlapx, overlapy;
gint bwidth;
- overlap = ob_rr_theme->menu_overlap;
+ overlapx = ob_rr_theme->menu_overlap_x;
+ overlapy = ob_rr_theme->menu_overlap_y;
bwidth = ob_rr_theme->mbwidth;
if (self->direction_right)
*x = self->parent->area.x + self->parent->area.width -
- overlap - bwidth;
+ overlapx - bwidth;
else
- *x = self->parent->area.x - self->area.width + overlap + bwidth;
+ *x = self->parent->area.x - self->area.width + overlapx + bwidth;
*y = self->parent->area.y + self->parent_entry->area.y;
if (config_menu_middle)
*y -= (self->area.height - (bwidth * 2) - ITEM_HEIGHT) / 2;
else
- *y += overlap;
+ *y += overlapy;
}
void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y,
default:
g_assert_not_reached();
}
+
RECT_SET_SIZE(self->area, self->frame->inner_w, th);
XResizeWindow(ob_display, self->window,
self->area.width, self->area.height);
self->area.width - 2*PADDING, SEPARATOR_HEIGHT);
clear = ob_rr_theme->a_clear_tex;
+ RrAppearanceClearTextures(clear);
clear->texture[0].type = RR_TEXTURE_LINE_ART;
clear->surface.parent = item_a;
clear->surface.parentx = PADDING;
}
if (self->entry->type == OB_MENU_ENTRY_TYPE_NORMAL &&
- self->entry->data.normal.icon_data)
+ self->entry->data.normal.icon)
{
RrAppearance *clear;
- frame->item_margin.bottom);
clear = ob_rr_theme->a_clear_tex;
- clear->texture[0].type = RR_TEXTURE_RGBA;
- clear->texture[0].data.rgba.width =
- self->entry->data.normal.icon_width;
- clear->texture[0].data.rgba.height =
- self->entry->data.normal.icon_height;
- clear->texture[0].data.rgba.alpha =
+ RrAppearanceClearTextures(clear);
+ clear->texture[0].type = RR_TEXTURE_IMAGE;
+ clear->texture[0].data.image.image =
+ self->entry->data.normal.icon;
+ clear->texture[0].data.image.alpha =
self->entry->data.normal.icon_alpha;
- clear->texture[0].data.rgba.data =
- self->entry->data.normal.icon_data;
clear->surface.parent = item_a;
clear->surface.parentx = PADDING;
clear->surface.parenty = frame->item_margin.top;
- frame->item_margin.bottom);
clear = ob_rr_theme->a_clear_tex;
+ RrAppearanceClearTextures(clear);
clear->texture[0].type = RR_TEXTURE_MASK;
clear->texture[0].data.mask.mask =
self->entry->data.normal.mask;
tw = MIN(tw, MAX_MENU_WIDTH);
th = ob_rr_theme->menu_font_height;
- if (e->entry->data.normal.icon_data ||
+ if (e->entry->data.normal.icon ||
e->entry->data.normal.mask)
has_icon = TRUE;
break;
tw = MIN(tw, MAX_MENU_WIDTH);
th = ob_rr_theme->menu_font_height;
- if (e->entry->data.normal.icon_data ||
+ if (e->entry->data.normal.icon ||
e->entry->data.normal.mask)
has_icon = TRUE;