[Xfce4-commits] r25809 - xfwm4/trunk/src
Olivier Fourdan
olivier at xfce.org
Thu Jun 14 00:20:24 CEST 2007
Author: olivier
Date: 2007-06-13 22:20:24 +0000 (Wed, 13 Jun 2007)
New Revision: 25809
Modified:
xfwm4/trunk/src/client.c
xfwm4/trunk/src/client.h
xfwm4/trunk/src/frame.c
xfwm4/trunk/src/settings.c
Log:
A bit more cleanup and stuff
Modified: xfwm4/trunk/src/client.c
===================================================================
--- xfwm4/trunk/src/client.c 2007-06-13 17:31:24 UTC (rev 25808)
+++ xfwm4/trunk/src/client.c 2007-06-13 22:20:24 UTC (rev 25809)
@@ -1999,47 +1999,37 @@
clientGrabButtons(c);
/* Initialize per client menu button pixmap */
- xfwmPixmapInit (screen_info, &c->appmenu[ACTIVE]);
- xfwmPixmapInit (screen_info, &c->appmenu[INACTIVE]);
- xfwmPixmapInit (screen_info, &c->appmenu[PRESSED]);
- xfwmPixmapInit (screen_info, &c->appmenu[PRELIGHT]);
+ for (i = 0; i < STATE_TOGGLED; i++)
+ {
+ xfwmPixmapInit (screen_info, &c->appmenu[i]);
+ }
+
+ for (i = 0; i < SIDE_TOP; i++) /* Keep SIDE_TOP for later */
+ {
+ xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
+ &c->sides[i], NoEventMask,
+ myDisplayGetCursorResize(screen_info->display_info, CORNER_COUNT + i));
+ }
+
+ for (i = 0; i < CORNER_COUNT; i++)
+ {
+ xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
+ &c->corners[i], NoEventMask,
+ myDisplayGetCursorResize(screen_info->display_info, i));
+ }
+
xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
- &c->sides[SIDE_LEFT], NoEventMask,
- myDisplayGetCursorResize(screen_info->display_info,
- CORNER_COUNT + SIDE_LEFT));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
- &c->sides[SIDE_RIGHT], NoEventMask,
- myDisplayGetCursorResize(screen_info->display_info,
- CORNER_COUNT + SIDE_RIGHT));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
- &c->sides[SIDE_BOTTOM], NoEventMask,
- myDisplayGetCursorResize(screen_info->display_info,
- CORNER_COUNT + SIDE_BOTTOM));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
- &c->corners[CORNER_BOTTOM_LEFT], NoEventMask,
- myDisplayGetCursorResize(screen_info->display_info,
- CORNER_BOTTOM_LEFT));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
- &c->corners[CORNER_BOTTOM_RIGHT], NoEventMask,
- myDisplayGetCursorResize(screen_info->display_info,
- CORNER_BOTTOM_RIGHT));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
- &c->corners[CORNER_TOP_LEFT], NoEventMask,
- myDisplayGetCursorResize(screen_info->display_info,
- CORNER_TOP_LEFT));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
- &c->corners[CORNER_TOP_RIGHT], NoEventMask,
- myDisplayGetCursorResize(screen_info->display_info,
- CORNER_TOP_RIGHT));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
&c->title, NoEventMask, None);
+
/* create the top side window AFTER the title window since they overlap
and the top side window should be on top */
+
xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
&c->sides[SIDE_TOP], NoEventMask,
myDisplayGetCursorResize(screen_info->display_info,
CORNER_COUNT + SIDE_TOP));
+
for (i = 0; i < BUTTON_COUNT; i++)
{
xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
@@ -2173,29 +2163,28 @@
}
xfwmWindowDelete (&c->title);
- xfwmWindowDelete (&c->sides[SIDE_LEFT]);
- xfwmWindowDelete (&c->sides[SIDE_RIGHT]);
- xfwmWindowDelete (&c->sides[SIDE_BOTTOM]);
- xfwmWindowDelete (&c->sides[SIDE_TOP]);
- xfwmWindowDelete (&c->corners[CORNER_BOTTOM_LEFT]);
- xfwmWindowDelete (&c->corners[CORNER_BOTTOM_RIGHT]);
- xfwmWindowDelete (&c->corners[CORNER_TOP_LEFT]);
- xfwmWindowDelete (&c->corners[CORNER_TOP_RIGHT]);
- xfwmPixmapFree (&c->appmenu[ACTIVE]);
- xfwmPixmapFree (&c->appmenu[INACTIVE]);
- xfwmPixmapFree (&c->appmenu[PRESSED]);
- xfwmPixmapFree (&c->appmenu[PRELIGHT]);
-
+ for (i = 0; i < SIDE_COUNT; i++)
+ {
+ xfwmWindowDelete (&c->sides[i]);
+ }
+ for (i = 0; i < CORNER_COUNT; i++)
+ {
+ xfwmWindowDelete (&c->corners[i]);
+ }
+ for (i = 0; i < STATE_TOGGLED; i++)
+ {
+ xfwmPixmapFree (&c->appmenu[i]);
+ }
for (i = 0; i < BUTTON_COUNT; i++)
{
xfwmWindowDelete (&c->buttons[i]);
}
- XDestroyWindow (display_info->dpy, c->frame);
if (FLAG_TEST (c->flags, CLIENT_FLAG_HAS_STRUT))
{
workspaceUpdateArea (c->screen_info);
}
+ XDestroyWindow (display_info->dpy, c->frame);
myDisplayUngrabServer (display_info);
gdk_error_trap_pop ();
Modified: xfwm4/trunk/src/client.h
===================================================================
--- xfwm4/trunk/src/client.h 2007-06-13 17:31:24 UTC (rev 25808)
+++ xfwm4/trunk/src/client.h 2007-06-13 22:20:24 UTC (rev 25809)
@@ -228,7 +228,7 @@
xfwmWindow buttons[BUTTON_COUNT];
Window client_leader;
Window group_leader;
- xfwmPixmap appmenu[STATE_COUNT];
+ xfwmPixmap appmenu[STATE_TOGGLED];
Colormap cmap;
unsigned long win_hints;
unsigned long win_state;
Modified: xfwm4/trunk/src/frame.c
===================================================================
--- xfwm4/trunk/src/frame.c 2007-06-13 17:31:24 UTC (rev 25808)
+++ xfwm4/trunk/src/frame.c 2007-06-13 22:20:24 UTC (rev 25809)
@@ -1108,7 +1108,7 @@
xfwmWindowSetBG (&c->sides[SIDE_TOP], &frame_pix.pm_sides[SIDE_TOP]);
xfwmWindowShow (&c->sides[SIDE_TOP],
screen_info->corners[CORNER_TOP_LEFT][state].width,
- 0, top_width, frameTop (c),
+ 0, top_width, frame_pix.pm_sides[SIDE_TOP].height,
(requires_clearing | width_changed));
}
else
Modified: xfwm4/trunk/src/settings.c
===================================================================
--- xfwm4/trunk/src/settings.c 2007-06-13 17:31:24 UTC (rev 25808)
+++ xfwm4/trunk/src/settings.c 2007-06-13 22:20:24 UTC (rev 25809)
@@ -1205,16 +1205,16 @@
for (i = 0; i < TITLE_COUNT; i++)
{
- g_snprintf(imagename, sizeof (imagename), "title-%d-active", i+1);
+ g_snprintf(imagename, sizeof (imagename), "title-%d-active", i + 1);
xfwmPixmapLoad (screen_info, &screen_info->title[i][ACTIVE], theme, imagename, colsym);
- g_snprintf(imagename, sizeof (imagename), "title-%d-inactive", i+1);
+ g_snprintf(imagename, sizeof (imagename), "title-%d-inactive", i + 1);
xfwmPixmapLoad (screen_info, &screen_info->title[i][INACTIVE], theme, imagename, colsym);
- g_snprintf(imagename, sizeof (imagename), "top-%d-active", i+1);
+ g_snprintf(imagename, sizeof (imagename), "top-%d-active", i + 1);
xfwmPixmapLoad (screen_info, &screen_info->top[i][ACTIVE], theme, imagename, colsym);
- g_snprintf(imagename, sizeof (imagename), "top-%d-inactive", i+1);
+ g_snprintf(imagename, sizeof (imagename), "top-%d-inactive", i + 1);
xfwmPixmapLoad (screen_info, &screen_info->top[i][INACTIVE], theme, imagename, colsym);
}
More information about the Xfce4-commits
mailing list