mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Removed titlebar drop shadow code and add plugin to draw text on titlebars.
This commit is contained in:
55
src/menu.c
55
src/menu.c
@@ -102,32 +102,35 @@ appearanceObserver(void *self, WMNotification *notif)
|
||||
int flags = (int)WMGetNotificationClientData(notif);
|
||||
|
||||
if (!menu->flags.realized)
|
||||
return;
|
||||
|
||||
return;
|
||||
|
||||
if (WMGetNotificationName(notif) == WNMenuAppearanceSettingsChanged) {
|
||||
if (flags & WFontSettings) {
|
||||
menu->flags.realized = 0;
|
||||
wMenuRealize(menu);
|
||||
}
|
||||
if (flags & WTextureSettings) {
|
||||
if (!menu->flags.brother)
|
||||
updateTexture(menu);
|
||||
}
|
||||
if (flags & (WTextureSettings|WColorSettings)) {
|
||||
wMenuPaint(menu);
|
||||
}
|
||||
if (flags & WFontSettings) {
|
||||
menu->flags.realized = 0;
|
||||
wMenuRealize(menu);
|
||||
}
|
||||
if (flags & WTextureSettings) {
|
||||
if (!menu->flags.brother)
|
||||
updateTexture(menu);
|
||||
}
|
||||
if (flags & (WTextureSettings|WColorSettings)) {
|
||||
wMenuPaint(menu);
|
||||
}
|
||||
} else if (menu->flags.titled) {
|
||||
|
||||
if (flags & WFontSettings) {
|
||||
menu->flags.realized = 0;
|
||||
wMenuRealize(menu);
|
||||
}
|
||||
if (flags & WTextureSettings) {
|
||||
menu->frame->flags.need_texture_remake = 1;
|
||||
}
|
||||
if (flags & (WColorSettings|WTextureSettings)) {
|
||||
wFrameWindowPaint(menu->frame);
|
||||
}
|
||||
if (flags & WFontSettings) {
|
||||
menu->flags.realized = 0;
|
||||
wMenuRealize(menu);
|
||||
}
|
||||
if (flags & WTextureSettings) {
|
||||
menu->frame->flags.need_texture_remake = 1;
|
||||
}
|
||||
if (flags & (WColorSettings|WTextureSettings)) {
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
XClearWindow(dpy, menu->frame->titlebar->window);
|
||||
#endif
|
||||
wFrameWindowPaint(menu->frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +174,11 @@ wMenuCreate(WScreen *screen, char *title, int main_menu)
|
||||
menu->frame =
|
||||
wFrameWindowCreate(screen, tmp, 8, 2, 1, 1, flags,
|
||||
screen->menu_title_texture, NULL,
|
||||
screen->menu_title_pixel, &screen->menu_title_gc,
|
||||
screen->menu_title_pixel,
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
W_STRING_MTITLE,
|
||||
#endif
|
||||
&screen->menu_title_gc,
|
||||
&screen->menu_title_font);
|
||||
|
||||
menu->frame->core->descriptor.parent = menu;
|
||||
|
||||
Reference in New Issue
Block a user