diff --git a/src/client.c b/src/client.c index 6cf16ead501aa374f49339ecab1cda4e8b1895e3..c9693356b595da98110c7bf69fd7a367713c51cc 100644 --- a/src/client.c +++ b/src/client.c @@ -991,6 +991,10 @@ void clientUpdateAllFrames(int mask) clientUngrabKeys(c); clientGrabKeys(c); } + if(mask & UPDATE_CACHE) + { + clientClearPixmapCache(c); + } if(mask & UPDATE_GRAVITY) { clientGravitate(c, REMOVE); @@ -1003,7 +1007,7 @@ void clientUpdateAllFrames(int mask) } if(mask & UPDATE_FRAME) { - frameDraw(c); + frameDraw(c, FALSE); } } } @@ -1772,7 +1776,7 @@ static void _clientConfigure(Client * c, XWindowChanges * wc, int mask) if(mask & (CWWidth | CWHeight)) { - frameDraw(c); + frameDraw(c, FALSE); } if(mask) { @@ -1902,6 +1906,20 @@ static inline void clientFree(Client * c) free(c); } +void clientClearPixmapCache(Client *c) +{ + g_return_if_fail(c != NULL); + + freePixmap(dpy, &(c->pm_cache.pm_title[ACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_title[INACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_LEFT][ACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_LEFT][INACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_RIGHT][ACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_RIGHT][INACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_BOTTOM][ACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_BOTTOM][INACTIVE])); +} + void clientFrame(Window w) { XWindowAttributes attr; @@ -1966,6 +1984,18 @@ void clientFrame(Window w) c->border_width = attr.border_width; c->cmap = attr.colormap; + /* Initialize pixmap caching */ + initPixmap(&(c->pm_cache.pm_title[ACTIVE])); + initPixmap(&(c->pm_cache.pm_title[INACTIVE])); + initPixmap(&(c->pm_cache.pm_sides[SIDE_LEFT][ACTIVE])); + initPixmap(&(c->pm_cache.pm_sides[SIDE_LEFT][INACTIVE])); + initPixmap(&(c->pm_cache.pm_sides[SIDE_RIGHT][ACTIVE])); + initPixmap(&(c->pm_cache.pm_sides[SIDE_RIGHT][INACTIVE])); + initPixmap(&(c->pm_cache.pm_sides[SIDE_BOTTOM][ACTIVE])); + initPixmap(&(c->pm_cache.pm_sides[SIDE_BOTTOM][INACTIVE])); + c->pm_cache.previous_width = -1; + c->pm_cache.previous_height = -1; + for(i = 0; i < BUTTON_COUNT; i++) { c->button_pressed[i] = False; @@ -2127,12 +2157,12 @@ void clientFrame(Window w) } else { - frameDraw(c); + frameDraw(c, FALSE); } } else { - frameDraw(c); + frameDraw(c, FALSE); setWMState(dpy, c->window, IconicState); clientSetNetState(c); } @@ -2164,6 +2194,7 @@ void clientUnframe(Client * c, int remap) } XReparentWindow(dpy, c->window, root, c->x, c->y); XDestroyWindow(dpy, c->frame); + clientClearPixmapCache(c); clientRemoveFromList(c); if(CLIENT_FLAG_TEST(c, CLIENT_FLAG_HAS_STRUTS)) { @@ -2805,7 +2836,7 @@ void clientUpdateFocus(Client * c) if(c2) { DBG("redrawing previous focus client \"%s\" (%#lx)\n", c2->name, c2->window); - frameDraw(c2); + frameDraw(c2, FALSE); } data[1] = None; XChangeProperty(dpy, root, net_active_window, XA_WINDOW, 32, PropModeReplace, (unsigned char *)data, 2); @@ -2863,7 +2894,7 @@ void clientSetFocus(Client * c, int sort) if(c2) { DBG("redrawing previous focus client \"%s\" (%#lx)\n", c2->name, c2->window); - frameDraw(c2); + frameDraw(c2, FALSE); } data[1] = None; XChangeProperty(dpy, root, net_active_window, XA_WINDOW, 32, PropModeReplace, (unsigned char *)data, 2); @@ -3604,12 +3635,12 @@ static GtkToXEventFilterStatus clientButtonPress_event_filter(XEvent * xevent, g if(xevent->type == EnterNotify) { c->button_pressed[b] = True; - frameDraw(c); + frameDraw(c, FALSE); } else if(xevent->type == LeaveNotify) { c->button_pressed[b] = False; - frameDraw(c); + frameDraw(c, FALSE); } else if(xevent->type == ButtonRelease) { @@ -3670,7 +3701,7 @@ void clientButtonPress(Client * c, Window w, XButtonEvent * bev) passdata.b = b; c->button_pressed[b] = True; - frameDraw(c); + frameDraw(c, FALSE); DBG("entering button press loop\n"); pushEventFilter(clientButtonPress_event_filter, &passdata); @@ -3683,7 +3714,7 @@ void clientButtonPress(Client * c, Window w, XButtonEvent * bev) if(c->button_pressed[b]) { c->button_pressed[b] = False; - frameDraw(c); + frameDraw(c, FALSE); switch (b) { case HIDE_BUTTON: diff --git a/src/client.h b/src/client.h index 3b72cc79e8db1b4449c1a8d9da127b076364ebff..4f2081d39848856071e7e3b2d7b83f7407c76892 100644 --- a/src/client.h +++ b/src/client.h @@ -41,6 +41,7 @@ #include "misc.h" #include "hints.h" #include "keyboard.h" +#include "pixmap.h" #include "settings.h" #include "pixmap.h" @@ -64,7 +65,8 @@ #define UPDATE_KEYGRABS (1<<0) #define UPDATE_FRAME (1<<1) #define UPDATE_GRAVITY (1<<2) -#define UPDATE_ALL (UPDATE_KEYGRABS | UPDATE_FRAME | UPDATE_GRAVITY) +#define UPDATE_CACHE (1<<3) +#define UPDATE_ALL (UPDATE_KEYGRABS | UPDATE_FRAME | UPDATE_GRAVITY | UPDATE_CACHE) #define ACTIVE 0 #define INACTIVE 1 @@ -137,8 +139,18 @@ typedef enum } WindowType; + +typedef struct _ClientPixmapCache ClientPixmapCache; typedef struct _Client Client; +struct _ClientPixmapCache +{ + MyPixmap pm_title[2]; + MyPixmap pm_sides[3][2]; + int previous_width; + int previous_height; +}; + struct _Client { Window window; @@ -189,6 +201,8 @@ struct _Client char *startup_id; #endif unsigned long client_flag; + /* Pixmap caching */ + ClientPixmapCache pm_cache; }; extern Client *clients; @@ -202,6 +216,7 @@ void clientCoordGravitate(Client *, int, int *, int *); void clientGravitate(Client *, int); void clientConfigure(Client *, XWindowChanges *, int); void clientUpdateMWMHints(Client *); +void clientClearPixmapCache(Client *); void clientFrame(Window); void clientUnframe(Client *, int); void clientFrameAll(); diff --git a/src/events.c b/src/events.c index e0e5ae52f10d03511eb5026af1fc57e7de7c69a6..60ca341d6ed4e3f37018b49bd0c362382264eb7c 100644 --- a/src/events.c +++ b/src/events.c @@ -756,7 +756,7 @@ static inline void handleFocusIn(XFocusChangeEvent * ev) { DBG("focus set to \"%s\" (%#lx)\n", c->name, c->window); clientUpdateFocus(c); - frameDraw(c); + frameDraw(c, FALSE); if(params.raise_on_focus && !params.click_to_focus) { reset_timeout(); @@ -803,7 +803,7 @@ static inline void handlePropertyNotify(XPropertyEvent * ev) } if(CLIENT_FLAG_TEST(c, CLIENT_FLAG_IS_RESIZABLE) != previous_value) { - frameDraw(c); + frameDraw(c, TRUE); } } else if((ev->atom == XA_WM_NAME) || (ev->atom == net_wm_name)) @@ -815,13 +815,13 @@ static inline void handlePropertyNotify(XPropertyEvent * ev) } getWindowName(dpy, c->window, &c->name); CLIENT_FLAG_SET(c, CLIENT_FLAG_NAME_CHANGED); - frameDraw(c); + frameDraw(c, TRUE); } else if(ev->atom == motif_wm_hints) { DBG("client \"%s\" (%#lx) has received a motif_wm_hints notify\n", c->name, c->window); clientUpdateMWMHints(c); - frameDraw(c); + frameDraw(c, TRUE); } else if(ev->atom == XA_WM_HINTS) { @@ -848,7 +848,7 @@ static inline void handlePropertyNotify(XPropertyEvent * ev) { DBG("client \"%s\" (%#lx) has received a net_wm_window_type notify\n", c->name, c->window); clientGetNetWmType(c); - frameDraw(c); + frameDraw(c, TRUE); } else if((ev->atom == win_workspace) && !(c->transient_for)) { @@ -1014,7 +1014,7 @@ static inline void handleShape(XShapeEvent * ev) c = clientGetFromWindow(ev->window, WINDOW); if(c) { - frameDraw(c); + frameDraw(c, FALSE); } } @@ -1171,21 +1171,21 @@ static void menu_callback(Menu * menu, MenuOp op, Window client_xwindow, gpointe case MENU_OP_UNSTICK: if(c) { - frameDraw(c); + frameDraw(c, FALSE); clientToggleSticky(c, TRUE); } break; case MENU_OP_DELETE: if(c) { - frameDraw(c); + frameDraw(c, FALSE); clientClose(c); } break; default: if(c) { - frameDraw(c); + frameDraw(c, FALSE); } break; } @@ -1206,7 +1206,7 @@ static gboolean show_popup_cb(GtkWidget * widget, GdkEventButton * ev, gpointer if(((ev->button == 1) || (ev->button == 3)) && (c = (Client *) data)) { c->button_pressed[MENU_BUTTON] = True; - frameDraw(c); + frameDraw(c, FALSE); y = c->y; ops = MENU_OP_DELETE | MENU_OP_MINIMIZE_ALL; insensitive = 0; @@ -1310,7 +1310,7 @@ static gboolean show_popup_cb(GtkWidget * widget, GdkEventButton * ev, gpointer DBG("Cannot open menu\n"); gdk_beep(); c->button_pressed[MENU_BUTTON] = False; - frameDraw(c); + frameDraw(c, FALSE); removeTmpEventWin(menu_event_window); menu_event_window = None; menu_free(menu); diff --git a/src/frame.c b/src/frame.c index df8c3504c6f510c9174eec362ac4dc6bfd090598..410df4311f71e2f8f97f1700cc819295a784e6cf 100644 --- a/src/frame.c +++ b/src/frame.c @@ -404,7 +404,7 @@ static char getLetterFromButton(int i, Client * c) return chr; } -static void frameSetShape(Client * c, int state, MyPixmap * title, MyPixmap pm_sides[3], int button_x[BUTTON_COUNT]) +static void frameSetShape(Client *c, int state, ClientPixmapCache *pm_cache, int button_x[BUTTON_COUNT]) { Window temp; int i; @@ -432,14 +432,15 @@ static void frameSetShape(Client * c, int state, MyPixmap * title, MyPixmap pm_s { XShapeCombineShape(dpy, temp, ShapeBounding, frameLeft(c), frameTop(c), c->window, ShapeBounding, ShapeSet); } - if(CLIENT_FLAG_TEST_AND_NOT(c, CLIENT_FLAG_HAS_BORDER, CLIENT_FLAG_FULLSCREEN)) + if(pm_cache) { - XShapeCombineMask(dpy, c->title, ShapeBounding, 0, 0, title->mask, ShapeSet); - - XShapeCombineMask(dpy, c->sides[SIDE_LEFT], ShapeBounding, 0, 0, pm_sides[SIDE_LEFT].mask, ShapeSet); - XShapeCombineMask(dpy, c->sides[SIDE_RIGHT], ShapeBounding, 0, 0, pm_sides[SIDE_RIGHT].mask, ShapeSet); - XShapeCombineMask(dpy, c->sides[SIDE_BOTTOM], ShapeBounding, 0, 0, pm_sides[SIDE_BOTTOM].mask, ShapeSet); - + XShapeCombineMask(dpy, c->title, ShapeBounding, 0, 0, pm_cache->pm_title[state].mask, ShapeSet); + if (!CLIENT_FLAG_TEST(c, CLIENT_FLAG_SHADED)) + { + XShapeCombineMask(dpy, c->sides[SIDE_LEFT], ShapeBounding, 0, 0, pm_cache->pm_sides[SIDE_LEFT][state].mask, ShapeSet); + XShapeCombineMask(dpy, c->sides[SIDE_RIGHT], ShapeBounding, 0, 0, pm_cache->pm_sides[SIDE_RIGHT][state].mask, ShapeSet); + } + XShapeCombineMask(dpy, c->sides[SIDE_BOTTOM], ShapeBounding, 0, 0, pm_cache->pm_sides[SIDE_BOTTOM][state].mask, ShapeSet); XShapeCombineMask(dpy, c->corners[CORNER_BOTTOM_LEFT], ShapeBounding, 0, 0, params.corners[CORNER_BOTTOM_LEFT][state].mask, ShapeSet); XShapeCombineMask(dpy, c->corners[CORNER_BOTTOM_RIGHT], ShapeBounding, 0, 0, params.corners[CORNER_BOTTOM_RIGHT][state].mask, ShapeSet); XShapeCombineMask(dpy, c->corners[CORNER_TOP_LEFT], ShapeBounding, 0, 0, params.corners[CORNER_TOP_LEFT][state].mask, ShapeSet); @@ -490,9 +491,12 @@ static void frameSetShape(Client * c, int state, MyPixmap * title, MyPixmap pm_s XShapeCombineRectangles(dpy, c->corners[CORNER_BOTTOM_RIGHT], ShapeBounding, 0, 0, &rect, 1, ShapeSubtract, 0); } - XShapeCombineShape(dpy, temp, ShapeBounding, 0, frameTop(c), c->sides[SIDE_LEFT], ShapeBounding, ShapeUnion); - XShapeCombineShape(dpy, temp, ShapeBounding, frameWidth(c) - frameRight(c), frameTop(c), c->sides[SIDE_RIGHT], ShapeBounding, ShapeUnion); - XShapeCombineShape(dpy, temp, ShapeBounding, params.corners[CORNER_TOP_LEFT][ACTIVE].width, 0, c->title, ShapeBounding, ShapeUnion); + if (!CLIENT_FLAG_TEST(c, CLIENT_FLAG_SHADED)) + { + XShapeCombineShape(dpy, temp, ShapeBounding, 0, frameTop(c), c->sides[SIDE_LEFT], ShapeBounding, ShapeUnion); + XShapeCombineShape(dpy, temp, ShapeBounding, frameWidth(c) - frameRight(c), frameTop(c), c->sides[SIDE_RIGHT], ShapeBounding, ShapeUnion); + } + XShapeCombineShape(dpy, temp, ShapeBounding, params.corners[CORNER_TOP_LEFT][ACTIVE].width, 0, c->title, ShapeBounding, ShapeUnion); XShapeCombineShape(dpy, temp, ShapeBounding, params.corners[CORNER_BOTTOM_LEFT][ACTIVE].width, frameHeight(c) - frameBottom(c), c->sides[SIDE_BOTTOM], ShapeBounding, ShapeUnion); XShapeCombineShape(dpy, temp, ShapeBounding, 0, frameHeight(c) - params.corners[CORNER_BOTTOM_LEFT][ACTIVE].height, c->corners[CORNER_BOTTOM_LEFT], ShapeBounding, ShapeUnion); XShapeCombineShape(dpy, temp, ShapeBounding, frameWidth(c) - params.corners[CORNER_BOTTOM_RIGHT][ACTIVE].width, frameHeight(c) - params.corners[CORNER_BOTTOM_RIGHT][ACTIVE].height, c->corners[CORNER_BOTTOM_RIGHT], ShapeBounding, ShapeUnion); @@ -512,7 +516,7 @@ static void frameSetShape(Client * c, int state, MyPixmap * title, MyPixmap pm_s XDestroyWindow(dpy, temp); } -void frameDraw(Client * c) +void frameDraw(Client * c, gboolean invalidate_cache) { int state = ACTIVE; int i; @@ -526,7 +530,6 @@ void frameDraw(Client * c) int left_height; int right_height; int button_x[BUTTON_COUNT]; - MyPixmap pm_title, pm_sides[3]; DBG("entering frameDraw\n"); DBG("drawing frame for \"%s\" (%#lx)\n", c->name, c->window); @@ -538,7 +541,31 @@ void frameDraw(Client * c) } if(CLIENT_FLAG_TEST_AND_NOT(c, CLIENT_FLAG_HAS_BORDER, CLIENT_FLAG_FULLSCREEN)) { - XMapWindow(dpy, c->title); + if (invalidate_cache) + { + clientClearPixmapCache(c); + } + else + { + if (c->pm_cache.previous_width != c->width) + { + freePixmap(dpy, &(c->pm_cache.pm_title[ACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_title[INACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_BOTTOM][ACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_BOTTOM][INACTIVE])); + c->pm_cache.previous_width = c->width; + } + if (c->pm_cache.previous_height != c->height) + { + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_LEFT][ACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_LEFT][INACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_RIGHT][ACTIVE])); + freePixmap(dpy, &(c->pm_cache.pm_sides[SIDE_RIGHT][INACTIVE])); + c->pm_cache.previous_height = c->height; + } + } + + XMapWindow(dpy, c->title); for(i = 0; i < 3; i++) { if(c->sides[i]) @@ -608,24 +635,36 @@ void frameDraw(Client * c) left_height = frameHeight(c) - frameTop(c) - params.corners[CORNER_BOTTOM_LEFT][ACTIVE].height; right_height = frameHeight(c) - frameTop(c) - params.corners[CORNER_BOTTOM_RIGHT][ACTIVE].height; - frameCreateTitlePixmap(c, state, left, right, &pm_title); - - createPixmap(dpy, &pm_sides[SIDE_LEFT], frameLeft(c), left_height); - fillRectangle(dpy, pm_sides[SIDE_LEFT].pixmap, params.sides[SIDE_LEFT][state].pixmap, 0, 0, frameLeft(c), left_height); - fillRectangle(dpy, pm_sides[SIDE_LEFT].mask, params.sides[SIDE_LEFT][state].mask, 0, 0, frameLeft(c), left_height); + if (c->pm_cache.pm_title[state].pixmap == None) + { + frameCreateTitlePixmap(c, state, left, right, &(c->pm_cache.pm_title[state])); + } + + if (c->pm_cache.pm_sides[SIDE_LEFT][state].pixmap == None) + { + createPixmap(dpy, &(c->pm_cache.pm_sides[SIDE_LEFT][state]), frameLeft(c), left_height); + } + fillRectangle(dpy, c->pm_cache.pm_sides[SIDE_LEFT][state].pixmap, params.sides[SIDE_LEFT][state].pixmap, 0, 0, frameLeft(c), left_height); + fillRectangle(dpy, c->pm_cache.pm_sides[SIDE_LEFT][state].mask, params.sides[SIDE_LEFT][state].mask, 0, 0, frameLeft(c), left_height); - createPixmap(dpy, &pm_sides[SIDE_RIGHT], frameRight(c), right_height); - fillRectangle(dpy, pm_sides[SIDE_RIGHT].pixmap, params.sides[SIDE_RIGHT][state].pixmap, 0, 0, frameRight(c), right_height); - fillRectangle(dpy, pm_sides[SIDE_RIGHT].mask, params.sides[SIDE_RIGHT][state].mask, 0, 0, frameRight(c), right_height); + if (c->pm_cache.pm_sides[SIDE_RIGHT][state].pixmap == None) + { + createPixmap(dpy, &(c->pm_cache.pm_sides[SIDE_RIGHT][state]), frameRight(c), right_height); + } + fillRectangle(dpy, c->pm_cache.pm_sides[SIDE_RIGHT][state].pixmap, params.sides[SIDE_RIGHT][state].pixmap, 0, 0, frameRight(c), right_height); + fillRectangle(dpy, c->pm_cache.pm_sides[SIDE_RIGHT][state].mask, params.sides[SIDE_RIGHT][state].mask, 0, 0, frameRight(c), right_height); - createPixmap(dpy, &pm_sides[SIDE_BOTTOM], bottom_width, frameBottom(c)); - fillRectangle(dpy, pm_sides[SIDE_BOTTOM].pixmap, params.sides[SIDE_BOTTOM][state].pixmap, 0, 0, bottom_width, frameBottom(c)); - fillRectangle(dpy, pm_sides[SIDE_BOTTOM].mask, params.sides[SIDE_BOTTOM][state].mask, 0, 0, bottom_width, frameBottom(c)); + if (c->pm_cache.pm_sides[SIDE_BOTTOM][state].pixmap == None) + { + createPixmap(dpy, &(c->pm_cache.pm_sides[SIDE_BOTTOM][state]), bottom_width, frameBottom(c)); + } + fillRectangle(dpy, c->pm_cache.pm_sides[SIDE_BOTTOM][state].pixmap, params.sides[SIDE_BOTTOM][state].pixmap, 0, 0, bottom_width, frameBottom(c)); + fillRectangle(dpy, c->pm_cache.pm_sides[SIDE_BOTTOM][state].mask, params.sides[SIDE_BOTTOM][state].mask, 0, 0, bottom_width, frameBottom(c)); - XSetWindowBackgroundPixmap(dpy, c->title, pm_title.pixmap); - XSetWindowBackgroundPixmap(dpy, c->sides[SIDE_LEFT], pm_sides[SIDE_LEFT].pixmap); - XSetWindowBackgroundPixmap(dpy, c->sides[SIDE_RIGHT], pm_sides[SIDE_RIGHT].pixmap); - XSetWindowBackgroundPixmap(dpy, c->sides[SIDE_BOTTOM], pm_sides[SIDE_BOTTOM].pixmap); + XSetWindowBackgroundPixmap(dpy, c->title, c->pm_cache.pm_title[state].pixmap); + XSetWindowBackgroundPixmap(dpy, c->sides[SIDE_LEFT], c->pm_cache.pm_sides[SIDE_LEFT][state].pixmap); + XSetWindowBackgroundPixmap(dpy, c->sides[SIDE_RIGHT], c->pm_cache.pm_sides[SIDE_RIGHT][state].pixmap); + XSetWindowBackgroundPixmap(dpy, c->sides[SIDE_BOTTOM], c->pm_cache.pm_sides[SIDE_BOTTOM][state].pixmap); XSetWindowBackgroundPixmap(dpy, c->corners[CORNER_TOP_LEFT], params.corners[CORNER_TOP_LEFT][state].pixmap); XSetWindowBackgroundPixmap(dpy, c->corners[CORNER_TOP_RIGHT], params.corners[CORNER_TOP_RIGHT][state].pixmap); XSetWindowBackgroundPixmap(dpy, c->corners[CORNER_BOTTOM_LEFT], params.corners[CORNER_BOTTOM_LEFT][state].pixmap); @@ -667,12 +706,7 @@ void frameDraw(Client * c) XClearWindow(dpy, c->buttons[i]); } - frameSetShape(c, state, &pm_title, pm_sides, button_x); - - freePixmap(dpy, &pm_title); - freePixmap(dpy, &pm_sides[SIDE_LEFT]); - freePixmap(dpy, &pm_sides[SIDE_RIGHT]); - freePixmap(dpy, &pm_sides[SIDE_BOTTOM]); + frameSetShape(c, state, &(c->pm_cache), button_x); } else { @@ -698,6 +732,6 @@ void frameDraw(Client * c) XUnmapWindow(dpy, c->buttons[i]); } } - frameSetShape(c, 0, NULL, NULL, NULL); + frameSetShape(c, 0, NULL, 0); } } diff --git a/src/frame.h b/src/frame.h index 00d9b6f36c2153e9e663fd4f2f15af2529220146..086c0e16c5075e6b41a04ec0c6227ed53451d241 100644 --- a/src/frame.h +++ b/src/frame.h @@ -35,6 +35,6 @@ inline int frameX(Client *); inline int frameY(Client *); inline int frameWidth(Client *); inline int frameHeight(Client *); -void frameDraw(Client *); +void frameDraw(Client *, gboolean); #endif /* __FRAME_H__ */ diff --git a/src/settings.c b/src/settings.c index f5d6bbf3a3789d90ce72c738889764b0183c4bd0..5fe26bf896185c44668fe1ac43da1921b3ef45c6 100644 --- a/src/settings.c +++ b/src/settings.c @@ -115,19 +115,19 @@ static void notify_cb(const char *name, const char *channel_name, McsAction acti } else if(!strcmp(name, "Xfwm/ThemeName")) { - reloadSettings(UPDATE_GRAVITY); + reloadSettings(UPDATE_GRAVITY | UPDATE_CACHE); } else if(!strcmp(name, "Xfwm/ButtonLayout")) { - reloadSettings(UPDATE_FRAME); + reloadSettings(UPDATE_FRAME | UPDATE_CACHE); } if(!strcmp(name, "Xfwm/TitleAlign")) { - reloadSettings(UPDATE_FRAME); + reloadSettings(UPDATE_FRAME | UPDATE_CACHE); } if(!strcmp(name, "Xfwm/TitleFont")) { - reloadSettings(UPDATE_FRAME); + reloadSettings(UPDATE_FRAME | UPDATE_CACHE); } } break;