From 8919c622b6b27af03399ac303fa8b092a71c0f3f Mon Sep 17 00:00:00 2001 From: Olivier Fourdan <fourdan.olivier@wanadoo.fr> Date: Sat, 23 Jun 2007 22:44:07 +0000 Subject: [PATCH] A bit more of small cleanup (Old svn revision: 25846) --- src/frame.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/frame.c b/src/frame.c index aea2667aa..1990d5111 100644 --- a/src/frame.c +++ b/src/frame.c @@ -312,16 +312,6 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap * width = frameWidth (c) - frameTopLeftWidth (c, state) - frameTopRightWidth (c, state); if (width < 1) { - title_pm->pixmap = None; - title_pm->mask = None; - title_pm->width = 0; - title_pm->height = 0; - - top_pm->pixmap = None; - top_pm->mask = None; - top_pm->width = 0; - top_pm->height = 0; - return; } @@ -964,7 +954,7 @@ frameDraw (Client * c, gboolean clear_all) if (x + screen_info->buttons[button][state].width + screen_info->params->button_spacing < right) { my_pixmap = clientGetButtonPixmap (c, button, clientGetButtonState (c, button, state)); - if (my_pixmap->pixmap) + if (!xfwmPixmapNone(my_pixmap)) { xfwmWindowSetBG (&c->buttons[button], my_pixmap); } @@ -999,7 +989,7 @@ frameDraw (Client * c, gboolean clear_all) if (x - screen_info->buttons[button][state].width - screen_info->params->button_spacing > left) { my_pixmap = clientGetButtonPixmap (c, button, clientGetButtonState (c, button, state)); - if (my_pixmap->pixmap) + if (!xfwmPixmapNone(my_pixmap)) { xfwmWindowSetBG (&c->buttons[button], my_pixmap); } @@ -1029,11 +1019,11 @@ frameDraw (Client * c, gboolean clear_all) right_height = frameHeight (c) - frameTop (c) - screen_info->corners[CORNER_BOTTOM_RIGHT][state].height; -// xfwmPixmapInit (screen_info, &frame_pix.pm_title); + xfwmPixmapInit (screen_info, &frame_pix.pm_title); + xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_TOP]); + xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_BOTTOM]); xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_LEFT]); xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_RIGHT]); - xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_BOTTOM]); -// xfwmPixmapInit (screen_info, &frame_pix.pm_sides[SIDE_TOP]); /* The title is always visible */ frameCreateTitlePixmap (c, state, left, right, &frame_pix.pm_title, &frame_pix.pm_sides[SIDE_TOP]); @@ -1153,10 +1143,10 @@ frameDraw (Client * c, gboolean clear_all) frameSetShape (c, state, &frame_pix, button_x); xfwmPixmapFree (&frame_pix.pm_title); + xfwmPixmapFree (&frame_pix.pm_sides[SIDE_TOP]); xfwmPixmapFree (&frame_pix.pm_sides[SIDE_BOTTOM]); xfwmPixmapFree (&frame_pix.pm_sides[SIDE_LEFT]); xfwmPixmapFree (&frame_pix.pm_sides[SIDE_RIGHT]); - xfwmPixmapFree (&frame_pix.pm_sides[SIDE_TOP]); } else { -- GitLab