[Xfce4-commits] r26584 - xfwm4/trunk/src

2008-01-21 Thread Olivier Fourdan
Author: olivier
Date: 2008-01-21 22:33:27 + (Mon, 21 Jan 2008)
New Revision: 26584

Modified:
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/screen.c
Log:
Exit on SelectionClear event so that xfwm4 exits even with WM who do not send a 
ClientMEssage event such as Openbox (bug #2374)

Modified: xfwm4/trunk/src/display.c
===
--- xfwm4/trunk/src/display.c   2008-01-21 21:23:02 UTC (rev 26583)
+++ xfwm4/trunk/src/display.c   2008-01-21 22:33:27 UTC (rev 26584)
@@ -761,7 +761,7 @@
 
 if (TIMESTAMP_IS_BEFORE(display->last_user_time, timestamp))
 {
-   display->last_user_time = timestamp;
+display->last_user_time = timestamp;
 }
 }
 

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2008-01-21 21:23:02 UTC (rev 26583)
+++ xfwm4/trunk/src/events.c2008-01-21 22:33:27 UTC (rev 26584)
@@ -2274,6 +2274,31 @@
 }
 
 static eventFilterStatus
+handleSelectionClear (DisplayInfo *display_info, XSelectionClearEvent * ev)
+{
+eventFilterStatus status;
+ScreenInfo *screen_info;
+Client *c;
+gboolean is_transient;
+
+TRACE ("entering handleSelectionClear");
+
+status = EVENT_FILTER_PASS;
+screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
+if (screen_info)
+{
+if (myScreenCheckWMAtom (screen_info, ev->selection))
+{
+TRACE ("root has received a WM_Sn selection event");
+display_info->quit = TRUE;
+status = EVENT_FILTER_REMOVE;
+}
+}
+
+return status;
+}
+
+static eventFilterStatus
 handleShape (DisplayInfo *display_info, XShapeEvent * ev)
 {
 Client *c;
@@ -2449,6 +2474,9 @@
 case ClientMessage:
 status = handleClientMessage (display_info, (XClientMessageEvent 
*) ev);
 break;
+case SelectionClear:
+status = handleSelectionClear (display_info, (XSelectionClearEvent 
*) ev);
+break;
 case ColormapNotify:
 handleColormapNotify (display_info, (XColormapEvent *) ev);
 break;

Modified: xfwm4/trunk/src/screen.c
===
--- xfwm4/trunk/src/screen.c2008-01-21 21:23:02 UTC (rev 26583)
+++ xfwm4/trunk/src/screen.c2008-01-21 22:33:27 UTC (rev 26584)
@@ -332,6 +332,7 @@
 gchar selection[32];
 Atom wm_sn_atom;
 
+TRACE ("entering myScreenCheckWMAtom");
 g_snprintf (selection, sizeof (selection), "WM_S%d", screen_info->screen);
 wm_sn_atom = XInternAtom (myScreenGetXDisplay (screen_info), selection, 
FALSE);
 
@@ -418,10 +419,10 @@
Ugly hack: KEY_CANCEL is used just for cancelling window ops
it should not be grabbed all the time (especially when you
realize that it's mapped to Esc by default, damn, I can't
-   switch back to command mode in vi anymore, I'm stuck in 
+   switch back to command mode in vi anymore, I'm stuck in
edition mode ;)
 
-   That's why we start at FIRST_KEY which is defined after 
+   That's why we start at FIRST_KEY which is defined after
KEY_CANCEL...
  */
 for (i = FIRST_KEY; i < KEY_COUNT; i++)

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26463 - xfwm4/trunk/src

2007-12-12 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-12 22:33:56 + (Wed, 12 Dec 2007)
New Revision: 26463

Modified:
   xfwm4/trunk/src/compositor.c
   xfwm4/trunk/src/screen.h
Log:
Rework the windows unredirection to take advantage of the new overlay support

Modified: xfwm4/trunk/src/compositor.c
===
--- xfwm4/trunk/src/compositor.c2007-12-12 12:00:59 UTC (rev 26462)
+++ xfwm4/trunk/src/compositor.c2007-12-12 22:33:56 UTC (rev 26463)
@@ -1089,7 +1089,7 @@
 XCompositeUnredirectWindow (display_info->dpy, cw->id, 
display_info->composite_mode);
 XSync (display_info->dpy, FALSE);
 
-TRACE ("Window 0x%lx unredirected, overlays is %i", cw->id, 
screen_info->overlays);
+TRACE ("Window 0x%lx unredirected, wins_unredirected is %i", cw->id, 
screen_info->wins_unredirected);
 }
 }
 
@@ -1772,24 +1772,28 @@
 
 if (!WIN_IS_REDIRECTED(cw))
 {
-screen_info->overlays++;
+/* To be safe, we count only the fullscreen overlays */
+if (WIN_IS_FULLSCREEN(cw))
+{
+screen_info->wins_unredirected++;
+}
 #if HAVE_OVERLAYS
-if ((screen_info->overlays == 1) && (display_info->have_overlays))
+if ((screen_info->wins_unredirected == 1) && 
(display_info->have_overlays))
 {
 XUnmapWindow (myScreenGetXDisplay (screen_info), 
screen_info->overlay);
 }
 #endif /* HAVE_OVERLAYS */
-TRACE ("Mapping unredirected window 0x%lx, overlays increased to %i", 
cw->id, screen_info->overlays);
+TRACE ("Mapping unredirected window 0x%lx, wins_unredirected increased 
to %i", cw->id, screen_info->wins_unredirected);
 return;
 }
 if (!screen_info->params->unredirect_overlays)
 {
-TRACE ("Not unredirecting overlays");
+TRACE ("Not unredirecting wins_unredirected");
 return;
 }
 
 /* Check for new windows to un-redirect. */
-if (WIN_IS_FULLSCREEN(cw) && WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
+if ((WIN_IS_FULLSCREEN(cw) || (screen_info->wins_unredirected > 0)) && 
WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
 WIN_IS_NATIVE_OPAQUE(cw) && WIN_IS_REDIRECTED(cw) && 
!WIN_IS_SHAPED(cw))
 {
 CWindow *top;
@@ -1818,32 +1822,28 @@
 screen_info = cw->screen_info;
 display_info = screen_info->display_info;
 
-if (!WIN_IS_REDIRECTED(cw) && (screen_info->overlays > 0))
+if (!WIN_IS_REDIRECTED(cw) && WIN_IS_FULLSCREEN(cw) && 
(screen_info->wins_unredirected > 0))
 {
-screen_info->overlays--;
-TRACE ("Unmapped window 0x%lx, overlays decreased to %i", cw->id, 
screen_info->overlays);
+screen_info->wins_unredirected--;
+TRACE ("Unmapped window 0x%lx, wins_unredirected decreased to %i", 
cw->id, screen_info->wins_unredirected);
+if (!screen_info->wins_unredirected)
+{
+/* Restore the overlay if that was the last unredirected window */
 #if HAVE_OVERLAYS
-if ((screen_info->overlays == 0) && (display_info->have_overlays))
-{
-XMapWindow (myScreenGetXDisplay (screen_info), 
screen_info->overlay);
-}
+if (display_info->have_overlays)
+{
+XMapWindow (myScreenGetXDisplay (screen_info), 
screen_info->overlay);
+}
 #endif /* HAVE_OVERLAYS */
+damage_screen (screen_info);
+repair_screen (screen_info);
+   }
 }
-
-if (!screen_info->overlays)
+else if (WIN_IS_VISIBLE(cw))
 {
-/* Repaint immediately if that was the last unredirected window */
+damage_win (cw);
+}
 
-if (!WIN_IS_REDIRECTED(cw))
-{
-damage_screen (screen_info);
-repair_screen (screen_info);
-}
-else if (WIN_IS_VISIBLE(cw))
-{
-damage_win (cw);
-}
-}
 cw->viewable = FALSE;
 cw->damaged = FALSE;
 free_win_data (cw, FALSE);
@@ -2879,7 +2879,7 @@
 screen_info->allDamage = None;
 screen_info->cwindows = NULL;
 screen_info->compositor_active = TRUE;
-screen_info->overlays = 0;
+screen_info->wins_unredirected = 0;
 
 XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE);
 compositorSetCMSelection (screen_info, screen_info->xfwm4_win);
@@ -2967,7 +2967,7 @@
 }
 
 screen_info->gaussianSize = -1;
-screen_info->overlays = 0;
+screen_info->wins_unredirected = 0;
 
 XCompositeUnredirectSubwindows (display_info->dpy, screen_info->xroot,
 display_info->composite_mode);

Modified: xfwm4/trunk/src/screen.h
===
--- xfwm4/trunk/src/screen.h2007-12-12 12:00:59 UTC (rev 26462)
+++ xfwm4/trunk/src/screen.h2007-12-12 22:33:56 UTC (rev 26463)
@@ -152,7 +152,7 @@
 Picture rootTile;
 XserverRegion allDamage;
 
-guint overlays;
+guint wins_

[Xfce4-commits] r26459 - xfwm4/trunk/src

2007-12-11 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-11 22:14:12 + (Tue, 11 Dec 2007)
New Revision: 26459

Modified:
   xfwm4/trunk/src/compositor.c
Log:
Avoid infinite loop when damaging the overlay window

Modified: xfwm4/trunk/src/compositor.c
===
--- xfwm4/trunk/src/compositor.c2007-12-11 21:58:58 UTC (rev 26458)
+++ xfwm4/trunk/src/compositor.c2007-12-11 22:14:12 UTC (rev 26459)
@@ -1947,7 +1947,11 @@
 new->shaped = is_shaped (display_info, id);
 new->viewable = (new->attr.map_state == IsViewable);
 
-if ((new->attr.class != InputOnly) && (id != screen_info->xroot))
+if ((new->attr.class != InputOnly)
+#if HAVE_OVERLAYS
+ && ((!display_info->have_overlays) || (id != screen_info->overlay))
+#endif
+ && (id != screen_info->output))
 {
 new->damage = XDamageCreate (display_info->dpy, id, 
XDamageReportNonEmpty);
 }

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26456 - xfwm4/trunk/src

2007-12-10 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-10 22:27:15 + (Mon, 10 Dec 2007)
New Revision: 26456

Modified:
   xfwm4/trunk/src/compositor.c
   xfwm4/trunk/src/screen.h
Log:
Set depth/visual in overlay output window

Modified: xfwm4/trunk/src/compositor.c
===
--- xfwm4/trunk/src/compositor.c2007-12-10 19:47:45 UTC (rev 26455)
+++ xfwm4/trunk/src/compositor.c2007-12-10 22:27:15 UTC (rev 26456)
@@ -928,6 +928,7 @@
 
 if ((screen_info->params->show_popup_shadow &&
   WIN_IS_OVERRIDE(cw) &&
+  !WIN_IS_FULLSCREEN(cw) &&
   !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) ||
   (screen_info->params->show_frame_shadow &&
   !WIN_IS_OVERRIDE(cw) &&
@@ -2754,8 +2755,6 @@
 
 #if HAVE_OVERLAYS
 display_info->have_overlays = ((composite_major > 0) || (composite_minor 
>= 3));
-#else  /* HAVE_OVERLAYS */
-display_info->have_overlays = FALSE;
 #endif /* HAVE_OVERLAYS */
 
 #else /* HAVE_COMPOSITOR */
@@ -2828,23 +2827,18 @@
 screen_info->overlay = XCompositeGetOverlayWindow (display_info->dpy, 
screen_info->xroot);
 if (screen_info->overlay != None)
 {
-#if USE_CHILD_OVERLAY
 XSetWindowAttributes attributes;
 
-attributes.override_redirect = TRUE;
 screen_info->root_overlay = XCreateWindow (display_info->dpy, 
screen_info->overlay,
-   0, 0, 
screen_info->width, screen_info->height, 0, 0,
-   InputOutput, 
CopyFromParent, CWOverrideRedirect, &attributes);
+   0, 0, 
screen_info->width, screen_info->height, 0, screen_info->depth,
+   InputOutput, 
screen_info->visual, 0, &attributes);
 XMapWindow (display_info->dpy, screen_info->root_overlay);
 XRaiseWindow (display_info->dpy, screen_info->overlay);
+XShapeCombineRectangles (display_info->dpy, screen_info->overlay,
+ ShapeInput, 0, 0, NULL, 0, ShapeSet, 
Unsorted);
 XShapeCombineRectangles (display_info->dpy, 
screen_info->root_overlay,
  ShapeInput, 0, 0, NULL, 0, ShapeSet, 
Unsorted);
 screen_info->output = screen_info->root_overlay;
-#else
-screen_info->output = screen_info->overlay;
-#endif /* USE_CHILD_OVERLAY */
-XShapeCombineRectangles (display_info->dpy, screen_info->overlay,
- ShapeInput, 0, 0, NULL, 0, ShapeSet, 
Unsorted);
 TRACE ("Overlay enabled");
 }
 else
@@ -2931,10 +2925,9 @@
 #if HAVE_OVERLAYS
 if (display_info->have_overlays)
 {
-#if USE_CHILD_OVERLAY
 XDestroyWindow (display_info->dpy, screen_info->root_overlay);
 screen_info->root_overlay = None;
-#endif /* USE_CHILD_OVERLAY */
+
 XCompositeReleaseOverlayWindow (display_info->dpy, 
screen_info->overlay);
 screen_info->overlay = None;
 }

Modified: xfwm4/trunk/src/screen.h
===
--- xfwm4/trunk/src/screen.h2007-12-10 19:47:45 UTC (rev 26455)
+++ xfwm4/trunk/src/screen.h2007-12-10 22:27:15 UTC (rev 26456)
@@ -136,9 +136,7 @@
 #ifdef HAVE_COMPOSITOR
 #if HAVE_OVERLAYS
 Window overlay;
-#if USE_CHILD_OVERLAY
 Window root_overlay;
-#endif /* USE_CHILD_OVERLAY */
 #endif
 GList *cwindows;
 Window output;

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26452 - in xfwm4/trunk: defaults mcs-plugin src

2007-12-09 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-09 11:22:37 + (Sun, 09 Dec 2007)
New Revision: 26452

Modified:
   xfwm4/trunk/defaults/defaults
   xfwm4/trunk/mcs-plugin/wmtweaks_plugin.c
   xfwm4/trunk/src/compositor.c
   xfwm4/trunk/src/display.h
   xfwm4/trunk/src/frame.c
   xfwm4/trunk/src/screen.h
Log:
Add support for overlays from Composite extension version 0.3

Modified: xfwm4/trunk/defaults/defaults
===
--- xfwm4/trunk/defaults/defaults   2007-12-08 10:46:08 UTC (rev 26451)
+++ xfwm4/trunk/defaults/defaults   2007-12-09 11:22:37 UTC (rev 26452)
@@ -2,7 +2,7 @@
 borderless_maximize=true
 box_move=false
 box_resize=false
-button_layout=O|HMC
+button_layout=OT|SHMC
 button_offset=0
 button_spacing=0
 click_to_focus=true
@@ -52,7 +52,7 @@
 title_vertical_offset_active=0
 title_vertical_offset_inactive=0
 toggle_workspaces=false
-unredirect_overlays=false
+unredirect_overlays=true
 use_compositing=false
 workspace_count=4
 wrap_cycle=true

Modified: xfwm4/trunk/mcs-plugin/wmtweaks_plugin.c
===
--- xfwm4/trunk/mcs-plugin/wmtweaks_plugin.c2007-12-08 10:46:08 UTC (rev 
26451)
+++ xfwm4/trunk/mcs-plugin/wmtweaks_plugin.c2007-12-09 11:22:37 UTC (rev 
26452)
@@ -76,7 +76,7 @@
 static gboolean scroll_workspaces = TRUE;
 static gboolean snap_resist = FALSE;
 static gboolean toggle_workspaces = FALSE;
-static gboolean unredirect_overlays = FALSE;
+static gboolean unredirect_overlays = TRUE;
 static gboolean use_compositing = FALSE;
 static gboolean wrap_layout = FALSE;
 static gboolean wrap_cycle = FALSE;

Modified: xfwm4/trunk/src/compositor.c
===
--- xfwm4/trunk/src/compositor.c2007-12-08 10:46:08 UTC (rev 26451)
+++ xfwm4/trunk/src/compositor.c2007-12-09 11:22:37 UTC (rev 26452)
@@ -73,7 +73,7 @@
 #define WIN_IS_DOCK(cw) (WIN_HAS_CLIENT(cw) && (cw->c->type & 
WINDOW_DOCK))
 #define WIN_IS_OVERRIDE(cw) (cw->attr.override_redirect)
 #define WIN_IS_ARGB(cw) (cw->argb)
-#define WIN_IS_OPAQUE(cw)   (((cw->opacity == NET_WM_OPAQUE) && 
!WIN_IS_ARGB(cw)) || (cw->screen_info->overlays))
+#define WIN_IS_OPAQUE(cw)   ((cw->opacity == NET_WM_OPAQUE) && 
!WIN_IS_ARGB(cw))
 #define WIN_IS_NATIVE_OPAQUE(cw)((cw->native_opacity) && 
!WIN_IS_ARGB(cw))
 #define WIN_IS_FULLSCREEN(cw)   ((cw->attr.x <= 0) && \
(cw->attr.y <= 0) && \
@@ -550,7 +550,7 @@
 return (None);
 }
 
-shadowPixmap = XCreatePixmap (display_info->dpy, screen_info->xroot,
+shadowPixmap = XCreatePixmap (display_info->dpy, screen_info->output,
 shadowImage->width, shadowImage->height, 8);
 if (shadowPixmap == None)
 {
@@ -603,7 +603,7 @@
 g_return_val_if_fail (render_format != NULL , None);
 
 pixmap = XCreatePixmap (display_info->dpy,
-screen_info->xroot, 1, 1, argb ? 32 : 8);
+screen_info->output, 1, 1, argb ? 32 : 8);
 g_return_val_if_fail (pixmap != None, None);
 
 pa.repeat = TRUE;
@@ -815,7 +815,7 @@
 #endif
 if (!pixmap)
 {
-pixmap = XCreatePixmap (dpy, screen_info->xroot, 1, 1,
+pixmap = XCreatePixmap (dpy, screen_info->output, 1, 1,
 DefaultDepth (dpy, screen_info->screen));
 g_return_val_if_fail (pixmap != None, None);
 fill = TRUE;
@@ -867,7 +867,7 @@
 g_return_val_if_fail (format != NULL, None);
 
 rootPixmap = XCreatePixmap (display_info->dpy,
-screen_info->xroot,
+screen_info->output,
 screen_width, screen_height, depth);
 g_return_val_if_fail (rootPixmap != None, None);
 
@@ -920,15 +920,13 @@
 
 /*
We apply a shadow to the window if:
-   - There is no overlay (ie unredirected windows)
- It's a window with a frame and the user asked for shadows under 
regular
  windows,
- it's an override redirect window that is not shaped, not an argb and
  the user asked for shadows on so called "popup" windows.
  */
 
-if (!(screen_info->overlays) &&
- ((screen_info->params->show_popup_shadow &&
+if ((screen_info->params->show_popup_shadow &&
   WIN_IS_OVERRIDE(cw) &&
   !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) ||
   (screen_info->params->show_frame_shadow &&
@@ -940,7 +938,7 @@
   WIN_IS_DOCK(cw) &&
   !WIN_NO_SHADOW(cw) &&
   !WIN_IS_OVERRIDE(cw) &&
-  (!(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))
+  (!(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw)
 {
 XRectangle sr;
 
@@ -1233,7 +1231,6 @@
 gint screen_width;
 gint screen_height;
 gint screen

[Xfce4-commits] r26438 - xfwm4/branches/xfce_4_0/src

2007-12-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-03 21:51:48 + (Mon, 03 Dec 2007)
New Revision: 26438

Modified:
   xfwm4/branches/xfce_4_0/src/hints.c
Log:
Remove trailing \0 in UTF-8 strings, that causes libwnck to rightfully complain 
that NET_WM_NAME contains invalid UTF-8

Modified: xfwm4/branches/xfce_4_0/src/hints.c
===
--- xfwm4/branches/xfce_4_0/src/hints.c 2007-12-03 21:51:16 UTC (rev 26437)
+++ xfwm4/branches/xfce_4_0/src/hints.c 2007-12-03 21:51:48 UTC (rev 26438)
@@ -661,7 +661,7 @@
 TRACE ("entering set_utf8_string_hint");
 
 XChangeProperty (dpy, w, atom, utf8_string, 8, PropModeReplace,
-(unsigned char *) val, strlen (val) + 1);
+(unsigned char *) val, strlen (val));
 }
 
 void

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26437 - xfwm4/branches/xfce_4_2/src

2007-12-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-03 21:51:16 + (Mon, 03 Dec 2007)
New Revision: 26437

Modified:
   xfwm4/branches/xfce_4_2/src/hints.c
Log:
Remove trailing \0 in UTF-8 strings, that causes libwnck to rightfully complain 
that NET_WM_NAME contains invalid UTF-8

Modified: xfwm4/branches/xfce_4_2/src/hints.c
===
--- xfwm4/branches/xfce_4_2/src/hints.c 2007-12-03 21:50:46 UTC (rev 26436)
+++ xfwm4/branches/xfce_4_2/src/hints.c 2007-12-03 21:51:16 UTC (rev 26437)
@@ -546,7 +546,7 @@
 
 XChangeProperty (display_info->dpy, w, display_info->atoms[atom_id], 
  display_info->atoms[UTF8_STRING], 8, PropModeReplace,
- (unsigned char *) val, strlen (val) + 1);
+ (unsigned char *) val, strlen (val));
 }
 
 void

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26436 - xfwm4/branches/xfce_4_4/src

2007-12-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-03 21:50:46 + (Mon, 03 Dec 2007)
New Revision: 26436

Modified:
   xfwm4/branches/xfce_4_4/src/hints.c
Log:
Remove trailing \0 in UTF-8 strings, that causes libwnck to rightfully complain 
that NET_WM_NAME contains invalid UTF-8

Modified: xfwm4/branches/xfce_4_4/src/hints.c
===
--- xfwm4/branches/xfce_4_4/src/hints.c 2007-12-03 21:44:29 UTC (rev 26435)
+++ xfwm4/branches/xfce_4_4/src/hints.c 2007-12-03 21:50:46 UTC (rev 26436)
@@ -611,7 +611,7 @@
 
 XChangeProperty (display_info->dpy, w, display_info->atoms[atom_id],
  display_info->atoms[UTF8_STRING], 8, PropModeReplace,
- (unsigned char *) val, strlen (val) + 1);
+ (unsigned char *) val, strlen (val));
 }
 
 void

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26435 - xfwm4/trunk/src

2007-12-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-03 21:44:29 + (Mon, 03 Dec 2007)
New Revision: 26435

Modified:
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/keyboard.c
Log:
Rework key grabbing and release events queued

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-12-03 21:43:32 UTC (rev 26434)
+++ xfwm4/trunk/src/events.c2007-12-03 21:44:29 UTC (rev 26435)
@@ -343,7 +343,7 @@
 TRACE ("entering handleKeyEvent");
 
 /* Release queued events */
-XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
+XAllowEvents (display_info->dpy, AsyncKeyboard, ev->time);
 
 status = EVENT_FILTER_PASS;
 ev_screen_info = myDisplayGetScreenFromRoot (display_info, ev->root);
@@ -1002,7 +1002,7 @@
 clientRaise (c, None);
 }
 }
-XAllowEvents (display_info->dpy, ReplayPointer, CurrentTime);
+XAllowEvents (display_info->dpy, ReplayPointer, ev->time);
 }
 
 return EVENT_FILTER_REMOVE;

Modified: xfwm4/trunk/src/keyboard.c
===
--- xfwm4/trunk/src/keyboard.c  2007-12-03 21:43:32 UTC (rev 26434)
+++ xfwm4/trunk/src/keyboard.c  2007-12-03 21:44:29 UTC (rev 26435)
@@ -175,35 +175,35 @@
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier, w,
-TRUE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeAsync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | ScrollLockMask, w,
-TRUE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeAsync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | NumLockMask, w,
-TRUE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeAsync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | LockMask, w,
-TRUE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeAsync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | ScrollLockMask | 
NumLockMask, w,
-TRUE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeAsync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | ScrollLockMask | 
LockMask, w,
-TRUE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeAsync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | LockMask | 
NumLockMask, w,
-TRUE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeAsync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | ScrollLockMask | 
LockMask | NumLockMask, w,
-TRUE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeAsync);
 }
 }
 

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26434 - xfwm4/trunk/src

2007-12-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-03 21:43:32 + (Mon, 03 Dec 2007)
New Revision: 26434

Modified:
   xfwm4/trunk/src/focus.c
Log:
Rework focus transition since now parents get raised along with the transients 
- That makes things more predictible.

Modified: xfwm4/trunk/src/focus.c
===
--- xfwm4/trunk/src/focus.c 2007-12-03 21:41:38 UTC (rev 26433)
+++ xfwm4/trunk/src/focus.c 2007-12-03 21:43:32 UTC (rev 26434)
@@ -305,7 +305,7 @@
 new_focus = NULL;
 current_focus = client_focus;
 c2 = NULL;
-#if 0
+#if 1
 if (pending_focus)
 {
 current_focus = pending_focus;
@@ -323,14 +323,15 @@
 
 display_info = screen_info->display_info;
 top_most = clientGetTopMostFocusable (screen_info, look_in_layer, exclude);
+#if 0
 if (screen_info->params->click_to_focus)
 {
 if (c)
 {
-if (clientIsTransientOrModal (c))
+if (clientIsModal (c))
 {
-/* If the window is a transient or modal, send focus back to
- * its parent window.
+/* If the window is a modal, send focus back to its parent
+ * window.
  * Modals are transients, and we aren't interested in modal
  * for group, so it safe to use clientGetTransient because
  * it's really what we want...
@@ -353,7 +354,10 @@
 }
 }
 }
-else if (XQueryPointer (myScreenGetXDisplay (screen_info), 
screen_info->xroot, &dr, &window, &rx, &ry, &wx, &wy, &mask))
+else
+#endif
+if (!(screen_info->params->click_to_focus) &&
+XQueryPointer (myScreenGetXDisplay (screen_info), screen_info->xroot, 
&dr, &window, &rx, &ry, &wx, &wy, &mask))
 {
 new_focus = clientAtPosition (screen_info, rx, ry, exclude);
 }

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26433 - xfwm4/trunk/src

2007-12-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-12-03 21:41:38 + (Mon, 03 Dec 2007)
New Revision: 26433

Modified:
   xfwm4/trunk/src/hints.c
Log:
Remove trailing \0 in UTF-8 strings, that cause libwnck to rightfully complain 
that NET_WM_NAME contains invalid UTF-8

Modified: xfwm4/trunk/src/hints.c
===
--- xfwm4/trunk/src/hints.c 2007-12-03 17:50:17 UTC (rev 26432)
+++ xfwm4/trunk/src/hints.c 2007-12-03 21:41:38 UTC (rev 26433)
@@ -611,7 +611,7 @@
 
 XChangeProperty (display_info->dpy, w, display_info->atoms[atom_id],
  display_info->atoms[UTF8_STRING], 8, PropModeReplace,
- (unsigned char *) val, strlen (val) + 1);
+ (unsigned char *) val, strlen (val));
 }
 
 void

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26365 - xfwm4/branches/xfce_4_4/src

2007-11-17 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-17 20:37:15 + (Sat, 17 Nov 2007)
New Revision: 26365

Modified:
   xfwm4/branches/xfce_4_4/src/client.c
Log:
Minor indentation fix

Modified: xfwm4/branches/xfce_4_4/src/client.c
===
--- xfwm4/branches/xfce_4_4/src/client.c2007-11-17 20:36:36 UTC (rev 
26364)
+++ xfwm4/branches/xfce_4_4/src/client.c2007-11-17 20:37:15 UTC (rev 
26365)
@@ -4956,7 +4956,7 @@
 status = EVENT_FILTER_STOP;
 pressed = TRUE;
 
-   switch (xevent->type)
+switch (xevent->type)
 {
 case EnterNotify:
 if ((xevent->xcrossing.mode != NotifyGrab) && 
(xevent->xcrossing.mode != NotifyUngrab))

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26364 - xfwm4/branches/xfce_4_2/src

2007-11-17 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-17 20:36:36 + (Sat, 17 Nov 2007)
New Revision: 26364

Modified:
   xfwm4/branches/xfce_4_2/src/client.c
Log:
Filter out grab/ungrab events so we don't end up redrawing the frame twice

Modified: xfwm4/branches/xfce_4_2/src/client.c
===
--- xfwm4/branches/xfce_4_2/src/client.c2007-11-17 20:33:24 UTC (rev 
26363)
+++ xfwm4/branches/xfce_4_2/src/client.c2007-11-17 20:36:36 UTC (rev 
26364)
@@ -1,24 +1,24 @@
 /*  $Id$
- 
+
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2, or (at your option)
 any later version.
- 
+
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
- 
+
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- 
+
 oroborus - (c) 2001 Ken Lynch
 xfwm4- (c) 2002-2004 Olivier Fourdan
- 
+
  */
- 
+
 #ifdef HAVE_CONFIG_H
 #include 
 #endif
@@ -262,12 +262,12 @@
 wc.width = c->width;
 wc.height = c->height;
 clientConfigure (c, &wc, CWX | CWY | CWWidth | CWHeight, 
CFG_FORCE_REDRAW);
-setNetFrameExtents (screen_info->display_info, 
-c->window, 
+setNetFrameExtents (screen_info->display_info,
+c->window,
 frameTop (c),
 frameLeft (c),
 frameRight (c),
-frameBottom (c)); 
+frameBottom (c));
 }
 if (mask & UPDATE_FRAME)
 {
@@ -1510,7 +1510,7 @@
 #ifdef HAVE_LIBSTARTUP_NOTIFICATION
 c->startup_id = NULL;
 #endif
- 
+
 shaped = clientCheckShape(c);
 if (shaped)
 {
@@ -1640,10 +1640,10 @@
 attributes.event_mask = (FRAME_EVENT_MASK | POINTER_EVENT_MASK);
 attributes.win_gravity = StaticGravity;
 attributes.bit_gravity = StaticGravity;
-
+
 c->frame =
-XCreateWindow (display_info->dpy, screen_info->xroot, 
-frameX (c), frameY (c), frameWidth (c), frameHeight (c), 0, 
+XCreateWindow (display_info->dpy, screen_info->xroot,
+frameX (c), frameY (c), frameWidth (c), frameHeight (c), 0,
 screen_info->depth, InputOutput, screen_info->visual,
 valuemask, &attributes);
 XSetWindowBorderWidth (display_info->dpy, c->window, 0);
@@ -1694,10 +1694,10 @@
 xfwmWindowCreate (display_info->dpy, c->frame, &c->buttons[i], None);
 }
 
-/* Put the window on top to avoid XShape, that speeds up hw accelerated 
+/* Put the window on top to avoid XShape, that speeds up hw accelerated
GL apps dramatically */
 XRaiseWindow (display_info->dpy, c->window);
-
+
 TRACE ("now calling configure for the new window \"%s\" (0x%lx)", c->name, 
c->window);
 wc.x = c->x;
 wc.y = c->y;
@@ -1737,14 +1737,14 @@
 setWMState (display_info, c->window, IconicState);
 clientSetNetState (c);
 }
-
+
 if (!grabbed)
 {
 clientGrabMouseButton (c);
 }
 setNetFrameExtents (display_info, c->window, frameTop (c), frameLeft (c),
- frameRight (c), frameBottom 
(c)); 
-
+ frameRight (c), frameBottom 
(c));
+
 /* Window is reparented now, so we can safely release the grab
  * on the server
  */
@@ -1753,7 +1753,7 @@
 
 DBG ("client \"%s\" (0x%lx) is now managed", c->name, c->window);
 DBG ("client_count=%d", screen_info->client_count);
-
+
 return c;
 }
 
@@ -1803,17 +1803,17 @@
 
 if (!remap)
 {
-XDeleteProperty (display_info->dpy, c->window, 
+XDeleteProperty (display_info->dpy, c->window,
  display_info->atoms[NET_WM_STATE]);
-XDeleteProperty (display_info->dpy, c->window, 
+XDeleteProperty (display_info->dpy, c->window,
  display_info->atoms[WIN_STATE]);
-XDeleteProperty (display_info->dpy, c->window, 
+XDeleteProperty (display_info->dpy, c->window,
  display_info->atoms[NET_WM_DESKTOP]);
-XDeleteProperty (display_info->dpy, c->window, 
+ 

[Xfce4-commits] r26363 - xfwm4/branches/xfce_4_4/src

2007-11-17 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-17 20:33:24 + (Sat, 17 Nov 2007)
New Revision: 26363

Modified:
   xfwm4/branches/xfce_4_4/src/client.c
Log:
Filter out grab/ungrab events so we don't end up redrawing the frame twice

Modified: xfwm4/branches/xfce_4_4/src/client.c
===
--- xfwm4/branches/xfce_4_4/src/client.c2007-11-17 20:23:19 UTC (rev 
26362)
+++ xfwm4/branches/xfce_4_4/src/client.c2007-11-17 20:33:24 UTC (rev 
26363)
@@ -121,7 +121,7 @@
 };
 
 /* Forward decl */
-static void 
+static void
 clientUpdateIconPix (Client * c);
 
 Display *
@@ -348,8 +348,8 @@
 if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
 {
 c->blink_timeout_id =
-g_timeout_add_full (G_PRIORITY_DEFAULT, 
-CLIENT_BLINK_TIMEOUT, 
+g_timeout_add_full (G_PRIORITY_DEFAULT,
+CLIENT_BLINK_TIMEOUT,
 (GtkFunction) urgent_cb,
 (gpointer) c, NULL);
 }
@@ -1183,11 +1183,11 @@
 values.events = True;
 
 c->xsync_alarm = XSyncCreateAlarm (display_info->dpy,
-   XSyncCACounter | 
-   XSyncCADelta | 
-   XSyncCAEvents | 
-   XSyncCATestType | 
-   XSyncCAValue | 
+   XSyncCACounter |
+   XSyncCADelta |
+   XSyncCAEvents |
+   XSyncCATestType |
+   XSyncCAValue |
XSyncCAValueType,
&values);
 return (c->xsync_alarm != None);
@@ -1258,9 +1258,9 @@
 TRACE ("entering clientXSyncResetTimeout");
 
 clientXSyncClearTimeout (c);
-c->xsync_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 
-  CLIENT_XSYNC_TIMEOUT, 
-  (GtkFunction) 
clientXSyncTimeout, 
+c->xsync_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT,
+  CLIENT_XSYNC_TIMEOUT,
+  (GtkFunction) clientXSyncTimeout,
   (gpointer) c, NULL);
 }
 
@@ -1634,7 +1634,7 @@
 update_icon_idle_cb (gpointer data)
 {
 Client *c;
-
+
 TRACE ("entering update_icon_idle_cb");
 
 c = (Client *) data;
@@ -1659,7 +1659,7 @@
 
 if (c->icon_timeout_id == 0)
 {
-c->icon_timeout_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, 
+c->icon_timeout_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
   update_icon_idle_cb, c, NULL);
 }
 }
@@ -1925,7 +1925,7 @@
 }
 }
 
-/* 
+/*
Initialize "old" fields once the position is ensured, to avoid
initially maximized or fullscreen windows being placed offscreen
once de-maximized
@@ -2590,7 +2590,7 @@
 for (index = screen_info->windows_stack; index; index = g_list_next 
(index))
 {
 Client *c = (Client *) index->data;
-if ((c->type & WINDOW_REGULAR_FOCUSABLE) 
+if ((c->type & WINDOW_REGULAR_FOCUSABLE)
 && !FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED | 
CLIENT_FLAG_SKIP_TASKBAR))
 {
 FLAG_SET (c->xfwm_flags, XFWM_FLAG_WAS_SHOWN);
@@ -2643,7 +2643,7 @@
 }
 else
 {
-TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", 
c->name, c->window); 
+TRACE ("Setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", 
c->name, c->window);
 FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
 clientSetNetState (c);
 }
@@ -2779,7 +2779,7 @@
 wc.y = c->y;
 mask |= (CWX | CWY);
 }
-
+
 if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
 {
 c->ignore_unmap++;
@@ -4064,7 +4064,7 @@
 
 g1 = myScreenGrabKeyboard (screen_info, myDisplayGetCurrentTime 
(display_info));
 g2 = myScreenGrabPointer (screen_info, ButtonMotionMask | 
ButtonReleaseMask,
-  myDisplayGetCursorMove (display_info), 
+  myDisplayGetCursorMove (display_info),
   myDisplayGetCurrentTime (display_info));
 if (!g1 || !g2)
 {
@@ -4470,7 +4470,7 @@
 || (!clientCkeckTitle (c) && (frame_y < screen_info->margins 
[STRUTS_TOP])))
 {
 temp = c->y + c->height;
-c->y = CLAMP (c->y, screen_info->margins [STRUTS_TOP] + 
frame_top, 
+c->y = CLAMP (c->y, screen_info->margins

[Xfce4-commits] r26362 - xfwm4/trunk/src

2007-11-17 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-17 20:23:19 + (Sat, 17 Nov 2007)
New Revision: 26362

Modified:
   xfwm4/trunk/src/client.c
Log:
Filter out grab/ungrab events so we don't end up redrawing the frame twice

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-11-17 18:54:43 UTC (rev 26361)
+++ xfwm4/trunk/src/client.c2007-11-17 20:23:19 UTC (rev 26362)
@@ -5228,32 +5228,39 @@
 status = EVENT_FILTER_STOP;
 pressed = TRUE;
 
-if (xevent->type == EnterNotify)
+switch (xevent->type)
 {
-c->button_status[b] = BUTTON_STATE_PRESSED;
-frameDraw (c, FALSE);
+case EnterNotify:
+if ((xevent->xcrossing.mode != NotifyGrab) && 
(xevent->xcrossing.mode != NotifyUngrab))
+{
+c->button_status[b] = BUTTON_STATE_PRESSED;
+frameDraw (c, FALSE);
+}
+break;
+case LeaveNotify:
+if ((xevent->xcrossing.mode != NotifyGrab) && 
(xevent->xcrossing.mode != NotifyUngrab))
+{
+c->button_status[b] = BUTTON_STATE_NORMAL;
+frameDraw (c, FALSE);
+}
+break;
+case ButtonRelease:
+pressed = FALSE;
+break;
+case UnmapNotify:
+if (xevent->xunmap.window == c->window)
+{
+pressed = FALSE;
+c->button_status[b] = BUTTON_STATE_NORMAL;
+}
+break;
+case KeyPress:
+case KeyRelease:
+break;
+default:
+status = EVENT_FILTER_CONTINUE;
+break;
 }
-else if (xevent->type == LeaveNotify)
-{
-c->button_status[b] = BUTTON_STATE_NORMAL;
-frameDraw (c, FALSE);
-}
-else if (xevent->type == ButtonRelease)
-{
-pressed = FALSE;
-}
-else if ((xevent->type == UnmapNotify) && (xevent->xunmap.window == 
c->window))
-{
-pressed = FALSE;
-c->button_status[b] = BUTTON_STATE_NORMAL;
-}
-else if ((xevent->type == KeyPress) || (xevent->type == KeyRelease))
-{
-}
-else
-{
-status = EVENT_FILTER_CONTINUE;
-}
 
 if (!pressed)
 {
@@ -5378,6 +5385,7 @@
 {
 ScreenInfo *screen_info;
 
+TRACE ("entering clientGetButtonPixmap button=%i, state=%i", button,state);
 screen_info = c->screen_info;
 switch (button)
 {

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26284 - xfwm4/branches/xfce_4_2/themes/default

2007-11-10 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-10 20:30:19 + (Sat, 10 Nov 2007)
New Revision: 26284

Modified:
   xfwm4/branches/xfce_4_2/themes/default/title-1-inactive.xpm
Log:
Missing quote

Modified: xfwm4/branches/xfce_4_2/themes/default/title-1-inactive.xpm
===
--- xfwm4/branches/xfce_4_2/themes/default/title-1-inactive.xpm 2007-11-10 
20:29:49 UTC (rev 26283)
+++ xfwm4/branches/xfce_4_2/themes/default/title-1-inactive.xpm 2007-11-10 
20:30:19 UTC (rev 26284)
@@ -27,4 +27,4 @@
 "",
 "",
 "",
-"};
+""};

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26283 - xfwm4/branches/xfce_4_4/themes/default-4.2

2007-11-10 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-10 20:29:49 + (Sat, 10 Nov 2007)
New Revision: 26283

Modified:
   xfwm4/branches/xfce_4_4/themes/default-4.2/title-1-inactive.xpm
Log:
Missing quote

Modified: xfwm4/branches/xfce_4_4/themes/default-4.2/title-1-inactive.xpm
===
--- xfwm4/branches/xfce_4_4/themes/default-4.2/title-1-inactive.xpm 
2007-11-10 20:28:51 UTC (rev 26282)
+++ xfwm4/branches/xfce_4_4/themes/default-4.2/title-1-inactive.xpm 
2007-11-10 20:29:49 UTC (rev 26283)
@@ -27,4 +27,4 @@
 "",
 "",
 "",
-"};
+""};

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26282 - xfwm4/trunk/themes/default-4.2

2007-11-10 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-10 20:28:51 + (Sat, 10 Nov 2007)
New Revision: 26282

Modified:
   xfwm4/trunk/themes/default-4.2/title-1-inactive.xpm
Log:
Missing quote

Modified: xfwm4/trunk/themes/default-4.2/title-1-inactive.xpm
===
--- xfwm4/trunk/themes/default-4.2/title-1-inactive.xpm 2007-11-09 14:26:28 UTC 
(rev 26281)
+++ xfwm4/trunk/themes/default-4.2/title-1-inactive.xpm 2007-11-10 20:28:51 UTC 
(rev 26282)
@@ -27,4 +27,4 @@
 "",
 "",
 "",
-"};
+""};

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26274 - xfwm4/trunk/src

2007-11-07 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-07 22:26:34 + (Wed, 07 Nov 2007)
New Revision: 26274

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/focus.c
Log:
Keep transients and parent together

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-11-07 22:01:28 UTC (rev 26273)
+++ xfwm4/trunk/src/client.c2007-11-07 22:26:34 UTC (rev 26274)
@@ -4990,8 +4990,6 @@
 if (passdata->c == NULL)
 {
 return EVENT_FILTER_CONTINUE;
-/*  will never be executed */
-/* gtk_main_quit (); */
 }
 
 c = passdata->c;
@@ -5178,6 +5176,7 @@
 if (passdata.c)
 {
 Client *focused;
+Client *sibling;
 int workspace;
 
 c = passdata.c;
@@ -5195,9 +5194,10 @@
 clientAdjustFullscreenLayer (focused, FALSE);
 }
 
-clientShow (c, TRUE);
+sibling = clientGetTransientFor(c);
+clientRaise (sibling, None);
+clientShow (sibling, TRUE);
 clientSetFocus (screen_info, c, myDisplayGetCurrentTime 
(display_info), NO_FOCUS_FLAG);
-clientRaise (c, None);
 }
 
 myScreenUngrabKeyboard (screen_info);

Modified: xfwm4/trunk/src/focus.c
===
--- xfwm4/trunk/src/focus.c 2007-11-07 22:01:28 UTC (rev 26273)
+++ xfwm4/trunk/src/focus.c 2007-11-07 22:26:34 UTC (rev 26274)
@@ -327,12 +327,13 @@
 {
 if (c)
 {
-if (clientIsModal (c))
+if (clientIsTransientOrModal (c))
 {
-/* If the window is a modal, send focus back to its parent 
window.
-   Modals are transients, and we aren't interested in modal
-   for group, so it safe to use clientGetTransient because
-   it's really what we want...
+/* If the window is a transient or modal, send focus back to
+ * its parent window.
+ * Modals are transients, and we aren't interested in modal
+ * for group, so it safe to use clientGetTransient because
+ * it's really what we want...
  */
 c2 = clientGetTransient (c);
 if (c2 && FLAG_TEST(c2->xfwm_flags, XFWM_FLAG_VISIBLE))

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26273 - xfwm4/branches/xfce_4_4

2007-11-07 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-07 22:01:28 + (Wed, 07 Nov 2007)
New Revision: 26273

Modified:
   xfwm4/branches/xfce_4_4/ChangeLog
   xfwm4/branches/xfce_4_4/NEWS
Log:
Update ChangeLog

Modified: xfwm4/branches/xfce_4_4/ChangeLog
===
--- xfwm4/branches/xfce_4_4/ChangeLog   2007-11-07 21:52:03 UTC (rev 26272)
+++ xfwm4/branches/xfce_4_4/ChangeLog   2007-11-07 22:01:28 UTC (rev 26273)
@@ -1,3 +1,172 @@
+2007-09-03 17:30  mmassonnet
+
+   * po/ChangeLog, po/pt_PT.po: * Update Portuguese translations by
+ Nuno Miguel.
+
+2007-08-28 22:44  omaciel
+
+   * po/ChangeLog, po/pt_BR.po: Updated translations for Brazilian
+ Portuguese by Fabio Nogueira.
+
+2007-08-23 22:24  pollux
+
+   * po/ChangeLog, po/sk.po: Updated Slovak translations
+
+2007-07-01 07:08  maximilian
+
+   * po/ChangeLog, po/pt_BR.po: Updated the Brazilian Portuguese
+ translations for the xfwm4 and mousepad packages. Updated a
+ mysteriously forgotten European Portuguese translation for the
+ xfdesktop package.
+
+2007-06-26 21:10  olivier
+
+   * NEWS, src/client.c, src/netwm.c: Be more relax with transients,
+ allow transients to be sticky independently of their parent
+ window (Bug #3296)
+
+2007-06-21 22:47  olivier
+
+   * NEWS: Typo in NEWS file
+
+2007-06-21 22:28  olivier
+
+   * NEWS, src/client.c, src/display.c, src/display.h, src/hints.c,
+ src/hints.h: Fix xfwm4 hanging with gtk+-2.11.x (Bug #3346) -
+ Patch based on a similar fix for Metacity, see gnome bug #354213
+
+2007-06-16 23:17  olivier
+
+   * NEWS, src/client.c, src/settings.c: Plug a leak in mouse button
+ grab when changing theme
+
+2007-06-16 19:15  maximilian
+
+   * po/ChangeLog, po/nl.po: * nl.po: Updated some Xfce 4.4
+ translations
+
+2007-06-15 18:01  daichi
+
+   * po/ChangeLog, po/LINGUAS, po/am.po: Added Amharic translations by
+ Tegegne Tefera <[EMAIL PROTECTED]>.
+
+2007-06-14 20:58  maximilian
+
+   * po/ChangeLog, po/pt_PT.po: * nl.po: Updated Thunar's translation
+ * ka.po: Updated Xfce 4.0 translations
+ * pt_PT.po: Updated and added new files to the Xfce 4.4
+ translations
+
+2007-06-10 23:25  maximilian
+
+   * po/ChangeLog, po/fr.po, po/nb_NO.po: * nb_NO: Updated some
+ Norwegian translations and added one for Xfmedia
+ * pt_PT: Added European Portuguese translations
+ * Changed my email address
+
+2007-06-03 15:33  olivier
+
+   * src/placement.c: Small indentation issue
+
+2007-06-03 15:21  olivier
+
+   * NEWS, src/placement.c, src/placement.h: Fix dialogs and modals
+ without parents not being automatically centered like before
+ (#Bug #3278)
+
+2007-06-03 08:21  olivier
+
+   * src/settings.c: Woops, those BUTTON_COUNT/BUTTON_LAST are really
+ confusing, I should fix that.
+
+2007-06-03 00:00  olivier
+
+   * src/client.c, src/settings.c: Leak fix (backported from a patch
+ by Phil Vandry <[EMAIL PROTECTED]>)
+
+2007-05-24 19:39  olivier
+
+   * doc/C/xfwm4.html, doc/fr/xfwm4.html, doc/it/xfwm4.html: Update
+ doc
+
+2007-05-15 18:28  jari
+
+   * po/ChangeLog, po/fi.po: Updated Finnish translation.
+
+2007-05-13 08:40  maximilian
+
+   * po/ChangeLog: Updated the Changelogs...
+
+2007-05-13 08:28  maximilian
+
+   * po/nb_NO.po: Updated and added Norwegian Bokmal translations to
+ the 4.4 branch.
+
+2007-05-07 18:27  maximilian
+
+   * po/ChangeLog, po/it.po: Updated the Italian translations in
+ branch and updated the AUTHORS files.
+
+2007-05-02 21:08  olivier
+
+   * src/keyboard.c: Code cleanup
+
+2007-05-02 05:47  olivier
+
+   * NEWS, src/keyboard.c: Fix modifier mask not working with all
+ keynaps (Bug #3194)
+
+2007-05-01 15:03  olivier
+
+   * src/keyboard.c: Small cleanup
+
+2007-05-01 14:38  olivier
+
+   * src/keyboard.c: Revert to modifier mapping from xfwm4 version 4.0
+ (Bug #3194)
+
+2007-04-27 20:01  olivier
+
+   * NEWS: Update NEWS file
+
+2007-04-27 20:01  olivier
+
+   * Makefile.am, src/events.c, src/settings.h: Fix wrong count of key
+ shortcut causing switch to last workspace on modifier key press
+ if no window is focused (Bug #3191), fix spec file missing from
+ the tar ball causing 'make dist' to fail
+
+2007-04-22 21:04  olivier
+
+   * NEWS, src/stacking.c: Fix strick bound checking causing wrong
+ window to be focused in focus follow mouse (Bug #2781)
+
+2007-04-20 21:30  olivier
+
+   * NEWS, src/transients.c: Transients for group shouldn't apply to
+ other transients, or it breaks stacking for some apps, noticeably
+ mozilla "save as" dialog...
+
+2007-04-16 10:10  piarres
+
+   * po/ChangeLog, po/eu.po: xfwm4 basque translationupdate (4.4)
+
+2007-04-15 11:06  olivier
+
+ 

[Xfce4-commits] r26272 - xfwm4/branches/xfce_4_4/src

2007-11-07 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-07 21:52:03 + (Wed, 07 Nov 2007)
New Revision: 26272

Modified:
   xfwm4/branches/xfce_4_4/src/client.c
Log:
Apply a patch from Andreas Lampersperger <[EMAIL PROTECTED]> to improve ICCCM 
compliance regarding synthetic ConfigureNotify event (Bug #3610)

Modified: xfwm4/branches/xfce_4_4/src/client.c
===
--- xfwm4/branches/xfce_4_4/src/client.c2007-11-07 20:22:20 UTC (rev 
26271)
+++ xfwm4/branches/xfce_4_4/src/client.c2007-11-07 21:52:03 UTC (rev 
26272)
@@ -683,6 +683,11 @@
 TRACE ("configuring client \"%s\" (0x%lx) %s, type %u", c->name,
 c->window, flags & CFG_CONSTRAINED ? "constrained" : "not contrained", 
c->type);
 
+px = c->x;
+py = c->y;
+pwidth = c->width;
+pheight = c->height;
+
 if (mask & CWX)
 {
 if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING))
@@ -757,11 +762,6 @@
  && CONSTRAINED_WINDOW (c)
  && !((c->gravity == StaticGravity) && (c->x == 0) && (c->y == 0)))
 {
-px = c->x;
-py = c->y;
-pwidth = c->width;
-pheight = c->height;
-
 /* Keep fully visible only on resize */
 clientConstrainPos (c, (mask & (CWWidth | CWHeight)));
 
@@ -769,25 +769,42 @@
 {
 mask |= CWX;
 }
+else
+{
+mask &= ~CWX;
+}
+
 if (c->y != py)
 {
 mask |= CWY;
 }
+else
+{
+mask &= ~CWY;
+}
 
 if (c->width != pwidth)
 {
 mask |= CWWidth;
 }
+else
+{
+mask &= ~CWWidth;
+}
 if (c->height != pheight)
 {
 mask |= CWHeight;
 }
+else
+{
+mask &= ~CWHeight;
+}
 }
 
 clientConfigureWindows (c, wc, mask, flags);
 /*
 
-  We reparent to client window. According to the ICCCM spec, the
+  We reparent the client window. According to the ICCCM spec, the
   WM must send a senthetic event when the window is moved and not resized.
 
   But, since we reparent the window, we must also send a synthetic

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26263 - xfwm4/trunk/src

2007-11-06 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-06 22:53:58 + (Tue, 06 Nov 2007)
New Revision: 26263

Modified:
   xfwm4/trunk/src/events.c
Log:
Revert to current time for releasing queued input events (simpler, safer)

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-11-06 22:52:31 UTC (rev 26262)
+++ xfwm4/trunk/src/events.c2007-11-06 22:53:58 UTC (rev 26263)
@@ -342,8 +342,8 @@
 
 TRACE ("entering handleKeyEvent");
 
-/* Release queued events at the time of the event */
-XAllowEvents (display_info->dpy, AsyncKeyboard, ev->time);
+/* Release queued events */
+XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
 
 status = EVENT_FILTER_PASS;
 ev_screen_info = myDisplayGetScreenFromRoot (display_info, ev->root);
@@ -1002,7 +1002,7 @@
 clientRaise (c, None);
 }
 }
-XAllowEvents (display_info->dpy, ReplayPointer, ev->time);
+XAllowEvents (display_info->dpy, ReplayPointer, CurrentTime);
 }
 
 return EVENT_FILTER_REMOVE;

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26262 - xfwm4/trunk/src

2007-11-06 Thread Olivier Fourdan
Author: olivier
Date: 2007-11-06 22:52:31 + (Tue, 06 Nov 2007)
New Revision: 26262

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/display.h
Log:
Get highest user time at initial client capture

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-11-05 19:46:36 UTC (rev 26261)
+++ xfwm4/trunk/src/client.c2007-11-06 22:52:31 UTC (rev 26262)
@@ -1586,7 +1586,7 @@
 if (getNetWMUserTime (display_info, c->window, &c->user_time) && 
(c->user_time != 0))
 {
 FLAG_SET (c->flags, CLIENT_FLAG_HAS_USER_TIME);
-myDisplaySetLastUserTime (display_info, c->user_time);
+myDisplayUpdateLastUserTime (display_info, c->user_time);
 }
 }
 

Modified: xfwm4/trunk/src/display.c
===
--- xfwm4/trunk/src/display.c   2007-11-05 19:46:36 UTC (rev 26261)
+++ xfwm4/trunk/src/display.c   2007-11-06 22:52:31 UTC (rev 26262)
@@ -753,6 +753,18 @@
 display->last_user_time = timestamp;
 }
 
+void
+myDisplayUpdateLastUserTime (DisplayInfo *display, Time timestamp)
+{
+g_return_if_fail (display != NULL);
+g_return_if_fail (timestamp != (Time) 0);
+
+if (TIMESTAMP_IS_BEFORE(display->last_user_time, timestamp))
+{
+   display->last_user_time = timestamp;
+}
+}
+
 gboolean
 myDisplayTestXrender (DisplayInfo *display, gdouble min_time)
 {

Modified: xfwm4/trunk/src/display.h
===
--- xfwm4/trunk/src/display.h   2007-11-05 19:46:36 UTC (rev 26261)
+++ xfwm4/trunk/src/display.h   2007-11-06 22:52:31 UTC (rev 26262)
@@ -384,6 +384,8 @@
 Time myDisplayGetLastUserTime   (DisplayInfo 
*);
 void myDisplaySetLastUserTime   (DisplayInfo *,
  Time);
+void myDisplayUpdateLastUserTime(DisplayInfo 
*, 
+ Time);
 gboolean myDisplayTestXrender   (DisplayInfo *,
  gdouble);
 

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26214 - xfwm4/trunk/src

2007-10-28 Thread Olivier Fourdan
Author: olivier
Date: 2007-10-28 22:18:37 + (Sun, 28 Oct 2007)
New Revision: 26214

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/events.c
Log:
Remove warnings

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-10-28 19:29:01 UTC (rev 26213)
+++ xfwm4/trunk/src/client.c2007-10-28 22:18:37 UTC (rev 26214)
@@ -1583,7 +1583,7 @@
 screen_info = c->screen_info;
 display_info = screen_info->display_info;
 
-if (getNetWMUserTime (display_info, c->window, &c->user_time))
+if (getNetWMUserTime (display_info, c->window, &c->user_time) && 
(c->user_time != 0))
 {
 FLAG_SET (c->flags, CLIENT_FLAG_HAS_USER_TIME);
 myDisplaySetLastUserTime (display_info, c->user_time);

Modified: xfwm4/trunk/src/display.c
===
--- xfwm4/trunk/src/display.c   2007-10-28 19:29:01 UTC (rev 26213)
+++ xfwm4/trunk/src/display.c   2007-10-28 22:18:37 UTC (rev 26214)
@@ -746,7 +746,7 @@
 g_return_if_fail (display != NULL);
 g_return_if_fail (timestamp != (Time) 0);
 
-if (!TIMESTAMP_IS_BEFORE(display->last_user_time, timestamp))
+if (TIMESTAMP_IS_BEFORE(timestamp, display->last_user_time))
 {
 g_warning ("Last user time set back to %u (was %u)", (unsigned int) 
timestamp, (unsigned int) display->last_user_time);
 }

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-10-28 19:29:01 UTC (rev 26213)
+++ xfwm4/trunk/src/events.c2007-10-28 22:18:37 UTC (rev 26214)
@@ -1988,7 +1988,7 @@
 else if (ev->atom == display_info->atoms[NET_WM_USER_TIME])
 {
 TRACE ("client \"%s\" (0x%lx) has received a NET_WM_USER_TIME 
notify", c->name, c->window);
-if (getNetWMUserTime (display_info, c->window, &c->user_time))
+if (getNetWMUserTime (display_info, c->window, &c->user_time) && 
(c->user_time != 0))
 {
 myDisplaySetLastUserTime (display_info, c->user_time);
 FLAG_SET (c->flags, CLIENT_FLAG_HAS_USER_TIME);

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26213 - xfwm4/trunk/src

2007-10-28 Thread Olivier Fourdan
Author: olivier
Date: 2007-10-28 19:29:01 + (Sun, 28 Oct 2007)
New Revision: 26213

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/startup_notification.c
   xfwm4/trunk/src/transients.c
   xfwm4/trunk/src/transients.h
Log:
Improve compatibily with libwnck tasklist

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-10-28 19:18:22 UTC (rev 26212)
+++ xfwm4/trunk/src/client.c2007-10-28 19:29:01 UTC (rev 26213)
@@ -2637,11 +2637,13 @@
 clientActivate (Client * c, Time timestamp)
 {
 ScreenInfo *screen_info;
+Client *sibling;
 
 g_return_if_fail (c != NULL);
 TRACE ("entering clientActivate \"%s\" (0x%lx)", c->name, c->window);
 
 screen_info = c->screen_info;
+sibling = clientGetTransientFor(c);
 if ((screen_info->current_ws == c->win_workspace) || 
(screen_info->params->activate_action != ACTIVATE_ACTION_NONE))
 {
 if (screen_info->current_ws != c->win_workspace)
@@ -2655,10 +2657,10 @@
 workspaceSwitch (screen_info, c->win_workspace, NULL, FALSE, 
timestamp);
 }
 }
-clientShow (c, TRUE);
+clientRaise (sibling, None);
+clientShow (sibling, TRUE);
 clientClearAllShowDesktop (screen_info);
 clientSetFocus (screen_info, c, timestamp, NO_FOCUS_FLAG);
-clientRaise (c, None);
 }
 else
 {

Modified: xfwm4/trunk/src/startup_notification.c
===
--- xfwm4/trunk/src/startup_notification.c  2007-10-28 19:18:22 UTC (rev 
26212)
+++ xfwm4/trunk/src/startup_notification.c  2007-10-28 19:29:01 UTC (rev 
26213)
@@ -288,7 +288,10 @@
 if ((c->user_time == (Time) 0) || TIMESTAMP_IS_BEFORE(c->user_time, 
timestamp))
 {
 c->user_time = timestamp;
-myDisplaySetLastUserTime (screen_info->display_info, c->user_time);
+if (c->user_time != (Time) 0)
+{
+myDisplaySetLastUserTime (screen_info->display_info, 
c->user_time);
+}
 }
 FLAG_SET (c->flags, CLIENT_FLAG_HAS_STARTUP_TIME);
 

Modified: xfwm4/trunk/src/transients.c
===
--- xfwm4/trunk/src/transients.c2007-10-28 19:18:22 UTC (rev 26212)
+++ xfwm4/trunk/src/transients.c2007-10-28 19:29:01 UTC (rev 26213)
@@ -293,6 +293,38 @@
 return latest_modal;
 }
 
+Client *
+clientGetTransientFor (Client * c)
+{
+ScreenInfo *screen_info;
+Client *latest_transient;
+Client *c2;
+GList *index;
+
+g_return_val_if_fail (c != NULL, NULL);
+TRACE ("entering clientGetTransientFor");
+
+latest_transient = c;
+screen_info = c->screen_info;
+for (index = g_list_last(screen_info->windows_stack); index; index = 
g_list_previous (index))
+{
+if (!clientIsTransient (latest_transient))
+{
+break;
+}
+c2 = (Client *) index->data;
+if (c2)
+{
+if (clientIsTransientFor (latest_transient, c2))
+{
+latest_transient = c2;
+}
+}
+}
+
+return latest_transient;
+}
+
 /* Build a GList of clients that have a transient relationship */
 GList *
 clientListTransient (Client * c)

Modified: xfwm4/trunk/src/transients.h
===
--- xfwm4/trunk/src/transients.h2007-10-28 19:18:22 UTC (rev 26212)
+++ xfwm4/trunk/src/transients.h2007-10-28 19:29:01 UTC (rev 26213)
@@ -47,6 +47,7 @@
 gboolean clientTransientOrModalHasAncestor  (Client *,
  int);
 Client  *clientGetModalFor  (Client *);
+Client  *clientGetTransientFor  (Client *);
 GList   *clientListTransient(Client *);
 GList   *clientListTransientOrModal (Client *);
 gboolean clientCheckTransientWindow (Client *,

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26211 - xfwm4/trunk/src

2007-10-28 Thread Olivier Fourdan
Author: olivier
Date: 2007-10-28 17:14:34 + (Sun, 28 Oct 2007)
New Revision: 26211

Modified:
   xfwm4/trunk/src/display.c
Log:
Work around time going back (like broken clients or clock change)

Modified: xfwm4/trunk/src/display.c
===
--- xfwm4/trunk/src/display.c   2007-10-28 17:06:31 UTC (rev 26210)
+++ xfwm4/trunk/src/display.c   2007-10-28 17:14:34 UTC (rev 26211)
@@ -187,7 +187,7 @@
 
 attributes.event_mask = PropertyChangeMask;
 attributes.override_redirect = TRUE;
-display_info->timestamp_win = 
+display_info->timestamp_win =
 XCreateWindow (display_info->dpy, DefaultRootWindow 
(display_info->dpy),
-100, -100, 10, 10, 0, 0, CopyFromParent, 
CopyFromParent,
CWEventMask | CWOverrideRedirect, &attributes);
@@ -744,11 +744,13 @@
 myDisplaySetLastUserTime (DisplayInfo *display, Time timestamp)
 {
 g_return_if_fail (display != NULL);
+g_return_if_fail (timestamp != (Time) 0);
 
-if (TIMESTAMP_IS_BEFORE(display->last_user_time, timestamp))
+if (!TIMESTAMP_IS_BEFORE(display->last_user_time, timestamp))
 {
-display->last_user_time = timestamp;
+g_warning ("Last user time set back to %u (was %u)", (unsigned int) 
timestamp, (unsigned int) display->last_user_time);
 }
+display->last_user_time = timestamp;
 }
 
 gboolean

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26198 - xfwm4/trunk/src

2007-10-25 Thread Olivier Fourdan
Author: olivier
Date: 2007-10-25 21:47:27 + (Thu, 25 Oct 2007)
New Revision: 26198

Modified:
   xfwm4/trunk/src/client.c
Log:
Apply a patch from Andreas Lampersperger <[EMAIL PROTECTED]> to improve ICCCM 
compliance regarding synthetic ConfigureNotify event (Bug #3610)

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-10-25 20:46:06 UTC (rev 26197)
+++ xfwm4/trunk/src/client.c2007-10-25 21:47:27 UTC (rev 26198)
@@ -687,6 +687,11 @@
 TRACE ("configuring client \"%s\" (0x%lx) %s, type %u", c->name,
 c->window, flags & CFG_CONSTRAINED ? "constrained" : "not contrained", 
c->type);
 
+px = c->x;
+py = c->y;
+pwidth = c->width;
+pheight = c->height;
+
 if (mask & CWX)
 {
 if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING))
@@ -761,11 +766,6 @@
  && CONSTRAINED_WINDOW (c)
  && !((c->gravity == StaticGravity) && (c->x == 0) && (c->y == 0)))
 {
-px = c->x;
-py = c->y;
-pwidth = c->width;
-pheight = c->height;
-
 /* Keep fully visible only on resize */
 clientConstrainPos (c, (mask & (CWWidth | CWHeight)));
 
@@ -773,25 +773,42 @@
 {
 mask |= CWX;
 }
+else
+{
+mask &= ~CWX;
+}
+
 if (c->y != py)
 {
 mask |= CWY;
 }
+else
+{
+mask &= ~CWY;
+}
 
 if (c->width != pwidth)
 {
 mask |= CWWidth;
 }
+else
+{
+mask &= ~CWWidth;
+}
 if (c->height != pheight)
 {
 mask |= CWHeight;
 }
+else
+{
+mask &= ~CWHeight;
+}
 }
 
 clientConfigureWindows (c, wc, mask, flags);
 /*
 
-  We reparent to client window. According to the ICCCM spec, the
+  We reparent the client window. According to the ICCCM spec, the
   WM must send a senthetic event when the window is moved and not resized.
 
   But, since we reparent the window, we must also send a synthetic

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26160 - xfwm4/branches/xfce_4_4/src

2007-10-20 Thread Olivier Fourdan
Author: olivier
Date: 2007-10-20 19:29:21 + (Sat, 20 Oct 2007)
New Revision: 26160

Modified:
   xfwm4/branches/xfce_4_4/src/netwm.c
Log:
Set all dock type windows sticky by default, a few other window managers 
implement this behaviour and some apps rely on this (bug #3609)

Modified: xfwm4/branches/xfce_4_4/src/netwm.c
===
--- xfwm4/branches/xfce_4_4/src/netwm.c 2007-10-20 19:21:43 UTC (rev 26159)
+++ xfwm4/branches/xfce_4_4/src/netwm.c 2007-10-20 19:29:21 UTC (rev 26160)
@@ -317,7 +317,7 @@
 if ((first  == display_info->atoms[NET_WM_STATE_STICKY]) ||
 (second == display_info->atoms[NET_WM_STATE_STICKY]))
 {
-if (!clientIsValidTransientOrModal (c) && FLAG_TEST (c->xfwm_flags, 
XFWM_FLAG_HAS_STICK))
+if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_STICK))
 {
 if ((action == NET_WM_STATE_ADD) && !FLAG_TEST (c->flags, 
CLIENT_FLAG_STICKY))
 {
@@ -1169,8 +1169,9 @@
 TRACE ("atom net_wm_window_type_dock detected");
 c->type = WINDOW_DOCK;
 c->initial_layer = WIN_LAYER_DOCK;
-FLAG_SET (c->flags,
-CLIENT_FLAG_SKIP_PAGER | CLIENT_FLAG_SKIP_TASKBAR);
+ FLAG_SET (c->flags,
+CLIENT_FLAG_SKIP_PAGER | CLIENT_FLAG_STICKY |
+CLIENT_FLAG_SKIP_TASKBAR);
 FLAG_UNSET (c->xfwm_flags,
 XFWM_FLAG_HAS_BORDER |  XFWM_FLAG_HAS_MOVE |
 XFWM_FLAG_HAS_HIDE | XFWM_FLAG_HAS_MAXIMIZE |

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26157 - xfwm4/trunk/src

2007-10-20 Thread Olivier Fourdan
Author: olivier
Date: 2007-10-20 18:30:36 + (Sat, 20 Oct 2007)
New Revision: 26157

Modified:
   xfwm4/trunk/src/netwm.c
Log:
Set all dock type windows sticky by default, a few other window managers 
implement this behaviour and some apps rely on this (bug #3609)

Modified: xfwm4/trunk/src/netwm.c
===
--- xfwm4/trunk/src/netwm.c 2007-10-20 17:22:23 UTC (rev 26156)
+++ xfwm4/trunk/src/netwm.c 2007-10-20 18:30:36 UTC (rev 26157)
@@ -317,7 +317,7 @@
 if ((first  == display_info->atoms[NET_WM_STATE_STICKY]) ||
 (second == display_info->atoms[NET_WM_STATE_STICKY]))
 {
-if (!clientIsValidTransientOrModal (c) && FLAG_TEST (c->xfwm_flags, 
XFWM_FLAG_HAS_STICK))
+if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_STICK))
 {
 if ((action == NET_WM_STATE_ADD) && !FLAG_TEST (c->flags, 
CLIENT_FLAG_STICKY))
 {
@@ -1182,8 +1182,9 @@
 TRACE ("atom net_wm_window_type_dock detected");
 c->type = WINDOW_DOCK;
 c->initial_layer = WIN_LAYER_DOCK;
-FLAG_SET (c->flags,
-CLIENT_FLAG_SKIP_PAGER | CLIENT_FLAG_SKIP_TASKBAR);
+ FLAG_SET (c->flags,
+CLIENT_FLAG_SKIP_PAGER | CLIENT_FLAG_STICKY |
+CLIENT_FLAG_SKIP_TASKBAR);
 FLAG_UNSET (c->xfwm_flags,
 XFWM_FLAG_HAS_BORDER |  XFWM_FLAG_HAS_MOVE |
 XFWM_FLAG_HAS_HIDE | XFWM_FLAG_HAS_MAXIMIZE |

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26100 - xfwm4/trunk/src

2007-09-22 Thread Olivier Fourdan
Author: olivier
Date: 2007-09-22 22:08:22 + (Sat, 22 Sep 2007)
New Revision: 26100

Modified:
   xfwm4/trunk/src/hints.c
Log:
Some broken apps include control characters in their window title name

Modified: xfwm4/trunk/src/hints.c
===
--- xfwm4/trunk/src/hints.c 2007-09-22 21:00:37 UTC (rev 26099)
+++ xfwm4/trunk/src/hints.c 2007-09-22 22:08:22 UTC (rev 26100)
@@ -810,6 +810,7 @@
 if (g_utf8_validate (ptr, -1, NULL))
 {
 retval[i] = internal_utf8_strndup (ptr, MAX_STR_LENGTH);
+xfce_utf8_remove_controls((gchar *) retval[i], -1, NULL);
 }
 else
 {
@@ -873,6 +874,7 @@
 {
 name = internal_utf8_strndup (str, MAX_STR_LENGTH);
 *title = create_name_with_host (display_info, name, machine);
+xfce_utf8_remove_controls(*title, -1, NULL);
 g_free (name);
 XFree (str);
 status = TRUE;

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26099 - libxfcegui4/trunk/libxfcegui4

2007-09-22 Thread Olivier Fourdan
Author: olivier
Date: 2007-09-22 21:00:37 + (Sat, 22 Sep 2007)
New Revision: 26099

Modified:
   libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c
Log:
Code style for previous patch

Modified: libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c
===
--- libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c2007-09-22 20:59:41 UTC 
(rev 26098)
+++ libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c2007-09-22 21:00:37 UTC 
(rev 26099)
@@ -692,8 +692,7 @@
 if(app_menu_item->priv->icon_name)
 g_free(app_menu_item->priv->icon_name);
 
-if(!filename)
-{
+if(!filename) {
 app_menu_item->priv->icon_name = NULL;
 return;
 }

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26098 - libxfcegui4/trunk/libxfcegui4

2007-09-22 Thread Olivier Fourdan
Author: olivier
Date: 2007-09-22 20:59:41 + (Sat, 22 Sep 2007)
New Revision: 26098

Modified:
   libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c
Log:
Fix crash of menu if icon file name is not defined

Modified: libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c
===
--- libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c2007-09-22 20:09:21 UTC 
(rev 26097)
+++ libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c2007-09-22 20:59:41 UTC 
(rev 26098)
@@ -691,7 +691,13 @@
 
 if(app_menu_item->priv->icon_name)
 g_free(app_menu_item->priv->icon_name);
-
+
+if(!filename)
+{
+app_menu_item->priv->icon_name = NULL;
+return;
+}
+
 app_menu_item->priv->icon_name = g_strdup(filename);
 app_menu_item->priv->icon_path = xfce_themed_icon_lookup(filename,
 _xfce_app_menu_item_icon_size);

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26060 - xfwm4/trunk/src

2007-09-09 Thread Olivier Fourdan
Author: olivier
Date: 2007-09-09 22:14:14 + (Sun, 09 Sep 2007)
New Revision: 26060

Modified:
   xfwm4/trunk/src/events.c
Log:
Do not focus dock windows that raise themselves (why oh why would they do that 
anyway, heh?) to fix bug #3439 with Avant Window Navigator.

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-09-09 21:09:54 UTC (rev 26059)
+++ xfwm4/trunk/src/events.c2007-09-09 22:14:14 UTC (rev 26060)
@@ -1430,7 +1430,7 @@
stealing prevention is not activated, otherwise we just set the 
"demands attention"
flag...
  */
-if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) && 
(wc.sibling == None))
+if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above) && 
(wc.sibling == None) && !(c->type & WINDOW_TYPE_DONT_FOCUS))
 {
 Client *last_raised;
 

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26057 - xfwm4/trunk/src

2007-09-09 Thread Olivier Fourdan
Author: olivier
Date: 2007-09-09 20:50:10 + (Sun, 09 Sep 2007)
New Revision: 26057

Modified:
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/display.h
   xfwm4/trunk/src/netwm.c
Log:
Add support for NET_WM_ACTION_FULLSCREEN and NET_WM_ACTION_MINIMIZE

Modified: xfwm4/trunk/src/display.c
===
--- xfwm4/trunk/src/display.c   2007-09-09 13:00:39 UTC (rev 26056)
+++ xfwm4/trunk/src/display.c   2007-09-09 20:50:10 UTC (rev 26057)
@@ -97,8 +97,10 @@
 "_NET_SYSTEM_TRAY_OPCODE",
 "_NET_WM_ACTION_CHANGE_DESKTOP",
 "_NET_WM_ACTION_CLOSE",
+"_NET_WM_ACTION_FULLSCREEN",
 "_NET_WM_ACTION_MAXIMIZE_HORZ",
 "_NET_WM_ACTION_MAXIMIZE_VERT",
+"_NET_WM_ACTION_MINIMIZE",
 "_NET_WM_ACTION_MOVE",
 "_NET_WM_ACTION_RESIZE",
 "_NET_WM_ACTION_SHADE",

Modified: xfwm4/trunk/src/display.h
===
--- xfwm4/trunk/src/display.h   2007-09-09 13:00:39 UTC (rev 26056)
+++ xfwm4/trunk/src/display.h   2007-09-09 20:50:10 UTC (rev 26057)
@@ -180,8 +180,10 @@
 NET_SYSTEM_TRAY_OPCODE,
 NET_WM_ACTION_CHANGE_DESKTOP,
 NET_WM_ACTION_CLOSE,
+NET_WM_ACTION_FULLSCREEN,
 NET_WM_ACTION_MAXIMIZE_HORZ,
 NET_WM_ACTION_MAXIMIZE_VERT,
+NET_WM_ACTION_MINIMIZE,
 NET_WM_ACTION_MOVE,
 NET_WM_ACTION_RESIZE,
 NET_WM_ACTION_SHADE,

Modified: xfwm4/trunk/src/netwm.c
===
--- xfwm4/trunk/src/netwm.c 2007-09-09 13:00:39 UTC (rev 26056)
+++ xfwm4/trunk/src/netwm.c 2007-09-09 20:50:10 UTC (rev 26057)
@@ -1110,7 +1110,7 @@
 {
 ScreenInfo *screen_info;
 DisplayInfo *display_info;
-Atom atoms[6];
+Atom atoms[12];
 int i;
 
 g_return_if_fail (c != NULL);
@@ -1121,11 +1121,16 @@
 i = 0;
 
 atoms[i++] = display_info->atoms[NET_WM_ACTION_CLOSE];
+atoms[i++] = display_info->atoms[NET_WM_ACTION_FULLSCREEN];
 if (CLIENT_CAN_MAXIMIZE_WINDOW (c))
 {
 atoms[i++] = display_info->atoms[NET_WM_ACTION_MAXIMIZE_HORZ];
 atoms[i++] = display_info->atoms[NET_WM_ACTION_MAXIMIZE_VERT];
 }
+if (CLIENT_CAN_HIDE_WINDOW (c))
+{
+atoms[i++] = display_info->atoms[NET_WM_ACTION_MINIMIZE];
+}
 if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_STICK))
 {
 atoms[i++] = display_info->atoms[NET_WM_ACTION_CHANGE_DESKTOP];

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r26054 - xfwm4/trunk/src

2007-09-07 Thread Olivier Fourdan
Author: olivier
Date: 2007-09-07 22:18:04 + (Fri, 07 Sep 2007)
New Revision: 26054

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/focus.c
   xfwm4/trunk/src/keyboard.c
Log:
Fix wrong focus fallback if pending focus window disappears. Allow move/resize 
using the mouse even if the keyboard grab fails (bug #3535).

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-09-07 18:37:47 UTC (rev 26053)
+++ xfwm4/trunk/src/client.c2007-09-07 22:18:04 UTC (rev 26054)
@@ -4295,12 +4295,21 @@
 g2 = myScreenGrabPointer (screen_info, ButtonMotionMask | 
ButtonReleaseMask,
   myDisplayGetCursorMove (display_info),
   myDisplayGetCurrentTime (display_info));
-if (!g1 || !g2)
+if (passdata.use_keys && !g1)
 {
-TRACE ("grab failed in clientMove");
+TRACE ("keyboard grab failed in clientMove");
 
 gdk_beep ();
 myScreenUngrabKeyboard (screen_info);
+
+return;
+}
+
+if (!g2)
+{
+TRACE ("button grab failed in clientMove");
+
+gdk_beep ();
 myScreenUngrabPointer (screen_info);
 
 return;
@@ -4363,7 +4372,10 @@
 }
 clientConfigure (c, &wc, changes, NO_CFG_FLAG);
 
-myScreenUngrabKeyboard (screen_info);
+if (g1)
+{
+myScreenUngrabKeyboard (screen_info);
+}
 if (!passdata.released)
 {
 /* If this is a drag-move, wait for the button to be released.
@@ -4840,12 +4852,21 @@
   myDisplayGetCursorResize(display_info, 
passdata.corner),
   myDisplayGetCurrentTime (display_info));
 
-if (!g1 || !g2)
+if (passdata.use_keys && !g1)
 {
-TRACE ("grab failed in clientResize");
+TRACE ("keyboard grab failed in clientResize");
 
 gdk_beep ();
 myScreenUngrabKeyboard (screen_info);
+
+return;
+}
+
+if (!g2)
+{
+TRACE ("button grab failed in clientResize");
+
+gdk_beep ();
 myScreenUngrabPointer (screen_info);
 
 return;
@@ -4910,7 +4931,10 @@
 c->xsync_waiting = FALSE;
 #endif /* HAVE_XSYNC */
 
-myScreenUngrabKeyboard (screen_info);
+if (g1)
+{
+myScreenUngrabKeyboard (screen_info);
+}
 if (!passdata.released)
 {
 /* If this is a drag-resize, wait for the button to be released.

Modified: xfwm4/trunk/src/focus.c
===
--- xfwm4/trunk/src/focus.c 2007-09-07 18:37:47 UTC (rev 26053)
+++ xfwm4/trunk/src/focus.c 2007-09-07 22:18:04 UTC (rev 26054)
@@ -305,12 +305,12 @@
 new_focus = NULL;
 current_focus = client_focus;
 c2 = NULL;
-
+#if 0
 if (pending_focus)
 {
 current_focus = pending_focus;
 }
-
+#endif
 if ((c || current_focus) && (c != current_focus))
 {
 return;

Modified: xfwm4/trunk/src/keyboard.c
===
--- xfwm4/trunk/src/keyboard.c  2007-09-07 18:37:47 UTC (rev 26053)
+++ xfwm4/trunk/src/keyboard.c  2007-09-07 22:18:04 UTC (rev 26054)
@@ -160,50 +160,50 @@
 
 TRACE ("entering grabKey");
 
-status=GrabSuccess;
+status = GrabSuccess;
 if (key->keycode)
 {
 if (key->modifier == 0)
 {
 status |=
-XGrabKey (dpy, key->keycode, AnyModifier, w, FALSE,
-GrabModeAsync, GrabModeSync);
+XGrabKey (dpy, key->keycode, AnyModifier, w,
+TRUE, GrabModeAsync, GrabModeSync);
 }
 else
 {
 /* Here we grab all combinations of well known modifiers */
 status |=
 XGrabKey (dpy, key->keycode,
-key->modifier, w, FALSE,
-GrabModeAsync, GrabModeSync);
+key->modifier, w,
+TRUE, GrabModeAsync, GrabModeSync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | ScrollLockMask, w,
-FALSE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeSync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | NumLockMask, w,
-FALSE, GrabModeAsync, GrabModeSync);
+TRUE, GrabModeAsync, GrabModeSync);
 status |=
 XGrabKey (dpy, key->keycode,
 key->modifier | LockMask, w,
-FALSE, GrabModeAsync, GrabModeSync);
+

[Xfce4-commits] r25925 - xfwm4/trunk/src

2007-07-18 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-18 18:29:43 + (Wed, 18 Jul 2007)
New Revision: 25925

Modified:
   xfwm4/trunk/src/events.c
Log:
Do ReplayPointer on client window only, this is actually a lot simpler

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-07-18 16:35:26 UTC (rev 25924)
+++ xfwm4/trunk/src/events.c2007-07-18 18:29:43 UTC (rev 25925)
@@ -865,9 +865,6 @@
 
 TRACE ("entering handleButtonPress");
 
-/* Release queued events at the time of the event */
-XAllowEvents (display_info->dpy, ReplayPointer, ev->time);
-
 c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_FRAME | 
SEARCH_WINDOW);
 if (c)
 {
@@ -1005,6 +1002,7 @@
 clientRaise (c, None);
 }
 }
+XAllowEvents (display_info->dpy, ReplayPointer, ev->time);
 }
 
 return EVENT_FILTER_REMOVE;

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25923 - xfwm4/trunk/src

2007-07-17 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-17 18:10:20 + (Tue, 17 Jul 2007)
New Revision: 25923

Modified:
   xfwm4/trunk/src/events.c
Log:
Use event's timestamp when releasing queued events

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-07-17 06:29:36 UTC (rev 25922)
+++ xfwm4/trunk/src/events.c2007-07-17 18:10:20 UTC (rev 25923)
@@ -342,13 +342,15 @@
 
 TRACE ("entering handleKeyEvent");
 
+/* Release queued events at the time of the event */
+XAllowEvents (display_info->dpy, AsyncKeyboard, ev->time);
+
 status = EVENT_FILTER_PASS;
 ev_screen_info = myDisplayGetScreenFromRoot (display_info, ev->root);
 if (!ev_screen_info)
 {
 return status;
 }
-XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
 
 c = clientGetFocus ();
 if (c)
@@ -860,20 +862,12 @@
 Client *c;
 Window win;
 int state, part;
-gboolean replay;
 
 TRACE ("entering handleButtonPress");
 
-#if CHECK_BUTTON_TIME
-/* Avoid treating the same event twice */
-if (!check_button_time (ev))
-{
-TRACE ("ignoring ButtonPress event because it has been already 
handled");
-return EVENT_FILTER_REMOVE;
-}
-#endif
+/* Release queued events at the time of the event */
+XAllowEvents (display_info->dpy, ReplayPointer, ev->time);
 
-replay = FALSE;
 c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_FRAME | 
SEARCH_WINDOW);
 if (c)
 {
@@ -1011,18 +1005,8 @@
 clientRaise (c, None);
 }
 }
-replay = TRUE;
 }
 
-if (replay)
-{
-XAllowEvents (display_info->dpy, ReplayPointer, CurrentTime);
-}
-else
-{
-XAllowEvents (display_info->dpy, SyncPointer, CurrentTime);
-}
-
 return EVENT_FILTER_REMOVE;
 }
 

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25921 - xfwm4/trunk/src

2007-07-16 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-16 21:25:51 + (Mon, 16 Jul 2007)
New Revision: 25921

Modified:
   xfwm4/trunk/src/events.c
Log:
Release key events early

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-07-16 21:25:15 UTC (rev 25920)
+++ xfwm4/trunk/src/events.c2007-07-16 21:25:51 UTC (rev 25921)
@@ -348,6 +348,7 @@
 {
 return status;
 }
+XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
 
 c = clientGetFocus ();
 if (c)
@@ -453,17 +454,9 @@
 }
 break;
 case KEY_POPUP_MENU:
-/*
-   We need to release the events here prior to grabbing
-   the keyboard in gtk menu otherwise we end with a dead 
lock...
-  */
-XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
 show_window_menu (c, frameX (c) + frameLeft (c),
  frameY (c) + frameTop (c),
  Button1, GDK_CURRENT_TIME);
-
-/* 'nuff for now */
-return EVENT_FILTER_REMOVE;
 break;
 case KEY_FILL_WINDOW:
 clientFill (c, CLIENT_FILL);
@@ -561,7 +554,6 @@
 default:
 break;
 }
-XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
 
 return status;
 }

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25920 - xfwm4/trunk/src

2007-07-16 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-16 21:25:15 + (Mon, 16 Jul 2007)
New Revision: 25920

Modified:
   xfwm4/trunk/src/netwm.c
Log:
Be compliant with EWMH standard that states: "If _NET_WM_WINDOW_TYPE is not 
set, then windows with WM_TRANSIENT_FOR set MUST be taken as 
NET_WM_WINDOW_TYPE_DIALOG". It shouldn't make much difference in xfwm4 though.


Modified: xfwm4/trunk/src/netwm.c
===
--- xfwm4/trunk/src/netwm.c 2007-07-15 20:03:43 UTC (rev 25919)
+++ xfwm4/trunk/src/netwm.c 2007-07-16 21:25:15 UTC (rev 25920)
@@ -782,6 +782,7 @@
 display_info = screen_info->display_info;
 n_atoms = 0;
 atoms = NULL;
+c->type_atom = None;
 
 if (!getAtomList (display_info, c->window, NET_WM_WINDOW_TYPE, &atoms, 
&n_atoms))
 {
@@ -797,7 +798,14 @@
 c->type_atom = display_info->atoms[NET_WM_WINDOW_TYPE_NORMAL];
 break;
 default:
-c->type_atom = None;
+if (c->transient_for != None)
+{
+c->type_atom = 
display_info->atoms[NET_WM_WINDOW_TYPE_DIALOG];
+}
+else
+{
+c->type_atom = 
display_info->atoms[NET_WM_WINDOW_TYPE_NORMAL];
+}
 break;
 }
 }

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25917 - gtk-xfce-engine-2/branches/xfce_4_4/themes/dusk/gtk-2.0

2007-07-15 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-15 14:45:20 + (Sun, 15 Jul 2007)
New Revision: 25917

Modified:
   gtk-xfce-engine-2/branches/xfce_4_4/themes/dusk/gtk-2.0/gtkrc
Log:
Including the iconrc is nonsense

Modified: gtk-xfce-engine-2/branches/xfce_4_4/themes/dusk/gtk-2.0/gtkrc
===
--- gtk-xfce-engine-2/branches/xfce_4_4/themes/dusk/gtk-2.0/gtkrc   
2007-07-15 14:42:13 UTC (rev 25916)
+++ gtk-xfce-engine-2/branches/xfce_4_4/themes/dusk/gtk-2.0/gtkrc   
2007-07-15 14:45:20 UTC (rev 25917)
@@ -171,4 +171,3 @@
 widget "xfwm"  style "titlebar"
 class "MetaFrames" style "titlebar"
 widget_class "MetaFrames"  style "titlebar"
-include "/usr/share/icons/Rodent/iconrc"

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25916 - gtk-xfce-engine-2/trunk/themes/dusk/gtk-2.0

2007-07-15 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-15 14:42:13 + (Sun, 15 Jul 2007)
New Revision: 25916

Modified:
   gtk-xfce-engine-2/trunk/themes/dusk/gtk-2.0/gtkrc
Log:
Including the iconrc is nonsense

Modified: gtk-xfce-engine-2/trunk/themes/dusk/gtk-2.0/gtkrc
===
--- gtk-xfce-engine-2/trunk/themes/dusk/gtk-2.0/gtkrc   2007-07-14 22:51:22 UTC 
(rev 25915)
+++ gtk-xfce-engine-2/trunk/themes/dusk/gtk-2.0/gtkrc   2007-07-15 14:42:13 UTC 
(rev 25916)
@@ -171,4 +171,3 @@
 widget "xfwm"  style "titlebar"
 class "MetaFrames" style "titlebar"
 widget_class "MetaFrames"  style "titlebar"
-include "/usr/share/icons/Rodent/iconrc"

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25888 - xfwm4/trunk/themes/default

2007-07-05 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-05 21:03:08 + (Thu, 05 Jul 2007)
New Revision: 25888

Modified:
   xfwm4/trunk/themes/default/themerc
Log:
Larger shadow

Modified: xfwm4/trunk/themes/default/themerc
===
--- xfwm4/trunk/themes/default/themerc  2007-07-05 01:55:19 UTC (rev 25887)
+++ xfwm4/trunk/themes/default/themerc  2007-07-05 21:03:08 UTC (rev 25888)
@@ -3,10 +3,10 @@
 button_spacing=-1
 full_width_title=false
 maximized_offset=0
-shadow_delta_height=-2
-shadow_delta_width=-2
-shadow_delta_x=-2
-shadow_delta_y=-2
+shadow_delta_height=4
+shadow_delta_width=1
+shadow_delta_x=1
+shadow_delta_y=1
 show_app_icon=true
 title_horizontal_offset=1
 title_shadow_active=frame

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25885 - xfwm4/trunk/themes/default

2007-07-04 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-04 18:12:42 + (Wed, 04 Jul 2007)
New Revision: 25885

Modified:
   xfwm4/trunk/themes/default/Makefile.am
Log:
Typo

Modified: xfwm4/trunk/themes/default/Makefile.am
===
--- xfwm4/trunk/themes/default/Makefile.am  2007-07-04 17:54:18 UTC (rev 
25884)
+++ xfwm4/trunk/themes/default/Makefile.am  2007-07-04 18:12:42 UTC (rev 
25885)
@@ -1,4 +1,4 @@
-themedir = $(datadir)/themes/Deault/xfwm4
+themedir = $(datadir)/themes/Default/xfwm4
 
 PNG_FILES =\
bottom-active.png   \

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25884 - in xfwm4/trunk: defaults mcs-plugin

2007-07-04 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-04 17:54:18 + (Wed, 04 Jul 2007)
New Revision: 25884

Modified:
   xfwm4/trunk/defaults/defaults
   xfwm4/trunk/mcs-plugin/xfwm4_plugin.h
Log:
Adjust defaults

Modified: xfwm4/trunk/defaults/defaults
===
--- xfwm4/trunk/defaults/defaults   2007-07-04 17:51:01 UTC (rev 25883)
+++ xfwm4/trunk/defaults/defaults   2007-07-04 17:54:18 UTC (rev 25884)
@@ -2,7 +2,7 @@
 borderless_maximize=true
 box_move=false
 box_resize=false
-button_layout=OT|SHMC
+button_layout=O|HMC
 button_offset=0
 button_spacing=0
 click_to_focus=true

Modified: xfwm4/trunk/mcs-plugin/xfwm4_plugin.h
===
--- xfwm4/trunk/mcs-plugin/xfwm4_plugin.h   2007-07-04 17:51:01 UTC (rev 
25883)
+++ xfwm4/trunk/mcs-plugin/xfwm4_plugin.h   2007-07-04 17:54:18 UTC (rev 
25884)
@@ -35,7 +35,7 @@
 
 #define DEFAULT_THEME "Default"
 #define DEFAULT_KEY_THEME "Default"
-#define DEFAULT_LAYOUT "OT|SHMC"
+#define DEFAULT_LAYOUT "O|HMC"
 #define DEFAULT_ACTION "maximize"
 #define DEFAULT_ALIGN "center"
 #define DEFAULT_FONT "Sans Bold 9"

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25875 - xfdesktop/trunk/src

2007-07-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-01 15:04:05 + (Sun, 01 Jul 2007)
New Revision: 25875

Modified:
   xfdesktop/trunk/src/main.c
Log:
Always use button 0 in gtk_menu_popup() as GTK+ 2.11+ expects the same button 
to be pressed or it doesn't activate the entry (Bug #3359)

Modified: xfdesktop/trunk/src/main.c
===
--- xfdesktop/trunk/src/main.c  2007-07-01 14:58:26 UTC (rev 25874)
+++ xfdesktop/trunk/src/main.c  2007-07-01 15:04:05 UTC (rev 25875)
@@ -182,7 +182,7 @@
 popup_windowlist(gscreen, button, evt->time);
 return TRUE;
 } else if(button == 3 || (button == 1 && (state & GDK_SHIFT_MASK))) {
-popup_desktop_menu(gscreen, button, evt->time);
+popup_desktop_menu(gscreen, 0, evt->time);
 return TRUE;
 }
 }

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25874 - xfdesktop/branches/xfce_4_2/src

2007-07-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-01 14:58:26 + (Sun, 01 Jul 2007)
New Revision: 25874

Modified:
   xfdesktop/branches/xfce_4_2/src/main.c
Log:
Always use button 0 in gtk_menu_popup() as GTK+ 2.11+ expects the same button 
to be pressed or it doesn't activate the entry (Bug #3359)

Modified: xfdesktop/branches/xfce_4_2/src/main.c
===
--- xfdesktop/branches/xfce_4_2/src/main.c  2007-07-01 14:51:32 UTC (rev 
25873)
+++ xfdesktop/branches/xfce_4_2/src/main.c  2007-07-01 14:58:26 UTC (rev 
25874)
@@ -161,7 +161,7 @@
{
popup_windowlist(gscreen, button, evt->time);
} else if(button == 3 || (button == 1 && (state & GDK_SHIFT_MASK)))
-   popup_desktop_menu(gscreen, button, evt->time);
+   popup_desktop_menu(gscreen, 0, evt->time);
 else {
 /* forward unused events to the root window, i.e. the window manager */
 event_forward_to_rootwin(gtk_widget_get_screen(w), (GdkEvent*)evt);

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25873 - in xfdesktop/branches/xfce_4_4: . src

2007-07-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-07-01 14:51:32 + (Sun, 01 Jul 2007)
New Revision: 25873

Modified:
   xfdesktop/branches/xfce_4_4/NEWS
   xfdesktop/branches/xfce_4_4/src/main.c
Log:
Always use button 0 in gtk_menu_popup() as GTK+ 2.11+ expects the same button 
to be pressed or it doesn't activate the entry (Bug #3359)

Modified: xfdesktop/branches/xfce_4_4/NEWS
===
--- xfdesktop/branches/xfce_4_4/NEWS2007-07-01 07:08:05 UTC (rev 25872)
+++ xfdesktop/branches/xfce_4_4/NEWS2007-07-01 14:51:32 UTC (rev 25873)
@@ -4,6 +4,8 @@
 - Fixed the Italian xfdesktop menu causing a crash.
 - Fix missing xfce_rc_close() causing memleak and too many open file
   descriptors (bug 3065)
+- Always use button 0 in gtk_menu_popup() as GTK+ 2.11+ expects the 
+  same button to be pressed or it doesn't activate the entry (Bug #3359)
 
 4.4.1
 =

Modified: xfdesktop/branches/xfce_4_4/src/main.c
===
--- xfdesktop/branches/xfce_4_4/src/main.c  2007-07-01 07:08:05 UTC (rev 
25872)
+++ xfdesktop/branches/xfce_4_4/src/main.c  2007-07-01 14:51:32 UTC (rev 
25873)
@@ -178,7 +178,7 @@
 popup_windowlist(gscreen, button, evt->time);
 return TRUE;
 } else if(button == 3 || (button == 1 && (state & GDK_SHIFT_MASK))) {
-popup_desktop_menu(gscreen, button, evt->time);
+popup_desktop_menu(gscreen, 0, evt->time);
 return TRUE;
 }
 }

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25867 - xfwm4/trunk/src

2007-06-27 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-27 22:02:01 + (Wed, 27 Jun 2007)
New Revision: 25867

Modified:
   xfwm4/trunk/src/screen.c
   xfwm4/trunk/src/settings.h
Log:
Do not grab the Escape key by default

Modified: xfwm4/trunk/src/screen.c
===
--- xfwm4/trunk/src/screen.c2007-06-27 21:39:15 UTC (rev 25866)
+++ xfwm4/trunk/src/screen.c2007-06-27 22:02:01 UTC (rev 25867)
@@ -414,7 +414,17 @@
 
 dpy = myScreenGetXDisplay (screen_info);
 
-for (i = 0; i < KEY_COUNT; i++)
+/*
+   Ugly hack: KEY_CANCEL is used just for cancelling window ops
+   it should not be grabbed all the time (especially when you
+   realize that it's mapped to Esc by default, damn, I can't
+   switch back to command mode in vi anymore, I'm stuck in 
+   edition mode ;)
+
+   That's why we start at FIRST_KEY which is defined after 
+   KEY_CANCEL...
+ */
+for (i = FIRST_KEY; i < KEY_COUNT; i++)
 {
 grabKey (dpy, &screen_info->params->keys[i], screen_info->xroot);
 }

Modified: xfwm4/trunk/src/settings.h
===
--- xfwm4/trunk/src/settings.h  2007-06-27 21:39:15 UTC (rev 25866)
+++ xfwm4/trunk/src/settings.h  2007-06-27 22:02:01 UTC (rev 25867)
@@ -40,10 +40,11 @@
 TITLE_SHADOW_FRAME
 };
 
+#define FIRST_KEY KEY_ADD_WORKSPACE
 enum
 {
+KEY_CANCEL = 0,
 KEY_ADD_WORKSPACE,
-KEY_CANCEL,
 KEY_CLOSE_WINDOW,
 KEY_CYCLE_WINDOWS,
 KEY_DEL_WORKSPACE,

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25863 - in xfwm4/branches/xfce_4_4: . src

2007-06-26 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-26 21:10:27 + (Tue, 26 Jun 2007)
New Revision: 25863

Modified:
   xfwm4/branches/xfce_4_4/NEWS
   xfwm4/branches/xfce_4_4/src/client.c
   xfwm4/branches/xfce_4_4/src/netwm.c
Log:
Be more relax with transients, allow transients to be sticky independently of 
their parent window (Bug #3296)

Modified: xfwm4/branches/xfce_4_4/NEWS
===
--- xfwm4/branches/xfce_4_4/NEWS2007-06-26 21:07:43 UTC (rev 25862)
+++ xfwm4/branches/xfce_4_4/NEWS2007-06-26 21:10:27 UTC (rev 25863)
@@ -1,6 +1,8 @@
 4.4.2
 =
 
+- Be more relax with transients, allow transients to be sticky independently 
+  of their parent window (Bug #3296)
 - Fix xfwm4 hanging with gtk+-2.11.x (Bug #3346)
 - Plug a leak in mouse button grab when changing theme
 - Fix dialogs and modals without parents not being automatically 

Modified: xfwm4/branches/xfce_4_4/src/client.c
===
--- xfwm4/branches/xfce_4_4/src/client.c2007-06-26 21:07:43 UTC (rev 
25862)
+++ xfwm4/branches/xfce_4_4/src/client.c2007-06-26 21:10:27 UTC (rev 
25863)
@@ -2376,7 +2376,7 @@
 }
 
 static void
-clientShowSingle (Client * c, gboolean change_state)
+clientShowSingle (Client * c, gboolean deiconify)
 {
 ScreenInfo *screen_info;
 DisplayInfo *display_info;
@@ -2398,7 +2398,7 @@
 /* Adjust to urgency state as the window is visible */
 clientUpdateUrgency (c);
 }
-if (change_state)
+if (deiconify)
 {
 FLAG_UNSET (c->flags, CLIENT_FLAG_ICONIFIED);
 setWMState (display_info, c->window, NormalState);
@@ -2407,16 +2407,14 @@
 }
 
 void
-clientShow (Client * c, gboolean change_state)
+clientShow (Client * c, gboolean deiconify)
 {
 Client *c2;
 GList *list_of_windows;
 GList *index;
 
 g_return_if_fail (c != NULL);
-TRACE ("entering clientShow \"%s\" (0x%lx) [with %s]",
-   c->name, c->window,
-   change_state ? "state change" : "no state change");
+TRACE ("entering clientShow \"%s\" (0x%lx)", c->name, c->window);
 
 list_of_windows = clientListTransientOrModal (c);
 for (index = g_list_last (list_of_windows); index; index = g_list_previous 
(index))
@@ -2428,7 +2426,7 @@
 {
 continue;
 }
-clientShowSingle (c2, change_state);
+clientShowSingle (c2, deiconify);
 }
 g_list_free (list_of_windows);
 
@@ -2437,7 +2435,7 @@
 }
 
 static void
-clientHideSingle (Client * c, gboolean change_state)
+clientHideSingle (Client * c, gboolean iconify)
 {
 ScreenInfo *screen_info;
 DisplayInfo *display_info;
@@ -2458,7 +2456,7 @@
 }
 XUnmapWindow (display_info->dpy, c->window);
 XUnmapWindow (display_info->dpy, c->frame);
-if (change_state)
+if (iconify)
 {
 FLAG_SET (c->flags, CLIENT_FLAG_ICONIFIED);
 setWMState (display_info, c->window, IconicState);
@@ -2467,14 +2465,14 @@
 }
 
 void
-clientHide (Client * c, int ws, gboolean change_state)
+clientHide (Client * c, int ws, gboolean iconify)
 {
 Client *c2;
 GList *list_of_windows;
 GList *index;
 
 g_return_if_fail (c != NULL);
-TRACE ("entering clientHide");
+TRACE ("entering clientHide \"%s\" (0x%lx)", c->name, c->window);
 
 list_of_windows = clientListTransientOrModal (c);
 for (index = list_of_windows; index; index = g_list_next (index))
@@ -2500,7 +2498,12 @@
  */
 continue;
 }
-clientHideSingle (c2, change_state);
+
+if (FLAG_TEST (c2->flags, CLIENT_FLAG_STICKY) && !iconify)
+{
+continue;
+}
+clientHideSingle (c2, iconify);
 }
 g_list_free (list_of_windows);
 

Modified: xfwm4/branches/xfce_4_4/src/netwm.c
===
--- xfwm4/branches/xfce_4_4/src/netwm.c 2007-06-26 21:07:43 UTC (rev 25862)
+++ xfwm4/branches/xfce_4_4/src/netwm.c 2007-06-26 21:10:27 UTC (rev 25863)
@@ -844,53 +844,56 @@
 display_info = screen_info->display_info;
 val = 0;
 
-/* This is to make sure that transient are shown with their "ancestor" 
window */
-c2 = clientGetTransient (c);
-if (c2)
+if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_SESSION_MANAGED)
+&&  !FLAG_TEST (c->xfwm_flags, XFWM_FLAG_WORKSPACE_SET))
 {
 FLAG_SET (c->xfwm_flags, XFWM_FLAG_WORKSPACE_SET);
-c->win_workspace = c2->win_workspace;
-if (FLAG_TEST (c2->flags, CLIENT_FLAG_STICKY))
+c->win_workspace = c->screen_info->current_ws;
+}
+if (getHint (display_info, c->window, NET_WM_DESKTOP, &val))
+{
+TRACE ("atom net_wm_desktop detected");
+if (val == (int) ALL_WORKSPACES)
 {
-FLAG_SET (c->flags, CLIENT_FLAG_STICKY);
-c->win_state |= WIN_STATE_STICKY;
+if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_STICK) && !FLAG

[Xfce4-commits] r25862 - xfwm4/trunk/src

2007-06-26 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-26 21:07:43 + (Tue, 26 Jun 2007)
New Revision: 25862

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/netwm.c
Log:
Be more relax with transients, allow transients to be sticky independently of 
their parent window (Bug #3296)

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-26 18:56:52 UTC (rev 25861)
+++ xfwm4/trunk/src/client.c2007-06-26 21:07:43 UTC (rev 25862)
@@ -2395,7 +2395,7 @@
 }
 
 static void
-clientShowSingle (Client * c, gboolean change_state)
+clientShowSingle (Client * c, gboolean deiconify)
 {
 ScreenInfo *screen_info;
 DisplayInfo *display_info;
@@ -2417,7 +2417,7 @@
 /* Adjust to urgency state as the window is visible */
 clientUpdateUrgency (c);
 }
-if (change_state)
+if (deiconify)
 {
 FLAG_UNSET (c->flags, CLIENT_FLAG_ICONIFIED);
 setWMState (display_info, c->window, NormalState);
@@ -2426,16 +2426,14 @@
 }
 
 void
-clientShow (Client * c, gboolean change_state)
+clientShow (Client * c, gboolean deiconify)
 {
 Client *c2;
 GList *list_of_windows;
 GList *index;
 
 g_return_if_fail (c != NULL);
-TRACE ("entering clientShow \"%s\" (0x%lx) [with %s]",
-   c->name, c->window,
-   change_state ? "state change" : "no state change");
+TRACE ("entering clientShow \"%s\" (0x%lx)", c->name, c->window);
 
 list_of_windows = clientListTransientOrModal (c);
 for (index = g_list_last (list_of_windows); index; index = g_list_previous 
(index))
@@ -2447,7 +2445,7 @@
 {
 continue;
 }
-clientShowSingle (c2, change_state);
+clientShowSingle (c2, deiconify);
 }
 g_list_free (list_of_windows);
 
@@ -2456,7 +2454,7 @@
 }
 
 static void
-clientHideSingle (Client * c, gboolean change_state)
+clientHideSingle (Client * c, gboolean iconify)
 {
 ScreenInfo *screen_info;
 DisplayInfo *display_info;
@@ -2477,7 +2475,7 @@
 }
 XUnmapWindow (display_info->dpy, c->window);
 XUnmapWindow (display_info->dpy, c->frame);
-if (change_state)
+if (iconify)
 {
 FLAG_SET (c->flags, CLIENT_FLAG_ICONIFIED);
 setWMState (display_info, c->window, IconicState);
@@ -2486,14 +2484,14 @@
 }
 
 void
-clientHide (Client * c, int ws, gboolean change_state)
+clientHide (Client * c, int ws, gboolean iconify)
 {
 Client *c2;
 GList *list_of_windows;
 GList *index;
 
 g_return_if_fail (c != NULL);
-TRACE ("entering clientHide");
+TRACE ("entering clientHide \"%s\" (0x%lx)", c->name, c->window);
 
 list_of_windows = clientListTransientOrModal (c);
 for (index = list_of_windows; index; index = g_list_next (index))
@@ -2519,7 +2517,12 @@
  */
 continue;
 }
-clientHideSingle (c2, change_state);
+
+if (FLAG_TEST (c2->flags, CLIENT_FLAG_STICKY) && !iconify)
+{
+continue;
+}
+clientHideSingle (c2, iconify);
 }
 g_list_free (list_of_windows);
 

Modified: xfwm4/trunk/src/netwm.c
===
--- xfwm4/trunk/src/netwm.c 2007-06-26 18:56:52 UTC (rev 25861)
+++ xfwm4/trunk/src/netwm.c 2007-06-26 21:07:43 UTC (rev 25862)
@@ -844,53 +844,56 @@
 display_info = screen_info->display_info;
 val = 0;
 
-/* This is to make sure that transient are shown with their "ancestor" 
window */
-c2 = clientGetTransient (c);
-if (c2)
+if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_SESSION_MANAGED)
+&&  !FLAG_TEST (c->xfwm_flags, XFWM_FLAG_WORKSPACE_SET))
 {
 FLAG_SET (c->xfwm_flags, XFWM_FLAG_WORKSPACE_SET);
-c->win_workspace = c2->win_workspace;
-if (FLAG_TEST (c2->flags, CLIENT_FLAG_STICKY))
+c->win_workspace = c->screen_info->current_ws;
+}
+if (getHint (display_info, c->window, NET_WM_DESKTOP, &val))
+{
+TRACE ("atom net_wm_desktop detected");
+if (val == (int) ALL_WORKSPACES)
 {
-FLAG_SET (c->flags, CLIENT_FLAG_STICKY);
-c->win_state |= WIN_STATE_STICKY;
+if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_STICK) && !FLAG_TEST 
(c->flags, CLIENT_FLAG_STICKY))
+{
+TRACE ("atom net_wm_desktop specifies window \"%s\" is 
sticky", c->name);
+FLAG_SET (c->flags, CLIENT_FLAG_STICKY);
+c->win_state |= WIN_STATE_STICKY;
+}
+c->win_workspace = c->screen_info->current_ws;
 }
+else
+{
+TRACE ("atom net_wm_desktop specifies window \"%s\" is on desk 
%i", c->name, (int) val);
+c->win_workspace = (int) val;
+}
+FLAG_SET (c->xfwm_flags, XFWM_FLAG_WORKSPACE_SET);
 }
-else
+else if (getHint (display_info, c->window, WIN_WORKSPACE, &val))
 {
-if (!FLAG_TEST (c->xfwm_fl

[Xfce4-commits] r25852 - xfwm4/trunk/src

2007-06-24 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-24 17:54:51 + (Sun, 24 Jun 2007)
New Revision: 25852

Modified:
   xfwm4/trunk/src/client.c
Log:
Fix filling function being a no-op if not other windows is visible, fix wrong 
computation size with struts on top or right sides

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-24 16:30:47 UTC (rev 25851)
+++ xfwm4/trunk/src/client.c2007-06-24 17:54:51 UTC (rev 25852)
@@ -3252,8 +3252,6 @@
 /* Fill horizontally */
 if (fill_type & CLIENT_FILL_HORIZ)
 {
-mask |= CWX | CWWidth;
-
 /*
  * check if the neigbour client (c2) is located
  * east or west of our client.
@@ -3300,8 +3298,6 @@
 /* Fill vertically */
 if (fill_type & CLIENT_FILL_VERT)
 {
-mask |= CWY | CWHeight;
-
 /* check if the neigbour client (c2) is located
  * north or south of our client.
  */
@@ -3367,16 +3363,19 @@
 
 if ((fill_type & CLIENT_FILL) == CLIENT_FILL)
 {
+mask = CWX | CWY | CWHeight | CWWidth;
 /* Adjust size to the largest size available, not covering struts */
 clientMaxSpace (screen_info, &full_x, &full_y, &full_w, &full_h);
 }
 else if (fill_type & CLIENT_FILL_VERT)
 {
+mask = CWY | CWHeight;
 /* Adjust size to the tallest size available, for the current 
horizontal position/width */
 clientMaxSpace (screen_info, &tmp_x, &full_y, &tmp_w, &full_h);
 }
 else if (fill_type & CLIENT_FILL_HORIZ)
 {
+mask = CWX | CWWidth;
 /* Adjust size to the widest size available, for the current vertical 
position/height */
 clientMaxSpace (screen_info, &full_x, &tmp_y, &full_w, &tmp_h);
 }
@@ -3396,11 +3395,11 @@
 
 if (west_neighbour)
 {
-wc.width = frameX(west_neighbour) - frameRight(c) - wc.x;
+wc.width = full_x + frameX(west_neighbour) - frameRight(c) - wc.x;
 }
 else
 {
-wc.width = full_w - frameRight(c) - wc.x;
+wc.width = full_x + full_w - frameRight(c) - wc.x;
 }
 
 if (north_neighbour)
@@ -3414,13 +3413,14 @@
 
 if (south_neighbour)
 {
-wc.height = frameY(south_neighbour) - frameBottom(c) - wc.y;
+wc.height = full_y + frameY(south_neighbour) - frameBottom(c) - wc.y;
 }
 else
 {
-wc.height = full_h - frameBottom(c) - wc.y;
+wc.height = full_y + full_h - frameBottom(c) - wc.y;
 }
 
+TRACE ("Fill size request: (%d,%d) %dx%d", wc.x, wc.y, wc.width, 
wc.height);
 if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MANAGED))
 {
 /*

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25850 - in xfwm4/trunk/themes: daloa default largeprint

2007-06-24 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-24 12:10:24 + (Sun, 24 Jun 2007)
New Revision: 25850

Modified:
   xfwm4/trunk/themes/daloa/themerc
   xfwm4/trunk/themes/default/themerc
   xfwm4/trunk/themes/largeprint/themerc
Log:
Play with shadows

Modified: xfwm4/trunk/themes/daloa/themerc
===
--- xfwm4/trunk/themes/daloa/themerc2007-06-24 09:33:55 UTC (rev 25849)
+++ xfwm4/trunk/themes/daloa/themerc2007-06-24 12:10:24 UTC (rev 25850)
@@ -2,6 +2,10 @@
 button_offset=0
 button_spacing=-1
 maximized_offset=0
+shadow_delta_height=0
+shadow_delta_width=0
+shadow_delta_x=0
+shadow_delta_y=2
 show_app_icon=true
 title_horizontal_offset=0
 title_shadow_active=frame

Modified: xfwm4/trunk/themes/default/themerc
===
--- xfwm4/trunk/themes/default/themerc  2007-06-24 09:33:55 UTC (rev 25849)
+++ xfwm4/trunk/themes/default/themerc  2007-06-24 12:10:24 UTC (rev 25850)
@@ -3,10 +3,10 @@
 button_spacing=0
 full_width_title=false
 maximized_offset=0
-shadow_delta_height=-2
-shadow_delta_width=-2
-shadow_delta_x=-2
-shadow_delta_y=0
+shadow_delta_height=2
+shadow_delta_width=1
+shadow_delta_x=1
+shadow_delta_y=1
 show_app_icon=true
 title_horizontal_offset=1
 title_shadow_active=frame

Modified: xfwm4/trunk/themes/largeprint/themerc
===
--- xfwm4/trunk/themes/largeprint/themerc   2007-06-24 09:33:55 UTC (rev 
25849)
+++ xfwm4/trunk/themes/largeprint/themerc   2007-06-24 12:10:24 UTC (rev 
25850)
@@ -3,10 +3,10 @@
 button_spacing=0
 full_width_title=false
 maximized_offset=0
-shadow_delta_height=0
-shadow_delta_width=0
-shadow_delta_x=0
-shadow_delta_y=2
+shadow_delta_height=4
+shadow_delta_width=1
+shadow_delta_x=1
+shadow_delta_y=1
 show_app_icon=true
 title_horizontal_offset=1
 title_shadow_active=frame

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25849 - xfwm4/trunk/src

2007-06-24 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-24 09:33:55 + (Sun, 24 Jun 2007)
New Revision: 25849

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/screen.c
   xfwm4/trunk/src/settings.c
Log:
Cleanup

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-24 06:50:19 UTC (rev 25848)
+++ xfwm4/trunk/src/client.c2007-06-24 09:33:55 UTC (rev 25849)
@@ -2002,7 +2002,7 @@
 
 for (i = 0; i < STATE_TOGGLED; i++)
 {
-xfwmPixmapInit (screen_info, &c->appmenu[i]);
+xfwmPixmapInit (screen_info, &c->appmenu[i]);
 }
 
 for (i = 0; i < SIDE_TOP; i++) /* Keep SIDE_TOP for later */

Modified: xfwm4/trunk/src/screen.c
===
--- xfwm4/trunk/src/screen.c2007-06-24 06:50:19 UTC (rev 25848)
+++ xfwm4/trunk/src/screen.c2007-06-24 09:33:55 UTC (rev 25849)
@@ -407,75 +407,17 @@
 myScreenGrabKeys (ScreenInfo *screen_info)
 {
 Display *dpy;
+int i;
 
 TRACE ("entering myScreenUnrabKeys");
 g_return_if_fail (screen_info != NULL);
 
 dpy = myScreenGetXDisplay (screen_info);
 
-grabKey (dpy, &screen_info->params->keys[KEY_ADD_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_CLOSE_WINDOW], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_CYCLE_WINDOWS], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_DEL_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_DOWN_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_HIDE_WINDOW], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_LEFT_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_LOWER_WINDOW], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MAXIMIZE_HORIZ], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MAXIMIZE_VERT], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MAXIMIZE_WINDOW], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_DOWN], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_DOWN_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_LEFT], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_LEFT_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_NEXT_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_PREV_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_RIGHT], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_RIGHT_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_UP], screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_UP_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_1], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_2], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_3], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_4], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_5], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_6], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_7], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_8], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_9], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_10], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_11], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_MOVE_WORKSPACE_12], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_NEXT_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_POPUP_MENU], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_PREV_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_RAISE_WINDOW], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_RESIZE_DOWN], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_RESIZE_LEFT], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_RESIZE_RIGHT], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_RESIZE_UP], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_RIGHT_WORKSPACE], 
screen_info->xroot);
-grabKey (dpy, &screen_info->params->keys[KEY_SHADE_WINDOW], 
screen_info->xroot)

[Xfce4-commits] r25846 - xfwm4/trunk/src

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 22:44:07 + (Sat, 23 Jun 2007)
New Revision: 25846

Modified:
   xfwm4/trunk/src/frame.c
Log:
A bit more of small cleanup

Modified: xfwm4/trunk/src/frame.c
===
--- xfwm4/trunk/src/frame.c 2007-06-23 22:28:49 UTC (rev 25845)
+++ xfwm4/trunk/src/frame.c 2007-06-23 22:44:07 UTC (rev 25846)
@@ -312,16 +312,6 @@
 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 @@
 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 @@
 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 @@
 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 @@
 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
 {

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25845 - xfwm4/trunk/src

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 22:28:49 + (Sat, 23 Jun 2007)
New Revision: 25845

Modified:
   xfwm4/trunk/src/settings.h
Log:
Typo

Modified: xfwm4/trunk/src/settings.h
===
--- xfwm4/trunk/src/settings.h  2007-06-23 19:28:38 UTC (rev 25844)
+++ xfwm4/trunk/src/settings.h  2007-06-23 22:28:49 UTC (rev 25845)
@@ -105,7 +105,7 @@
 KEY_WORKSPACE_9,
 KEY_WORKSPACE_10,
 KEY_WORKSPACE_11,
-KEY_WORKSPACE_12
+KEY_WORKSPACE_12,
 KEY_COUNT
 };
 

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25842 - xfwm4/trunk/src

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 18:47:41 + (Sat, 23 Jun 2007)
New Revision: 25842

Modified:
   xfwm4/trunk/src/settings.c
   xfwm4/trunk/src/settings.h
Log:
Reorder to ease readability

Modified: xfwm4/trunk/src/settings.c
===
--- xfwm4/trunk/src/settings.c  2007-06-23 18:03:08 UTC (rev 25841)
+++ xfwm4/trunk/src/settings.c  2007-06-23 18:47:41 UTC (rev 25842)
@@ -1281,6 +1281,9 @@
 parseKeyString (dpy, &screen_info->params->keys[KEY_CYCLE_WINDOWS], 
getValue ("cycle_windows_key", rc));
 parseKeyString (dpy, &screen_info->params->keys[KEY_DEL_WORKSPACE], 
getValue ("del_workspace_key", rc));
 parseKeyString (dpy, &screen_info->params->keys[KEY_DOWN_WORKSPACE], 
getValue ("down_workspace_key", rc));
+parseKeyString (dpy, &screen_info->params->keys[KEY_FILL_HORIZ], getValue 
("fill_horiz_key", rc));
+parseKeyString (dpy, &screen_info->params->keys[KEY_FILL_VERT], getValue 
("fill_vert_key", rc));
+parseKeyString (dpy, &screen_info->params->keys[KEY_FILL_WINDOW], getValue 
("fill_window_key", rc));
 parseKeyString (dpy, &screen_info->params->keys[KEY_HIDE_WINDOW], getValue 
("hide_window_key", rc));
 parseKeyString (dpy, &screen_info->params->keys[KEY_LEFT_WORKSPACE], 
getValue ("left_workspace_key", rc));
 parseKeyString (dpy, &screen_info->params->keys[KEY_LOWER_WINDOW], 
getValue ("lower_window_key", rc));
@@ -1336,9 +1339,6 @@
 parseKeyString (dpy, &screen_info->params->keys[KEY_WORKSPACE_10], 
getValue ("workspace_10_key", rc));
 parseKeyString (dpy, &screen_info->params->keys[KEY_WORKSPACE_11], 
getValue ("workspace_11_key", rc));
 parseKeyString (dpy, &screen_info->params->keys[KEY_WORKSPACE_12], 
getValue ("workspace_12_key", rc));
-parseKeyString (dpy, &screen_info->params->keys[KEY_FILL_HORIZ], getValue 
("fill_horiz_key", rc));
-parseKeyString (dpy, &screen_info->params->keys[KEY_FILL_VERT], getValue 
("fill_vert_key", rc));
-parseKeyString (dpy, &screen_info->params->keys[KEY_FILL_WINDOW], getValue 
("fill_window_key", rc));
 
 myScreenUngrabKeys (screen_info);
 myScreenGrabKeys (screen_info);

Modified: xfwm4/trunk/src/settings.h
===
--- xfwm4/trunk/src/settings.h  2007-06-23 18:03:08 UTC (rev 25841)
+++ xfwm4/trunk/src/settings.h  2007-06-23 18:47:41 UTC (rev 25842)
@@ -48,6 +48,9 @@
 KEY_CYCLE_WINDOWS,
 KEY_DEL_WORKSPACE,
 KEY_DOWN_WORKSPACE,
+KEY_FILL_HORIZ,
+KEY_FILL_VERT,
+KEY_FILL_WINDOW,
 KEY_HIDE_WINDOW,
 KEY_LEFT_WORKSPACE,
 KEY_LOWER_WINDOW,
@@ -65,6 +68,9 @@
 KEY_MOVE_UP,
 KEY_MOVE_UP_WORKSPACE,
 KEY_MOVE_WORKSPACE_1,
+KEY_MOVE_WORKSPACE_10,
+KEY_MOVE_WORKSPACE_11,
+KEY_MOVE_WORKSPACE_12,
 KEY_MOVE_WORKSPACE_2,
 KEY_MOVE_WORKSPACE_3,
 KEY_MOVE_WORKSPACE_4,
@@ -73,9 +79,6 @@
 KEY_MOVE_WORKSPACE_7,
 KEY_MOVE_WORKSPACE_8,
 KEY_MOVE_WORKSPACE_9,
-KEY_MOVE_WORKSPACE_10,
-KEY_MOVE_WORKSPACE_11,
-KEY_MOVE_WORKSPACE_12,
 KEY_NEXT_WORKSPACE,
 KEY_POPUP_MENU,
 KEY_PREV_WORKSPACE,
@@ -102,10 +105,7 @@
 KEY_WORKSPACE_9,
 KEY_WORKSPACE_10,
 KEY_WORKSPACE_11,
-KEY_WORKSPACE_12,
-KEY_FILL_HORIZ,
-KEY_FILL_VERT,
-KEY_FILL_WINDOW,
+KEY_WORKSPACE_12
 KEY_COUNT
 };
 

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25841 - xfwm4/trunk/src

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 18:03:08 + (Sat, 23 Jun 2007)
New Revision: 25841

Modified:
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/hints.c
   xfwm4/trunk/src/screen.c
Log:
Cleanup

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-06-23 17:59:46 UTC (rev 25840)
+++ xfwm4/trunk/src/events.c2007-06-23 18:03:08 UTC (rev 25841)
@@ -1684,7 +1684,7 @@
 {
 Client *c;
 int b;
-gboolean warp_pointer, need_redraw;
+gboolean need_redraw;
 
 TRACE ("entering handleLeaveNotify");
 

Modified: xfwm4/trunk/src/hints.c
===
--- xfwm4/trunk/src/hints.c 2007-06-23 17:59:46 UTC (rev 25840)
+++ xfwm4/trunk/src/hints.c 2007-06-23 18:03:08 UTC (rev 25841)
@@ -1170,7 +1170,6 @@
 void
 updateXserverTime (DisplayInfo *display_info)
 {
-ScreenInfo *screen_info;
 char c = '\0';
 
 g_return_if_fail (display_info);

Modified: xfwm4/trunk/src/screen.c
===
--- xfwm4/trunk/src/screen.c2007-06-23 17:59:46 UTC (rev 25840)
+++ xfwm4/trunk/src/screen.c2007-06-23 18:03:08 UTC (rev 25841)
@@ -494,7 +494,7 @@
 myScreenGetClientFromWindow (ScreenInfo *screen_info, Window w, unsigned short 
mode)
 {
 Client *c;
-int i, j;
+int i;
 
 g_return_val_if_fail (w != None, NULL);
 TRACE ("entering myScreenGetClientFromWindow");

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25840 - xfwm4/trunk/src

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 17:59:46 + (Sat, 23 Jun 2007)
New Revision: 25840

Modified:
   xfwm4/trunk/src/client.c
Log:
Add support for Xinerama, struts, margins

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-23 17:44:02 UTC (rev 25839)
+++ xfwm4/trunk/src/client.c2007-06-23 17:59:46 UTC (rev 25840)
@@ -3214,14 +3214,17 @@
 {
 ScreenInfo *screen_info;
 DisplayInfo *display_info;
-Client *east_neighbour = NULL;
-Client *west_neighbour = NULL;
-Client *north_neighbour = NULL;
-Client *south_neighbour = NULL;
+Client *east_neighbour;
+Client *west_neighbour;
+Client *north_neighbour;
+Client *south_neighbour;
 Client *c2;
+GdkRectangle rect;
 XWindowChanges wc;
-int mask = 0;
-int i;
+unsigned short mask;
+int i, cx, cy, full_x, full_y, full_w, full_h;
+int tmp_x, tmp_y, tmp_w, tmp_h;
+gint monitor_nbr;
 
 g_return_if_fail (c != NULL);
 
@@ -3232,6 +3235,11 @@
 
 screen_info = c->screen_info;
 display_info = screen_info->display_info;
+mask = 0;
+east_neighbour = NULL;
+west_neighbour = NULL;
+north_neighbour = NULL;
+south_neighbour = NULL;
 
 for (c2 = screen_info->clients, i = 0; i < screen_info->client_count; c2 = 
c2->next, i++)
 {
@@ -3338,10 +3346,43 @@
 }
 }
 
-wc.x = frameX(c);
+/* Compute the largest size available, based on struts, margins and 
Xinerama layout */
+tmp_x = frameX (c);
+tmp_y = frameY (c);
+tmp_h = frameHeight (c);
+tmp_w = frameWidth (c);
 
+cx = tmp_x + (tmp_w / 2);
+cy = tmp_y + (tmp_h / 2);
+
+monitor_nbr = find_monitor_at_point (screen_info->gscr, cx, cy);
+gdk_screen_get_monitor_geometry (screen_info->gscr, monitor_nbr, &rect);
+
+full_x = MAX (screen_info->params->xfwm_margins[STRUTS_LEFT], rect.x);
+full_y = MAX (screen_info->params->xfwm_margins[STRUTS_TOP], rect.y);
+full_w = MIN (screen_info->width - 
screen_info->params->xfwm_margins[STRUTS_RIGHT],
+  rect.x + rect.width) - full_x;
+full_h = MIN (screen_info->height - 
screen_info->params->xfwm_margins[STRUTS_BOTTOM],
+  rect.y + rect.height) - full_y;
+
+if ((fill_type & CLIENT_FILL) == CLIENT_FILL)
+{
+/* Adjust size to the largest size available, not covering struts */
+clientMaxSpace (screen_info, &full_x, &full_y, &full_w, &full_h);
+}
+else if (fill_type & CLIENT_FILL_VERT)
+{
+/* Adjust size to the tallest size available, for the current 
horizontal position/width */
+clientMaxSpace (screen_info, &tmp_x, &full_y, &tmp_w, &full_h);
+}
+else if (fill_type & CLIENT_FILL_HORIZ)
+{
+/* Adjust size to the widest size available, for the current vertical 
position/height */
+clientMaxSpace (screen_info, &full_x, &tmp_y, &full_w, &tmp_h);
+}
+
 /* If there are neighbours, resize to their borders.
- * If not, resize to the screen-border
+ * If not, resize to the largest size available taht you just have 
computed.
  */
 
 if (east_neighbour)
@@ -3350,7 +3391,7 @@
 }
 else
 {
-wc.x = frameLeft(c);
+wc.x = full_x + frameLeft(c);
 }
 
 if (west_neighbour)
@@ -3359,7 +3400,7 @@
 }
 else
 {
-wc.width = screen_info->width - frameRight(c) - wc.x;
+wc.width = full_w - frameRight(c) - wc.x;
 }
 
 if (north_neighbour)
@@ -3368,7 +3409,7 @@
 }
 else
 {
-wc.y = frameTop(c);
+wc.y = full_y + frameTop(c);
 }
 
 if (south_neighbour)
@@ -3377,7 +3418,7 @@
 }
 else
 {
-wc.height = screen_info->height - frameBottom(c) - wc.y;
+wc.height = full_h - frameBottom(c) - wc.y;
 }
 
 if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MANAGED))

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25839 - xfwm4/trunk/src

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 17:44:02 + (Sat, 23 Jun 2007)
New Revision: 25839

Modified:
   xfwm4/trunk/src/client.c
Log:
Computes the right size when filling

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-23 17:30:53 UTC (rev 25838)
+++ xfwm4/trunk/src/client.c2007-06-23 17:44:02 UTC (rev 25839)
@@ -3346,8 +3346,7 @@
 
 if (east_neighbour)
 {
-wc.x = frameX(east_neighbour) + frameWidth(east_neighbour) +
-(frameLeft(c) + frameRight(east_neighbour));
+wc.x = frameX(east_neighbour) + frameWidth(east_neighbour) + 
frameLeft(c);
 }
 else
 {
@@ -3356,19 +3355,16 @@
 
 if (west_neighbour)
 {
-wc.width = frameX(west_neighbour) - wc.x -
-(frameRight(c) + frameLeft(west_neighbour));
+wc.width = frameX(west_neighbour) - frameRight(c) - wc.x;
 }
 else
 {
-wc.width = screen_info->width - wc.x -
-(frameRight(c));
+wc.width = screen_info->width - frameRight(c) - wc.x;
 }
 
 if (north_neighbour)
 {
-wc.y = frameY(north_neighbour) + frameHeight(north_neighbour) +
-(frameTop(c) + frameBottom(north_neighbour));
+wc.y = frameY(north_neighbour) + frameHeight(north_neighbour) + 
frameTop(c);
 }
 else
 {
@@ -3377,12 +3373,11 @@
 
 if (south_neighbour)
 {
-wc.height = frameY(south_neighbour) - wc.y -
-(frameTop(south_neighbour) + frameBottom(c));
+wc.height = frameY(south_neighbour) - frameBottom(c) - wc.y;
 }
 else
 {
-wc.height = screen_info->height - wc.y;
+wc.height = screen_info->height - frameBottom(c) - wc.y;
 }
 
 if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MANAGED))

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25838 - xfwm4/trunk/src

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 17:30:53 + (Sat, 23 Jun 2007)
New Revision: 25838

Modified:
   xfwm4/trunk/src/client.c
Log:
Use proper frame*() functions

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-23 17:14:48 UTC (rev 25837)
+++ xfwm4/trunk/src/client.c2007-06-23 17:30:53 UTC (rev 25838)
@@ -3250,16 +3250,16 @@
  * check if the neigbour client (c2) is located
  * east or west of our client.
  */
-if (!(((c->y + c->height) < (c2->y - frameTop(c2))) || ((c2->y 
+ c2->height) < (c->y - frameTop(c)
+if (!(((frameY(c) + frameHeight(c)) < (frameY(c2) - 
frameTop(c2))) || ((frameY(c2) + frameHeight(c2)) < (frameY(c) - frameTop(c)
 {
-if ((c2->x + c2->width) < c->x)
+if ((frameX(c2) + frameWidth(c2)) < frameX(c))
 {
 if (east_neighbour)
 {
 /* Check if c2 is closer to the client
  * then the east neighbour already found
  */
-if ((east_neighbour->x + east_neighbour->width) < 
(c2->x + c2->width))
+if ((frameX(east_neighbour) + 
frameWidth(east_neighbour)) < (frameX(c2) + frameWidth(c2)))
 {
 east_neighbour = c2;
 }
@@ -3269,14 +3269,14 @@
 east_neighbour = c2;
 }
 }
-if ((c->x + c->width) < c2->x)
+if ((frameX(c) + frameWidth(c)) < frameX(c2))
 {
 /* Check if c2 is closer to the client
  * then the west neighbour already found
  */
 if (west_neighbour)
 {
-if (c2->x < west_neighbour->x)
+if (frameX(c2) < frameX(west_neighbour))
 {
 west_neighbour = c2;
 }
@@ -3297,16 +3297,16 @@
 /* check if the neigbour client (c2) is located
  * north or south of our client.
  */
-if (!(((c->x + c->width) < c2->x) || ((c2->x + c2->width) < 
c->x)))
+if (!(((frameX(c) + frameWidth(c)) < frameX(c2)) || 
((frameX(c2) + frameWidth(c2)) < frameX(c
 {
-if ((c2->y + c2->height) < c->y)
+if ((frameY(c2) + frameHeight(c2)) < frameY(c))
 {
 if (north_neighbour)
 {
 /* Check if c2 is closer to the client
  * then the north neighbour already found
  */
-if ((north_neighbour->y + north_neighbour->height) 
< (c2->y + c2->height))
+if ((frameY(north_neighbour) + 
frameHeight(north_neighbour)) < (frameY(c2) + frameHeight(c2)))
 {
 north_neighbour = c2;
 }
@@ -3316,14 +3316,14 @@
 north_neighbour = c2;
 }
 }
-if ((c->y + c->height) < c2->y)
+if ((frameY(c) + frameHeight(c)) < frameY(c2))
 {
 if (south_neighbour)
 {
 /* Check if c2 is closer to the client
  * then the south neighbour already found
  */
-if (c2->y < south_neighbour->y)
+if (frameY(c2) < frameY(south_neighbour))
 {
 south_neighbour = c2;
 }
@@ -3338,7 +3338,7 @@
 }
 }
 
-wc.x = c->x;
+wc.x = frameX(c);
 
 /* If there are neighbours, resize to their borders.
  * If not, resize to the screen-border
@@ -3346,7 +3346,7 @@
 
 if (east_neighbour)
 {
-wc.x = east_neighbour->x + east_neighbour->width +
+wc.x = frameX(east_neighbour) + frameWidth(east_neighbour) +
 (frameLeft(c) + frameRight(east_neighbour));
 }
 else
@@ -3356,7 +3356,7 @@
 
 if (west_neighbour)
 {
-wc.width = west_neighbour->x - wc.x -
+wc.width = frameX(west_neighbour) - wc.x -
 (frameRight(c) + frameLeft(west_neighbour));
 }
 else
@@ -3367,7 +3367,7 @@
 
 if (north_neighbour)
 {
-wc.y = north_neighbour->y + north_neighbour->height +
+

[Xfce4-commits] r25837 - xfwm4/trunk/src

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 17:14:48 + (Sat, 23 Jun 2007)
New Revision: 25837

Modified:
   xfwm4/trunk/src/client.c
Log:
Some fixes to previous patch, needs more (Xinerama support, struts, use proper 
frame* function instead of using Client fields)

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-23 16:50:46 UTC (rev 25836)
+++ xfwm4/trunk/src/client.c2007-06-23 17:14:48 UTC (rev 25837)
@@ -3214,15 +3214,14 @@
 {
 ScreenInfo *screen_info;
 DisplayInfo *display_info;
-GList *window_list;
 Client *east_neighbour = NULL;
 Client *west_neighbour = NULL;
 Client *north_neighbour = NULL;
 Client *south_neighbour = NULL;
-Client *c_n;
+Client *c2;
 XWindowChanges wc;
 int mask = 0;
-int key = fill_type;
+int i;
 
 g_return_if_fail (c != NULL);
 
@@ -3234,18 +3233,13 @@
 screen_info = c->screen_info;
 display_info = screen_info->display_info;
 
-window_list = screen_info->windows;
-
-while (window_list)
+for (c2 = screen_info->clients, i = 0; i < screen_info->client_count; c2 = 
c2->next, i++)
 {
-/* Retrieve all windows */
-c_n = (Client *)window_list->data;
 
-/* Filter out all windows which are not present on the same
- * workspace as the client window, aswell as the client window
- * itself
+/* Filter out all windows which are not visible, or not on the same 
layer
+ * as well as the client window itself
  */
-if ((c->win_workspace == c_n->win_workspace) && (c != 
window_list->data))
+if ((c != c2) && FLAG_TEST (c2->xfwm_flags, XFWM_FLAG_VISIBLE) && 
(c2->win_layer == c->win_layer))
 {
 /* Fill horizontally */
 if (fill_type & CLIENT_FILL_HORIZ)
@@ -3253,43 +3247,43 @@
 mask |= CWX | CWWidth;
 
 /*
- * check if the neigbour client (c_n) is located
+ * check if the neigbour client (c2) is located
  * east or west of our client.
  */
-if (!(((c->y + c->height) < (c_n->y - frameTop(c_n))) || 
((c_n->y + c_n->height) < (c->y - frameTop(c)
+if (!(((c->y + c->height) < (c2->y - frameTop(c2))) || ((c2->y 
+ c2->height) < (c->y - frameTop(c)
 {
-if ((c_n->x + c_n->width) < c->x)
+if ((c2->x + c2->width) < c->x)
 {
 if (east_neighbour)
 {
-/* Check if c_n is closer to the client
+/* Check if c2 is closer to the client
  * then the east neighbour already found
  */
-if ((east_neighbour->x + east_neighbour->width) < 
(c_n->x + c_n->width))
+if ((east_neighbour->x + east_neighbour->width) < 
(c2->x + c2->width))
 {
-east_neighbour = c_n;
+east_neighbour = c2;
 }
 }
 else
 {
-east_neighbour = c_n;
+east_neighbour = c2;
 }
 }
-if ((c->x + c->width) < c_n->x)
+if ((c->x + c->width) < c2->x)
 {
-/* Check if c_n is closer to the client
+/* Check if c2 is closer to the client
  * then the west neighbour already found
  */
 if (west_neighbour)
 {
-if (c_n->x < west_neighbour->x)
+if (c2->x < west_neighbour->x)
 {
-west_neighbour = c_n;
+west_neighbour = c2;
 }
 }
 else
 {
-west_neighbour = c_n;
+west_neighbour = c2;
 }
 }
 }
@@ -3300,50 +3294,48 @@
 {
 mask |= CWY | CWHeight;
 
-/* check if the neigbour client (c_n) is located
+/* check if the neigbour client (c2) is located
  * north or south of our client.
  */
-if (!(((c->x + c->width) < c_n->x) || ((c_n->x + c_n->width) < 
c->x)))
+if (!(((c->x + c->width) < c2->x) || ((c2->x + c2->width) < 
c->x)))
 {
-if ((c_n->y + c_n->height) < c->y)
+i

[Xfce4-commits] r25836 - in xfwm4/trunk: mcs-plugin src themes/default.keys

2007-06-23 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-23 16:50:46 + (Sat, 23 Jun 2007)
New Revision: 25836

Modified:
   xfwm4/trunk/mcs-plugin/workspaces.c
   xfwm4/trunk/mcs-plugin/xfwm4_plugin.c
   xfwm4/trunk/mcs-plugin/xfwm4_plugin.h
   xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/client.h
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/frame.c
   xfwm4/trunk/src/screen.c
   xfwm4/trunk/src/settings.c
   xfwm4/trunk/src/settings.h
   xfwm4/trunk/themes/default.keys/keythemerc
Log:
Add window fill function (Bug #2319), patch from Stephan Arts ([EMAIL 
PROTECTED]) applied with changes

Modified: xfwm4/trunk/mcs-plugin/workspaces.c
===
--- xfwm4/trunk/mcs-plugin/workspaces.c 2007-06-22 18:30:04 UTC (rev 25835)
+++ xfwm4/trunk/mcs-plugin/workspaces.c 2007-06-23 16:50:46 UTC (rev 25836)
@@ -64,7 +64,7 @@
 {
 NUMBER_COLUMN,
 NAME_COLUMN,
-N_COLUMNS
+THEME_NAME_COLUMNS
 };
 
 static void save_workspaces_channel (McsManager * manager);
@@ -440,7 +440,7 @@
 gtk_box_pack_start (GTK_BOX (vbox), treeview_scroll, TRUE, TRUE, 0);
 gtk_widget_set_size_request (treeview_scroll, -1, 120);
 
-store = gtk_list_store_new (N_COLUMNS, G_TYPE_INT, G_TYPE_STRING);
+store = gtk_list_store_new (THEME_NAME_COLUMNS, G_TYPE_INT, G_TYPE_STRING);
 treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
 g_object_unref (G_OBJECT (store));
 gtk_widget_show (treeview);

Modified: xfwm4/trunk/mcs-plugin/xfwm4_plugin.c
===
--- xfwm4/trunk/mcs-plugin/xfwm4_plugin.c   2007-06-22 18:30:04 UTC (rev 
25835)
+++ xfwm4/trunk/mcs-plugin/xfwm4_plugin.c   2007-06-23 16:50:46 UTC (rev 
25836)
@@ -79,6 +79,7 @@
 {N_("Shade window"), "shade"},
 {N_("Hide window"), "hide"},
 {N_("Maximize window"), "maximize"},
+{N_("Fill window"), "fill"},
 {N_("Nothing"), "none"},
 {NULL, NULL}
 };
@@ -1566,7 +1567,7 @@
 gtk_widget_show (frame);
 gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
 
-model = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, 
G_TYPE_STRING);
+model = gtk_list_store_new (KEY_SHORTCUT_COLUMNS, G_TYPE_STRING, 
G_TYPE_STRING, G_TYPE_STRING);
 dialog->treeview3 = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
 gtk_widget_show (dialog->treeview3);
 gtk_container_add (GTK_CONTAINER (dialog->scrolledwindow3), 
dialog->treeview3);
@@ -1896,7 +1897,7 @@
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->box_move_check), 
!box_move);
 
 frame = xfce_create_framebox_with_content (_("Double click action"),
-create_option_menu_box (dbl_click_values, 4,
+create_option_menu_box (dbl_click_values, 5,
 _("Action to perform when double clicking on title bar :"), 
dbl_click_action,
 G_CALLBACK (cb_dblclick_action_value_changed), mcs_plugin));
 gtk_widget_show (frame);
@@ -1932,7 +1933,7 @@
 static void
 setup_dialog (Itf * itf)
 {
-GtkTreeModel *model1, *model2;
+GtkTreeModel *model1, *model2, *model3;
 GtkTreeSelection *selection;
 ThemeInfo *ti;
 
@@ -1941,16 +1942,20 @@
 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 
(itf->treeview2), -1, NULL,
 gtk_cell_renderer_text_new (), "text", THEME_NAME_COLUMN, NULL);
 
-model1 = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING);
+model1 = (GtkTreeModel *) gtk_list_store_new (THEME_NAME_COLUMNS, 
G_TYPE_STRING);
 gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model1), 0, sort_func, 
NULL, NULL);
 gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model1), 0, 
GTK_SORT_ASCENDING);
 gtk_tree_view_set_model (GTK_TREE_VIEW (itf->treeview1), model1);
 
-model2 = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING);
+model2 = (GtkTreeModel *) gtk_list_store_new (THEME_NAME_COLUMNS, 
G_TYPE_STRING);
 gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model2), 0, sort_func, 
NULL, NULL);
 gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model2), 0, 
GTK_SORT_ASCENDING);
 gtk_tree_view_set_model (GTK_TREE_VIEW (itf->treeview2), model2);
 
+model3 = gtk_tree_view_get_model (GTK_TREE_VIEW (itf->treeview3));
+gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model3), 0, sort_func, 
NULL, NULL);
+gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model3), 0, 
GTK_SORT_ASCENDING);
+
 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (itf->treeview1));
 gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
 g_signal_connect (G_OBJECT (selection), "changed", (GCallback) 
decoration_selection_changed,

Modified: xfwm4/trunk/mcs-plugin/xfwm4_plugin.h
===
--- xfwm4/trunk/mcs-plugin/xfwm4_plugin.h   2007-06-22 18:30:04 UTC (rev 
25835)
+++ xfwm4

[Xfce4-commits] r25832 - xfwm4/branches/xfce_4_4

2007-06-21 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-21 22:47:26 + (Thu, 21 Jun 2007)
New Revision: 25832

Modified:
   xfwm4/branches/xfce_4_4/NEWS
Log:
Typo in NEWS file

Modified: xfwm4/branches/xfce_4_4/NEWS
===
--- xfwm4/branches/xfce_4_4/NEWS2007-06-21 22:28:04 UTC (rev 25831)
+++ xfwm4/branches/xfce_4_4/NEWS2007-06-21 22:47:26 UTC (rev 25832)
@@ -2,18 +2,18 @@
 =
 
 - Fix xfwm4 hanging with gtk+-2.11.x (Bug #3346)
+- Plug a leak in mouse button grab when changing theme
 - Fix dialogs and modals without parents not being automatically 
   centered like before (#Bug #3278)
-- Fix modifier mask not working with all keynaps (Bug #3194)
-- Fix wrong count of key shortcut causing switch to last workspace 
+- Fix modifier mask not working with all keymaps (Bug #3194)
+- Fix wrong count of key shortcuts causing switch to last workspace 
   on modifier key press if no window is focused (Bug #3191)
 - Fix spec file missing from the tar ball causing 'make dist' to fail
-- Fix strick bound checking causing wrong window to be focused in focus 
+- Fix strict bound checking causing wrong window to be focused in focus 
   follow mouse (Bug #2781)
 - Transients for group shouldn't apply to other transients, or it breaks 
   stacking for some apps, noticeably mozilla "save as" dialog...
 - Fix typo breaking compilation on systems without XShape 1.1 support
-- Plug a leak in mouse button grab when changing theme
 
 4.4.1
 =

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25831 - in xfwm4/branches/xfce_4_4: . src

2007-06-21 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-21 22:28:04 + (Thu, 21 Jun 2007)
New Revision: 25831

Modified:
   xfwm4/branches/xfce_4_4/NEWS
   xfwm4/branches/xfce_4_4/src/client.c
   xfwm4/branches/xfce_4_4/src/display.c
   xfwm4/branches/xfce_4_4/src/display.h
   xfwm4/branches/xfce_4_4/src/hints.c
   xfwm4/branches/xfce_4_4/src/hints.h
Log:
Fix xfwm4 hanging with gtk+-2.11.x (Bug #3346) - Patch based on a similar fix 
for Metacity, see gnome bug #354213

Modified: xfwm4/branches/xfce_4_4/NEWS
===
--- xfwm4/branches/xfce_4_4/NEWS2007-06-21 22:21:09 UTC (rev 25830)
+++ xfwm4/branches/xfce_4_4/NEWS2007-06-21 22:28:04 UTC (rev 25831)
@@ -1,6 +1,7 @@
 4.4.2
 =
 
+- Fix xfwm4 hanging with gtk+-2.11.x (Bug #3346)
 - Fix dialogs and modals without parents not being automatically 
   centered like before (#Bug #3278)
 - Fix modifier mask not working with all keynaps (Bug #3194)

Modified: xfwm4/branches/xfce_4_4/src/client.c
===
--- xfwm4/branches/xfce_4_4/src/client.c2007-06-21 22:21:09 UTC (rev 
25830)
+++ xfwm4/branches/xfce_4_4/src/client.c2007-06-21 22:28:04 UTC (rev 
25831)
@@ -4868,21 +4868,19 @@
 
 if (passdata.c)
 {
-GdkPixbuf *icon;
-
 TRACE ("entering cycle loop");
 passdata.wireframe = wireframeCreate (passdata.c);
-icon = getAppIcon (display_info, passdata.c->window, 32, 32);
 passdata.tabwin = tabwinCreate (passdata.c->screen_info->gscr, c,
 passdata.c, passdata.cycle_range,
 screen_info->params->cycle_workspaces);
 eventFilterPush (display_info->xfilter, clientCycleEventFilter, 
&passdata);
 gtk_main ();
 eventFilterPop (display_info->xfilter);
-wireframeDelete (screen_info, passdata.wireframe);
 TRACE ("leaving cycle loop");
 tabwinDestroy (passdata.tabwin);
 g_free (passdata.tabwin);
+wireframeDelete (screen_info, passdata.wireframe);
+updateXserverTime (display_info);
 }
 
 if (passdata.c)

Modified: xfwm4/branches/xfce_4_4/src/display.c
===
--- xfwm4/branches/xfce_4_4/src/display.c   2007-06-21 22:21:09 UTC (rev 
25830)
+++ xfwm4/branches/xfce_4_4/src/display.c   2007-06-21 22:28:04 UTC (rev 
25831)
@@ -178,6 +178,19 @@
   FALSE, display_info->atoms) != 0);
 }
 
+static void
+myDisplayCreateTimestampWin (DisplayInfo *display_info)
+{
+XSetWindowAttributes attributes;
+
+attributes.event_mask = PropertyChangeMask;
+attributes.override_redirect = TRUE;
+display_info->timestamp_win = 
+XCreateWindow (display_info->dpy, DefaultRootWindow 
(display_info->dpy),
+   -100, -100, 10, 10, 0, 0, CopyFromParent, 
CopyFromParent,
+   CWEventMask | CWOverrideRedirect, &attributes);
+}
+
 DisplayInfo *
 myDisplayInit (GdkDisplay *gdisplay)
 {
@@ -309,6 +322,8 @@
 display->resize_cursor[CORNER_COUNT + SIDE_BOTTOM] =
 XCreateFontCursor (display->dpy, XC_bottom_side);
 
+myDisplayCreateTimestampWin (display);
+
 display->xfilter = NULL;
 display->screens = NULL;
 display->clients = NULL;
@@ -340,6 +355,8 @@
 display->move_cursor = None;
 XFreeCursor (display->dpy, display->root_cursor);
 display->root_cursor = None;
+XDestroyWindow (display->dpy, display->timestamp_win);
+display->timestamp_win = None;
 
 if (display->hostname)
 {

Modified: xfwm4/branches/xfce_4_4/src/display.h
===
--- xfwm4/branches/xfce_4_4/src/display.h   2007-06-21 22:21:09 UTC (rev 
25830)
+++ xfwm4/branches/xfce_4_4/src/display.h   2007-06-21 22:28:04 UTC (rev 
25831)
@@ -226,6 +226,7 @@
 gboolean quit;
 gboolean reload;
 
+Window timestamp_win;
 Cursor busy_cursor;
 Cursor move_cursor;
 Cursor root_cursor;

Modified: xfwm4/branches/xfce_4_4/src/hints.c
===
--- xfwm4/branches/xfce_4_4/src/hints.c 2007-06-21 22:21:09 UTC (rev 25830)
+++ xfwm4/branches/xfce_4_4/src/hints.c 2007-06-21 22:28:04 UTC (rev 25831)
@@ -1167,27 +1167,18 @@
 return setXAtomManagerOwner(display_info, display_info->atoms[atom_id], 
root, w);
 }
 
-
-static Bool
-checkPropEvent (Display *display, XEvent *xevent, XPointer arg)
+void
+updateXserverTime (DisplayInfo *display_info)
 {
-DisplayInfo *display_info;
 ScreenInfo *screen_info;
+char c = '\0';
 
-display_info = (DisplayInfo *) arg;
-g_return_val_if_fail (display_info, FALSE);
+g_return_if_fail (display_info);
 
-screen_info = myDisplayGetDefaultScreen (display_info);
-g_return_val_if_fail (screen_info, FALSE);
-
-if ((xevent->type == PropertyNotify) 

[Xfce4-commits] r25830 - xfwm4/trunk/src

2007-06-21 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-21 22:21:09 + (Thu, 21 Jun 2007)
New Revision: 25830

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/display.h
   xfwm4/trunk/src/hints.c
   xfwm4/trunk/src/hints.h
   xfwm4/trunk/src/mypixmap.c
Log:
Fix xfwm4 hanging with gtk+-2.11.x (Bug #3346) - Patch based on a similar fix 
for Metacity, see gnome bug #354213

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-21 09:45:16 UTC (rev 25829)
+++ xfwm4/trunk/src/client.c2007-06-21 22:21:09 UTC (rev 25830)
@@ -4888,21 +4888,19 @@
 
 if (passdata.c)
 {
-GdkPixbuf *icon;
-
 TRACE ("entering cycle loop");
 passdata.wireframe = wireframeCreate (passdata.c);
-icon = getAppIcon (display_info, passdata.c->window, 32, 32);
 passdata.tabwin = tabwinCreate (passdata.c->screen_info->gscr, c,
 passdata.c, passdata.cycle_range,
 screen_info->params->cycle_workspaces);
 eventFilterPush (display_info->xfilter, clientCycleEventFilter, 
&passdata);
 gtk_main ();
 eventFilterPop (display_info->xfilter);
-wireframeDelete (screen_info, passdata.wireframe);
 TRACE ("leaving cycle loop");
 tabwinDestroy (passdata.tabwin);
 g_free (passdata.tabwin);
+wireframeDelete (screen_info, passdata.wireframe);
+updateXserverTime (display_info);
 }
 
 if (passdata.c)

Modified: xfwm4/trunk/src/display.c
===
--- xfwm4/trunk/src/display.c   2007-06-21 09:45:16 UTC (rev 25829)
+++ xfwm4/trunk/src/display.c   2007-06-21 22:21:09 UTC (rev 25830)
@@ -178,6 +178,19 @@
   FALSE, display_info->atoms) != 0);
 }
 
+static void
+myDisplayCreateTimestampWin (DisplayInfo *display_info)
+{
+XSetWindowAttributes attributes;
+
+attributes.event_mask = PropertyChangeMask;
+attributes.override_redirect = TRUE;
+display_info->timestamp_win = 
+XCreateWindow (display_info->dpy, DefaultRootWindow 
(display_info->dpy),
+   -100, -100, 10, 10, 0, 0, CopyFromParent, 
CopyFromParent,
+   CWEventMask | CWOverrideRedirect, &attributes);
+}
+
 DisplayInfo *
 myDisplayInit (GdkDisplay *gdisplay)
 {
@@ -309,6 +322,8 @@
 display->resize_cursor[CORNER_COUNT + SIDE_BOTTOM] =
 XCreateFontCursor (display->dpy, XC_bottom_side);
 
+myDisplayCreateTimestampWin (display);
+
 display->xfilter = NULL;
 display->screens = NULL;
 display->clients = NULL;
@@ -340,6 +355,8 @@
 display->move_cursor = None;
 XFreeCursor (display->dpy, display->root_cursor);
 display->root_cursor = None;
+XDestroyWindow (display->dpy, display->timestamp_win);
+display->timestamp_win = None;
 
 if (display->hostname)
 {

Modified: xfwm4/trunk/src/display.h
===
--- xfwm4/trunk/src/display.h   2007-06-21 09:45:16 UTC (rev 25829)
+++ xfwm4/trunk/src/display.h   2007-06-21 22:21:09 UTC (rev 25830)
@@ -272,6 +272,7 @@
 gboolean quit;
 gboolean reload;
 
+Window timestamp_win;
 Cursor busy_cursor;
 Cursor move_cursor;
 Cursor root_cursor;

Modified: xfwm4/trunk/src/hints.c
===
--- xfwm4/trunk/src/hints.c 2007-06-21 09:45:16 UTC (rev 25829)
+++ xfwm4/trunk/src/hints.c 2007-06-21 22:21:09 UTC (rev 25830)
@@ -1167,27 +1167,18 @@
 return setXAtomManagerOwner(display_info, display_info->atoms[atom_id], 
root, w);
 }
 
-
-static Bool
-checkPropEvent (Display *display, XEvent *xevent, XPointer arg)
+void
+updateXserverTime (DisplayInfo *display_info)
 {
-DisplayInfo *display_info;
 ScreenInfo *screen_info;
+char c = '\0';
 
-display_info = (DisplayInfo *) arg;
-g_return_val_if_fail (display_info, FALSE);
+g_return_if_fail (display_info);
 
-screen_info = myDisplayGetDefaultScreen (display_info);
-g_return_val_if_fail (screen_info, FALSE);
-
-if ((xevent->type == PropertyNotify) &&
-(xevent->xproperty.window == screen_info->xfwm4_win) &&
-(xevent->xproperty.atom == display_info->atoms[XFWM4_TIMESTAMP_PROP]))
-{
-return TRUE;
-}
-
-return FALSE;
+XChangeProperty (display_info->dpy, display_info->timestamp_win,
+ display_info->atoms[XFWM4_TIMESTAMP_PROP],
+ display_info->atoms[XFWM4_TIMESTAMP_PROP],
+ 8, PropModeReplace, (unsigned char *) &c, 1);
 }
 
 Time
@@ -1196,7 +1187,6 @@
 ScreenInfo *screen_info;
 XEvent xevent;
 Time timestamp;
-char c = '\0';
 
 g_return_val_if_fail (display_info, (Time) CurrentTime);
 timestamp = myDisplayGetCurrentTime (display_info);
@@ -1206,12 +1196,

[Xfce4-commits] r25821 - xfwm4/trunk/src

2007-06-17 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-17 07:28:34 + (Sun, 17 Jun 2007)
New Revision: 25821

Modified:
   xfwm4/trunk/src/screen.c
Log:
Add missing pixmap inits

Modified: xfwm4/trunk/src/screen.c
===
--- xfwm4/trunk/src/screen.c2007-06-16 23:17:52 UTC (rev 25820)
+++ xfwm4/trunk/src/screen.c2007-06-17 07:28:34 UTC (rev 25821)
@@ -55,7 +55,7 @@
 PangoLayout *layout;
 Atom wm_sn_atom;
 long desktop_visible;
-int i;
+int i, j;
 
 g_return_val_if_fail (display_info, NULL);
 g_return_val_if_fail (GDK_IS_SCREEN (gscr), NULL);
@@ -201,29 +201,29 @@
 screen_info->title_shadow_colors[INACTIVE].gc = NULL;
 screen_info->title_shadow_colors[INACTIVE].allocated = FALSE;
 
-for (i = 0; i < BUTTON_COUNT; i++)
+for (i = 0; i < SIDE_COUNT; i++)
 {
-xfwmPixmapInit (screen_info, &screen_info->buttons[i][ACTIVE]);
-xfwmPixmapInit (screen_info, &screen_info->buttons[i][INACTIVE]);
-xfwmPixmapInit (screen_info, &screen_info->buttons[i][PRESSED]);
-xfwmPixmapInit (screen_info, &screen_info->buttons[i][T_ACTIVE]);
-xfwmPixmapInit (screen_info, &screen_info->buttons[i][T_INACTIVE]);
-xfwmPixmapInit (screen_info, &screen_info->buttons[i][T_PRESSED]);
+xfwmPixmapInit (screen_info, &screen_info->sides[i][ACTIVE]);
+xfwmPixmapInit (screen_info, &screen_info->sides[i][INACTIVE]);
 }
 for (i = 0; i < CORNER_COUNT; i++)
 {
 xfwmPixmapInit (screen_info, &screen_info->corners[i][ACTIVE]);
 xfwmPixmapInit (screen_info, &screen_info->corners[i][INACTIVE]);
 }
-for (i = 0; i < SIDE_COUNT; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
-xfwmPixmapInit (screen_info, &screen_info->sides[i][ACTIVE]);
-xfwmPixmapInit (screen_info, &screen_info->sides[i][INACTIVE]);
+for (j = 0; j < STATE_COUNT; j++)
+{
+xfwmPixmapInit (screen_info, &screen_info->buttons[i][j]);
+}
 }
 for (i = 0; i < TITLE_COUNT; i++)
 {
 xfwmPixmapInit (screen_info, &screen_info->title[i][ACTIVE]);
 xfwmPixmapInit (screen_info, &screen_info->title[i][INACTIVE]);
+xfwmPixmapInit (screen_info, &screen_info->top[i][ACTIVE]);
+xfwmPixmapInit (screen_info, &screen_info->top[i][INACTIVE]);
 }
 
 return (screen_info);

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25820 - xfwm4/branches/xfce_4_2/src

2007-06-16 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-16 23:17:52 + (Sat, 16 Jun 2007)
New Revision: 25820

Modified:
   xfwm4/branches/xfce_4_2/src/settings.c
Log:
Plug a leak in mouse button grab when changing theme

Modified: xfwm4/branches/xfce_4_2/src/settings.c
===
--- xfwm4/branches/xfce_4_2/src/settings.c  2007-06-16 23:17:22 UTC (rev 
25819)
+++ xfwm4/branches/xfce_4_2/src/settings.c  2007-06-16 23:17:52 UTC (rev 
25820)
@@ -51,7 +51,7 @@
 
 /* Forward static decls. */
 
-static void  check_for_grabs  (ScreenInfo *);
+static void  update_grabs (ScreenInfo *);
 static void  set_settings_margin  (ScreenInfo *, 
int , 
int);
@@ -83,16 +83,13 @@
int);
 
 static void
-check_for_grabs (ScreenInfo *screen_info)
+update_grabs (ScreenInfo *screen_info)
 {
+clientUngrabMouseButtonForAll (screen_info);
 if ((screen_info->params->raise_on_click) || 
(screen_info->params->click_to_focus))
 {
 clientGrabMouseButtonForAll (screen_info);
 }
-else if (!(screen_info->params->raise_on_click) && 
!(screen_info->params->click_to_focus))
-{
-clientUngrabMouseButtonForAll (screen_info);
-}
 }
 
 static void
@@ -162,7 +159,7 @@
 if (!strcmp (name, "Xfwm/ClickToFocus"))
 {
 screen_info->params->click_to_focus = 
setting->data.v_int;
-check_for_grabs (screen_info);
+update_grabs (screen_info);
 }
 else if (!strcmp (name, "Xfwm/FocusNewWindow"))
 {
@@ -195,12 +192,12 @@
 else if (!strcmp (name, "Xfwm/RaiseOnClick"))
 {
 screen_info->params->raise_on_click = 
setting->data.v_int;
-check_for_grabs (screen_info);
+update_grabs (screen_info);
 }
 else if (!strcmp (name, "Xfwm/RaiseWithAnyButton"))
 {
 screen_info->params->raise_with_any_button = 
setting->data.v_int;
-check_for_grabs (screen_info);
+update_grabs (screen_info);
 }
 else if (!strcmp (name, "Xfwm/SnapToBorder"))
 {
@@ -443,7 +440,6 @@
 &setting) == MCS_SUCCESS)
 {
 setBooleanValueFromInt ("click_to_focus", setting->data.v_int, rc);
-check_for_grabs (screen_info);
 mcs_setting_free (setting);
 }
 if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/FocusNewWindow", CHANNEL1,
@@ -486,14 +482,12 @@
 &setting) == MCS_SUCCESS)
 {
 setBooleanValueFromInt ("raise_on_click", setting->data.v_int, rc);
-check_for_grabs (screen_info);
 mcs_setting_free (setting);
 }
 if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/RaiseWithAnyButton", CHANNEL1,
 &setting) == MCS_SUCCESS)
 {
 setBooleanValueFromInt ("raise_with_any_button", 
setting->data.v_int, rc);
-check_for_grabs (screen_info);
 mcs_setting_free (setting);
 }
 if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/SnapToBorder", CHANNEL1,
@@ -505,8 +499,7 @@
 if (mcs_client_get_setting (screen_info->mcs_client, 
"Xfwm/SnapToWindows", CHANNEL1,
 &setting) == MCS_SUCCESS)
 {
-setBooleanValueFromInt ("snap_to_windows", setting->data.v_int,
-rc);
+setBooleanValueFromInt ("snap_to_windows", setting->data.v_int, 
rc);
 mcs_setting_free (setting);
 }
 if (mcs_client_get_setting (screen_info->mcs_client, "Xfwm/SnapWidth", 
CHANNEL1,
@@ -1195,6 +1188,7 @@
 loadRcData (screen_info, rc);
 loadMcsData (screen_info, rc);
 loadTheme (screen_info, rc);
+update_grabs (screen_info);
 
 if (!loadKeyBindings (screen_info, rc))
 {

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25819 - in xfwm4/branches/xfce_4_4: . src

2007-06-16 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-16 23:17:22 + (Sat, 16 Jun 2007)
New Revision: 25819

Modified:
   xfwm4/branches/xfce_4_4/NEWS
   xfwm4/branches/xfce_4_4/src/client.c
   xfwm4/branches/xfce_4_4/src/settings.c
Log:
Plug a leak in mouse button grab when changing theme

Modified: xfwm4/branches/xfce_4_4/NEWS
===
--- xfwm4/branches/xfce_4_4/NEWS2007-06-16 23:15:15 UTC (rev 25818)
+++ xfwm4/branches/xfce_4_4/NEWS2007-06-16 23:17:22 UTC (rev 25819)
@@ -12,6 +12,7 @@
 - Transients for group shouldn't apply to other transients, or it breaks 
   stacking for some apps, noticeably mozilla "save as" dialog...
 - Fix typo breaking compilation on systems without XShape 1.1 support
+- Plug a leak in mouse button grab when changing theme
 
 4.4.1
 =

Modified: xfwm4/branches/xfce_4_4/src/client.c
===
--- xfwm4/branches/xfce_4_4/src/client.c2007-06-16 23:15:15 UTC (rev 
25818)
+++ xfwm4/branches/xfce_4_4/src/client.c2007-06-16 23:17:22 UTC (rev 
25819)
@@ -254,26 +254,26 @@
 /* Recompute size and position of maximized windows */
 if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ | 
CLIENT_FLAG_MAXIMIZED_VERT))
 {
- maximization_flags |= FLAG_TEST (c->flags,
- CLIENT_FLAG_MAXIMIZED_HORIZ) ? WIN_STATE_MAXIMIZED_HORIZ 
: 0;
- maximization_flags |= FLAG_TEST (c->flags,
- CLIENT_FLAG_MAXIMIZED_VERT) ? WIN_STATE_MAXIMIZED_VERT : 
0;
+maximization_flags |= FLAG_TEST (c->flags,
+CLIENT_FLAG_MAXIMIZED_HORIZ) ? WIN_STATE_MAXIMIZED_HORIZ : 
0;
+maximization_flags |= FLAG_TEST (c->flags,
+CLIENT_FLAG_MAXIMIZED_VERT) ? WIN_STATE_MAXIMIZED_VERT : 0;
 
- /* Force an update by clearing the internal flags */
- FLAG_UNSET (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ | 
CLIENT_FLAG_MAXIMIZED_VERT);
- clientToggleMaximized (c, maximization_flags, FALSE);
+/* Force an update by clearing the internal flags */
+FLAG_UNSET (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ | 
CLIENT_FLAG_MAXIMIZED_VERT);
+clientToggleMaximized (c, maximization_flags, FALSE);
 
- configure_flags |= CFG_FORCE_REDRAW;
- mask &= ~UPDATE_FRAME;
+configure_flags |= CFG_FORCE_REDRAW;
+mask &= ~UPDATE_FRAME;
 }
 }
 if (configure_flags != 0L)
 {
- wc.x = c->x;
- wc.y = c->y;
- wc.width = c->width;
- wc.height = c->height;
- clientConfigure (c, &wc, CWX | CWY | CWWidth | CWHeight, 
configure_flags);
+wc.x = c->x;
+wc.y = c->y;
+wc.width = c->width;
+wc.height = c->height;
+clientConfigure (c, &wc, CWX | CWY | CWWidth | CWHeight, 
configure_flags);
 }
 if (mask & UPDATE_FRAME)
 {

Modified: xfwm4/branches/xfce_4_4/src/settings.c
===
--- xfwm4/branches/xfce_4_4/src/settings.c  2007-06-16 23:15:15 UTC (rev 
25818)
+++ xfwm4/branches/xfce_4_4/src/settings.c  2007-06-16 23:17:22 UTC (rev 
25819)
@@ -54,7 +54,7 @@
 
 /* Forward static decls. */
 
-static void  check_for_grabs  (ScreenInfo *);
+static void  update_grabs  (ScreenInfo *);
 static void  set_settings_margin  (ScreenInfo *,
int ,
int);
@@ -84,16 +84,13 @@
int);
 
 static void
-check_for_grabs (ScreenInfo *screen_info)
+update_grabs (ScreenInfo *screen_info)
 {
+clientUngrabMouseButtonForAll (screen_info);
 if ((screen_info->params->raise_on_click) || 
(screen_info->params->click_to_focus))
 {
 clientGrabMouseButtonForAll (screen_info);
 }
-else if (!(screen_info->params->raise_on_click) && 
!(screen_info->params->click_to_focus))
-{
-clientUngrabMouseButtonForAll (screen_info);
-}
 }
 
 static void
@@ -208,7 +205,7 @@
 else if (!strcmp (name, "Xfwm/ClickToFocus"))
 {
 screen_info->params->click_to_focus = 
setting->data.v_int;
-check_for_grabs (screen_info);
+update_grabs (screen_info);
 }
 else if (!strcmp (name, "Xfwm/FocusNewWindow"))
 {
@@ -225,7 +222,7 @@
 else if (!strcmp (name, "Xfwm/RaiseOnClick"))
 {
 screen_info->params->raise_on_click = 
setting->data.v_int;
-check_for_grabs (screen_info);
+   

[Xfce4-commits] r25818 - xfwm4/trunk/src

2007-06-16 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-16 23:15:15 + (Sat, 16 Jun 2007)
New Revision: 25818

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/display.h
   xfwm4/trunk/src/frame.c
   xfwm4/trunk/src/frame.h
   xfwm4/trunk/src/settings.c
Log:
Plug a pixmap leak in the new button prelight code, and a grab that was leaking 
since 4.2.

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-16 19:15:12 UTC (rev 25817)
+++ xfwm4/trunk/src/client.c2007-06-16 23:15:15 UTC (rev 25818)
@@ -258,26 +258,26 @@
 /* Recompute size and position of maximized windows */
 if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ | 
CLIENT_FLAG_MAXIMIZED_VERT))
 {
- maximization_flags |= FLAG_TEST (c->flags,
- CLIENT_FLAG_MAXIMIZED_HORIZ) ? WIN_STATE_MAXIMIZED_HORIZ 
: 0;
- maximization_flags |= FLAG_TEST (c->flags,
- CLIENT_FLAG_MAXIMIZED_VERT) ? WIN_STATE_MAXIMIZED_VERT : 
0;
+maximization_flags |= FLAG_TEST (c->flags,
+CLIENT_FLAG_MAXIMIZED_HORIZ) ? WIN_STATE_MAXIMIZED_HORIZ : 
0;
+maximization_flags |= FLAG_TEST (c->flags,
+CLIENT_FLAG_MAXIMIZED_VERT) ? WIN_STATE_MAXIMIZED_VERT : 0;
 
- /* Force an update by clearing the internal flags */
- FLAG_UNSET (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ | 
CLIENT_FLAG_MAXIMIZED_VERT);
- clientToggleMaximized (c, maximization_flags, FALSE);
+/* Force an update by clearing the internal flags */
+FLAG_UNSET (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ | 
CLIENT_FLAG_MAXIMIZED_VERT);
+clientToggleMaximized (c, maximization_flags, FALSE);
 
- configure_flags |= CFG_FORCE_REDRAW;
- mask &= ~UPDATE_FRAME;
+configure_flags |= CFG_FORCE_REDRAW;
+mask &= ~UPDATE_FRAME;
 }
 }
 if (configure_flags != 0L)
 {
- wc.x = c->x;
- wc.y = c->y;
- wc.width = c->width;
- wc.height = c->height;
- clientConfigure (c, &wc, CWX | CWY | CWWidth | CWHeight, 
configure_flags);
+wc.x = c->x;
+wc.y = c->y;
+wc.width = c->width;
+wc.height = c->height;
+clientConfigure (c, &wc, CWX | CWY | CWWidth | CWHeight, 
configure_flags);
 }
 if (mask & UPDATE_FRAME)
 {

Modified: xfwm4/trunk/src/display.h
===
--- xfwm4/trunk/src/display.h   2007-06-16 19:15:12 UTC (rev 25817)
+++ xfwm4/trunk/src/display.h   2007-06-16 23:15:15 UTC (rev 25818)
@@ -87,10 +87,10 @@
 
 enum
 {
-CORNER_TOP_LEFT = 0,
+CORNER_BOTTOM_LEFT = 0,
+CORNER_BOTTOM_RIGHT,
+CORNER_TOP_LEFT,
 CORNER_TOP_RIGHT,
-CORNER_BOTTOM_LEFT,
-CORNER_BOTTOM_RIGHT,
 CORNER_COUNT
 };
 
@@ -128,7 +128,7 @@
 T_PRESSED,
 STATE_COUNT
 };
-#define STATE_TOGGLED (STATE_COUNT >> 1)
+#define STATE_TOGGLED (STATE_COUNT / 2)
 
 enum
 {

Modified: xfwm4/trunk/src/frame.c
===
--- xfwm4/trunk/src/frame.c 2007-06-16 19:15:12 UTC (rev 25817)
+++ xfwm4/trunk/src/frame.c 2007-06-16 23:15:15 UTC (rev 25818)
@@ -41,6 +41,13 @@
 #define ShapeInput 2
 #endif
 
+typedef struct
+{
+xfwmPixmap pm_title;
+xfwmPixmap pm_sides[SIDE_COUNT];
+} FramePixmap;
+
+
 int
 frameDecorationLeft (ScreenInfo *screen_info)
 {
@@ -1144,6 +1151,7 @@
 requires_clearing);
 }
 frameSetShape (c, state, &frame_pix, button_x);
+
 xfwmPixmapFree (&frame_pix.pm_title);
 xfwmPixmapFree (&frame_pix.pm_sides[SIDE_BOTTOM]);
 xfwmPixmapFree (&frame_pix.pm_sides[SIDE_LEFT]);

Modified: xfwm4/trunk/src/frame.h
===
--- xfwm4/trunk/src/frame.h 2007-06-16 19:15:12 UTC (rev 25817)
+++ xfwm4/trunk/src/frame.h 2007-06-16 23:15:15 UTC (rev 25818)
@@ -30,14 +30,6 @@
 #include "mypixmap.h"
 #include "client.h"
 
-struct _FramePixmap
-{
-xfwmPixmap pm_title;
-xfwmPixmap pm_sides[SIDE_COUNT];
-};
-
-typedef struct _FramePixmap FramePixmap;
-
 int  frameDecorationLeft(ScreenInfo *);
 int  frameDecorationRight   (ScreenInfo *);
 int  frameDecorationTop (ScreenInfo *);

Modified: xfwm4/trunk/src/settings.c
===
--- xfwm4/trunk/src/settings.c  2007-06-16 19:15:12 UTC (rev 25817)
+++ xfwm4/trunk/src/settings.c  2007-06-16 23:15:15 UTC (rev 25818)
@@ -54,7 +54,7 @@
 
 /* Forward static decls. */
 
-static void  check_for_grabs  (ScreenInfo *);
+stat

[Xfce4-commits] r25809 - xfwm4/trunk/src

2007-06-13 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-13 22:20:24 + (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.c2007-06-13 17:31:24 UTC (rev 25808)
+++ xfwm4/trunk/src/client.c2007-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.h2007-06-13 17:31:24 UTC (rev 

[Xfce4-commits] r25807 - xfwm4/trunk/src

2007-06-12 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-12 23:03:09 + (Tue, 12 Jun 2007)
New Revision: 25807

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/client.h
   xfwm4/trunk/src/compositor.c
   xfwm4/trunk/src/compositor.h
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/display.h
   xfwm4/trunk/src/event_filter.c
   xfwm4/trunk/src/event_filter.h
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/events.h
   xfwm4/trunk/src/focus.c
   xfwm4/trunk/src/focus.h
   xfwm4/trunk/src/frame.c
   xfwm4/trunk/src/frame.h
   xfwm4/trunk/src/hints.c
   xfwm4/trunk/src/hints.h
   xfwm4/trunk/src/icons.c
   xfwm4/trunk/src/icons.h
   xfwm4/trunk/src/keyboard.c
   xfwm4/trunk/src/keyboard.h
   xfwm4/trunk/src/main.c
   xfwm4/trunk/src/menu.c
   xfwm4/trunk/src/menu.h
   xfwm4/trunk/src/misc.c
   xfwm4/trunk/src/misc.h
   xfwm4/trunk/src/mypixmap.c
   xfwm4/trunk/src/mypixmap.h
   xfwm4/trunk/src/mywindow.c
   xfwm4/trunk/src/mywindow.h
   xfwm4/trunk/src/netwm.c
   xfwm4/trunk/src/netwm.h
   xfwm4/trunk/src/parserc.c
   xfwm4/trunk/src/parserc.h
   xfwm4/trunk/src/placement.c
   xfwm4/trunk/src/placement.h
   xfwm4/trunk/src/poswin.c
   xfwm4/trunk/src/poswin.h
   xfwm4/trunk/src/screen.c
   xfwm4/trunk/src/screen.h
   xfwm4/trunk/src/session.c
   xfwm4/trunk/src/session.h
   xfwm4/trunk/src/settings.c
   xfwm4/trunk/src/settings.h
   xfwm4/trunk/src/spinning_cursor.c
   xfwm4/trunk/src/spinning_cursor.h
   xfwm4/trunk/src/stacking.c
   xfwm4/trunk/src/stacking.h
   xfwm4/trunk/src/startup_notification.c
   xfwm4/trunk/src/startup_notification.h
   xfwm4/trunk/src/tabwin.c
   xfwm4/trunk/src/tabwin.h
   xfwm4/trunk/src/transients.c
   xfwm4/trunk/src/transients.h
   xfwm4/trunk/src/ui_style.c
   xfwm4/trunk/src/ui_style.h
   xfwm4/trunk/src/wireframe.c
   xfwm4/trunk/src/wireframe.h
   xfwm4/trunk/src/workspaces.c
   xfwm4/trunk/src/workspaces.h
Log:
Rework a bit the code for hilight and frame drawing

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-12 19:47:31 UTC (rev 25806)
+++ xfwm4/trunk/src/client.c2007-06-12 23:03:09 UTC (rev 25807)
@@ -15,7 +15,7 @@
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 oroborus - (c) 2001 Ken Lynch
-xfwm4- (c) 2002-2006 Olivier Fourdan
+xfwm4- (c) 2002-2007 Olivier Fourdan
 
  */
 
@@ -1580,6 +1580,7 @@
 DisplayInfo *display_info;
 gint size;
 GdkPixbuf *icon;
+int i;
 
 g_return_if_fail (c != NULL);
 g_return_if_fail (c->window != None);
@@ -1589,26 +1590,24 @@
 screen_info = c->screen_info;
 display_info = screen_info->display_info;
 
-xfwmPixmapFree (&c->appmenu[ACTIVE]);
-xfwmPixmapFree (&c->appmenu[INACTIVE]);
-xfwmPixmapFree (&c->appmenu[PRESSED]);
-xfwmPixmapFree (&c->appmenu[PRELIGHT]);
+for (i = 0; i < STATE_TOGGLED; i++)
+{
+xfwmPixmapFree (&c->appmenu[i]);
+}
 
-if (screen_info->buttons[MENU_BUTTON][ACTIVE].pixmap == None)
+if (xfwmPixmapNone(&screen_info->buttons[MENU_BUTTON][ACTIVE]))
 {
 /* The current theme has no menu button */
 return;
 }
 
-xfwmPixmapDuplicate (&screen_info->buttons[MENU_BUTTON][ACTIVE],
- &c->appmenu[ACTIVE]);
-xfwmPixmapDuplicate (&screen_info->buttons[MENU_BUTTON][INACTIVE],
- &c->appmenu[INACTIVE]);
-xfwmPixmapDuplicate (&screen_info->buttons[MENU_BUTTON][PRESSED],
- &c->appmenu[PRESSED]);
-xfwmPixmapDuplicate (&screen_info->buttons[MENU_BUTTON][PRELIGHT],
- &c->appmenu[PRELIGHT]);
-
+for (i = 0; i < STATE_TOGGLED; i++)
+{
+if (!xfwmPixmapNone(&screen_info->buttons[MENU_BUTTON][i]))
+{
+xfwmPixmapDuplicate (&screen_info->buttons[MENU_BUTTON][i], 
&c->appmenu[i]);
+}
+}
 size = MIN (screen_info->buttons[MENU_BUTTON][ACTIVE].width,
 screen_info->buttons[MENU_BUTTON][ACTIVE].height);
 
@@ -1616,11 +1615,13 @@
 {
 icon = getAppIcon (display_info, c->window, size, size);
 
-xfwmPixmapRenderGdkPixbuf (&c->appmenu[ACTIVE], icon);
-xfwmPixmapRenderGdkPixbuf (&c->appmenu[INACTIVE], icon);
-xfwmPixmapRenderGdkPixbuf (&c->appmenu[PRESSED], icon);
-xfwmPixmapRenderGdkPixbuf (&c->appmenu[PRELIGHT], icon);
-
+for (i = 0; i < STATE_TOGGLED; i++)
+{
+if (!xfwmPixmapNone(&c->appmenu[i]))
+{
+xfwmPixmapRenderGdkPixbuf (&c->appmenu[i], icon);
+}
+}
 g_object_unref (icon);
 }
 }
@@ -2005,39 +2006,39 @@
 
 xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
 &c->sides[SIDE_LEFT], NoEventMask,
-

[Xfce4-commits] r25805 - xfwm4/trunk/src

2007-06-12 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-12 19:14:56 + (Tue, 12 Jun 2007)
New Revision: 25805

Modified:
   xfwm4/trunk/src/client.c
Log:
Keep button hilighted after a press if relevant

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-11 22:04:02 UTC (rev 25804)
+++ xfwm4/trunk/src/client.c2007-06-12 19:14:56 UTC (rev 25805)
@@ -5059,7 +5059,11 @@
 
 if (c->button_status[b] == BUTTON_STATE_PRESSED)
 {
-c->button_status[b] = BUTTON_STATE_NORMAL;
+/* 
+ * Button was pressed at the time, means the pointer was still within 
+ * the button, so return to prelight.
+ */
+c->button_status[b] = BUTTON_STATE_PRELIGHT;
 switch (b)
 {
 case HIDE_BUTTON:

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25803 - xfwm4/trunk

2007-06-11 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-11 22:00:11 + (Mon, 11 Jun 2007)
New Revision: 25803

Modified:
   xfwm4/trunk/NEWS
Log:
Update NEWS

Modified: xfwm4/trunk/NEWS
===
--- xfwm4/trunk/NEWS2007-06-11 21:54:43 UTC (rev 25802)
+++ xfwm4/trunk/NEWS2007-06-11 22:00:11 UTC (rev 25803)
@@ -1,6 +1,7 @@
 4.5.x
 =
 
+- Add button prelight in window frames (Bug #3219)
 - Add resize from top of window
 - Rework the event filter to avoid passing all events top gtk+
 - Treat dialogs and utility windows as transients for group (bug #3102)

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25801 - xfwm4/trunk/src

2007-06-11 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-11 21:53:45 + (Mon, 11 Jun 2007)
New Revision: 25801

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/client.h
   xfwm4/trunk/src/compositor.c
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/display.h
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/frame.c
   xfwm4/trunk/src/mywindow.c
   xfwm4/trunk/src/mywindow.h
   xfwm4/trunk/src/screen.c
   xfwm4/trunk/src/screen.h
   xfwm4/trunk/src/settings.c
   xfwm4/trunk/src/stacking.c
   xfwm4/trunk/src/transients.c
Log:
Add support for button prelight in windows frame

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-11 21:17:58 UTC (rev 25800)
+++ xfwm4/trunk/src/client.c2007-06-11 21:53:45 UTC (rev 25801)
@@ -76,6 +76,10 @@
 FocusChangeMask|\
 PropertyChangeMask
 
+#define BUTTON_EVENT_MASK \
+EnterWindowMask|\
+LeaveWindowMask
+
 /* Useful macros */
 #define START_ICONIC(c) \
 ((c->wmhints) && \
@@ -1588,6 +1592,7 @@
 xfwmPixmapFree (&c->appmenu[ACTIVE]);
 xfwmPixmapFree (&c->appmenu[INACTIVE]);
 xfwmPixmapFree (&c->appmenu[PRESSED]);
+xfwmPixmapFree (&c->appmenu[PRELIGHT]);
 
 if (screen_info->buttons[MENU_BUTTON][ACTIVE].pixmap == None)
 {
@@ -1601,6 +1606,8 @@
  &c->appmenu[INACTIVE]);
 xfwmPixmapDuplicate (&screen_info->buttons[MENU_BUTTON][PRESSED],
  &c->appmenu[PRESSED]);
+xfwmPixmapDuplicate (&screen_info->buttons[MENU_BUTTON][PRELIGHT],
+ &c->appmenu[PRELIGHT]);
 
 size = MIN (screen_info->buttons[MENU_BUTTON][ACTIVE].width,
 screen_info->buttons[MENU_BUTTON][ACTIVE].height);
@@ -1612,6 +1619,7 @@
 xfwmPixmapRenderGdkPixbuf (&c->appmenu[ACTIVE], icon);
 xfwmPixmapRenderGdkPixbuf (&c->appmenu[INACTIVE], icon);
 xfwmPixmapRenderGdkPixbuf (&c->appmenu[PRESSED], icon);
+xfwmPixmapRenderGdkPixbuf (&c->appmenu[PRELIGHT], icon);
 
 g_object_unref (icon);
 }
@@ -1799,7 +1807,7 @@
 
 for (i = 0; i < BUTTON_COUNT; i++)
 {
-c->button_pressed[i] = FALSE;
+c->button_status[i] = BUTTON_STATE_NORMAL;
 }
 
 if (!XGetWMColormapWindows (display_info->dpy, c->window, 
&c->cmap_windows, &c->ncmap))
@@ -1993,39 +2001,48 @@
 xfwmPixmapInit (screen_info, &c->appmenu[ACTIVE]);
 xfwmPixmapInit (screen_info, &c->appmenu[INACTIVE]);
 xfwmPixmapInit (screen_info, &c->appmenu[PRESSED]);
+xfwmPixmapInit (screen_info, &c->appmenu[PRELIGHT]);
 
 xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
-&c->sides[SIDE_LEFT],
-myDisplayGetCursorResize(screen_info->display_info, CORNER_COUNT + 
SIDE_LEFT));
-xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
-&c->sides[SIDE_RIGHT],
-myDisplayGetCursorResize(screen_info->display_info, CORNER_COUNT + 
SIDE_RIGHT));
-xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
-&c->sides[SIDE_BOTTOM],
-myDisplayGetCursorResize(screen_info->display_info, CORNER_COUNT + 
SIDE_BOTTOM));
-xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
-&c->corners[CORNER_BOTTOM_LEFT],
-myDisplayGetCursorResize(screen_info->display_info, 
CORNER_BOTTOM_LEFT));
-xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
-&c->corners[CORNER_BOTTOM_RIGHT],
-myDisplayGetCursorResize(screen_info->display_info, 
CORNER_BOTTOM_RIGHT));
-xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
-&c->corners[CORNER_TOP_LEFT],
-myDisplayGetCursorResize(screen_info->display_info, CORNER_TOP_LEFT));
-xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
-&c->corners[CORNER_TOP_RIGHT],
-myDisplayGetCursorResize(screen_info->display_info, CORNER_TOP_RIGHT));
-xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
-&c->title, None);
+&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, 
+   

[Xfce4-commits] r25781 - xfwm4/trunk/src

2007-06-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-03 16:14:33 + (Sun, 03 Jun 2007)
New Revision: 25781

Modified:
   xfwm4/trunk/src/frame.c
Log:
Use full height for regular title pixmap

Modified: xfwm4/trunk/src/frame.c
===
--- xfwm4/trunk/src/frame.c 2007-06-03 15:35:47 UTC (rev 25780)
+++ xfwm4/trunk/src/frame.c 2007-06-03 16:14:33 UTC (rev 25781)
@@ -269,7 +269,7 @@
 {
 xfwmPixmapFill (&screen_info->title[part][state], top_pm, x, 0, w, h);
 }
-xfwmPixmapFill (&screen_info->title[part][state], title_pm, x, -h, w, 
frameTop (c) + h);
+xfwmPixmapFill (&screen_info->title[part][state], title_pm, x, 0, w, 
frameTop (c));
 }
 
 static void

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25780 - xfwm4/trunk/src

2007-06-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-03 15:35:47 + (Sun, 03 Jun 2007)
New Revision: 25780

Modified:
   xfwm4/trunk/src/placement.c
   xfwm4/trunk/src/placement.h
Log:
Fix dialogs and modals without parents not being automatically centered like 
before (#Bug #3278)

Modified: xfwm4/trunk/src/placement.c
===
--- xfwm4/trunk/src/placement.c 2007-06-03 15:33:52 UTC (rev 25779)
+++ xfwm4/trunk/src/placement.c 2007-06-03 15:35:47 UTC (rev 25780)
@@ -467,8 +467,8 @@
translation in Xinerama to center window on physical screen
Not to be confused with clientConstrainPos()
  */
-void
-clientKeepVisible (Client * c)
+static void
+clientKeepVisible (Client * c, gint n_monitors, GdkRectangle *monitor_rect)
 {
 int cx, cy;
 int diff_x, diff_y;
@@ -485,23 +485,15 @@
 diff_x = abs (c->size->x - ((c->screen_info->width - c->width) / 2));
 diff_y = abs (c->size->y - ((c->screen_info->height - c->height) / 2));
 
-if (((gdk_screen_get_n_monitors (c->screen_info->gscr) > 1) && (diff_x < 
25) && (diff_y < 25)) ||
-((frameX (c) == 0) && (frameY (c) == 0) && (c->type & 
(WINDOW_TYPE_DIALOG)) && !clientIsTransient (c)))
+if (((n_monitors > 1) && (diff_x < 25) && (diff_y < 25)) ||
+((frameX (c) == 0) && (frameY (c) == 0) && (c->type & 
(WINDOW_TYPE_DIALOG
 {
-GdkRectangle rect;
-gint monitor_nbr;
-
 /* We consider that the windows is centered on screen,
  * Thus, will move it so its center on the current
  * physical screen
  */
-getMouseXY (c->screen_info, c->screen_info->xroot, &cx, &cy);
-
-monitor_nbr = find_monitor_at_point (c->screen_info->gscr, cx, cy);
-gdk_screen_get_monitor_geometry (c->screen_info->gscr, monitor_nbr, 
&rect);
-
-c->x = rect.x + (rect.width - c->width) / 2;
-c->y = rect.y + (rect.height - c->height) / 2;
+c->x = monitor_rect->x + (monitor_rect->width - c->width) / 2;
+c->y = monitor_rect->y + (monitor_rect->height - c->height) / 2;
 }
 clientConstrainPos (c, TRUE);
 }
@@ -642,7 +634,8 @@
 int full_x, full_y, full_w, full_h, msx, msy;
 gint monitor_nbr;
 gint n_monitors;
-gboolean place = TRUE;
+gboolean place;
+gboolean position;
 
 g_return_if_fail (c != NULL);
 TRACE ("entering clientInitPosition");
@@ -650,48 +643,46 @@
 clientGravitate (c, APPLY);
 
 screen_info = c->screen_info;
-n_monitors = gdk_screen_get_n_monitors (screen_info->gscr);
 msx = 0;
 msy = 0;
+position = (c->size->flags & (PPosition | USPosition));
 
-if ((c->size->flags & (PPosition | USPosition)) ||
-(c->type & (WINDOW_TYPE_DONT_PLACE)) ||
-((c->type & (WINDOW_TYPE_DIALOG)) && !clientIsTransient (c)))
+n_monitors = gdk_screen_get_n_monitors (c->screen_info->gscr);
+monitor_nbr = 0;
+if ((n_monitors > 1) || (screen_info->params->placement_mode == 
PLACE_MOUSE))
 {
-if (CONSTRAINED_WINDOW (c))
-{
-clientKeepVisible (c);
-}
-msx = frameX (c) + (frameWidth (c) / 2);
-msy = frameY (c) + (frameHeight (c) / 2);
-place = FALSE;
+getMouseXY (screen_info, screen_info->xroot, &msx, &msy);
+monitor_nbr = find_monitor_at_point (screen_info->gscr, msx, msy);
 }
-else if (clientIsTransient (c) && (c2 = clientGetTransient (c)))
+gdk_screen_get_monitor_geometry (screen_info->gscr, monitor_nbr, &rect);
+
+if (position || (c->type & (WINDOW_TYPE_DONT_PLACE | WINDOW_TYPE_DIALOG)) 
|| clientIsTransient (c))
 {
+if (!position && clientIsTransient (c) && (c2 = clientGetTransient 
(c)))
+{
+/* Center transient relative to their parent window */
+c->x = c2->x + (c2->width - c->width) / 2;
+c->y = c2->y + (c2->height - c->height) / 2;
 
-/* Center transient relative to their parent window */
-c->x = c2->x + (c2->width - c->width) / 2;
-c->y = c2->y + (c2->height - c->height) / 2;
+if (n_monitors > 1)
+{
+msx = frameX (c) + (frameWidth (c) / 2);
+msy = frameY (c) + (frameHeight (c) / 2);
+monitor_nbr = find_monitor_at_point (screen_info->gscr, msx, 
msy);
+gdk_screen_get_monitor_geometry (screen_info->gscr, 
monitor_nbr, &rect);
+}
+}
 if (CONSTRAINED_WINDOW (c))
 {
-clientKeepVisible (c);
+clientKeepVisible (c, n_monitors, &rect);
 }
-msx = frameX (c) + (frameWidth (c) / 2);
-msy = frameY (c) + (frameHeight (c) / 2);
 place = FALSE;
 }
 else
 {
-if ((n_monitors > 1) || (screen_info->params->placement_mode == 
PLACE_MOUSE))
-{
-getMouseXY (screen_info, screen_info->xroot, &msx, &msy);
-}
 place = TRUE;
 }
 
-monitor_nbr = find_monitor_

[Xfce4-commits] r25779 - xfwm4/branches/xfce_4_4/src

2007-06-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-03 15:33:52 + (Sun, 03 Jun 2007)
New Revision: 25779

Modified:
   xfwm4/branches/xfce_4_4/src/placement.c
Log:
Small indentation issue

Modified: xfwm4/branches/xfce_4_4/src/placement.c
===
--- xfwm4/branches/xfce_4_4/src/placement.c 2007-06-03 15:21:02 UTC (rev 
25778)
+++ xfwm4/branches/xfce_4_4/src/placement.c 2007-06-03 15:33:52 UTC (rev 
25779)
@@ -653,7 +653,7 @@
 msx = frameX (c) + (frameWidth (c) / 2);
 msy = frameY (c) + (frameHeight (c) / 2);
 monitor_nbr = find_monitor_at_point (screen_info->gscr, msx, 
msy);
-   gdk_screen_get_monitor_geometry (screen_info->gscr, 
monitor_nbr, &rect);
+gdk_screen_get_monitor_geometry (screen_info->gscr, 
monitor_nbr, &rect);
 }
 }
 if (CONSTRAINED_WINDOW (c))
@@ -667,7 +667,6 @@
 place = TRUE;
 }
 
-
 full_x = MAX (screen_info->params->xfwm_margins[STRUTS_LEFT], rect.x);
 full_y = MAX (screen_info->params->xfwm_margins[STRUTS_TOP], rect.y);
 full_w = MIN (screen_info->width - 
screen_info->params->xfwm_margins[STRUTS_RIGHT],

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25778 - in xfwm4/branches/xfce_4_4: . src

2007-06-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-03 15:21:02 + (Sun, 03 Jun 2007)
New Revision: 25778

Modified:
   xfwm4/branches/xfce_4_4/NEWS
   xfwm4/branches/xfce_4_4/src/placement.c
   xfwm4/branches/xfce_4_4/src/placement.h
Log:
Fix dialogs and modals without parents not being automatically centered like 
before (#Bug #3278)

Modified: xfwm4/branches/xfce_4_4/NEWS
===
--- xfwm4/branches/xfce_4_4/NEWS2007-06-03 09:44:36 UTC (rev 25777)
+++ xfwm4/branches/xfce_4_4/NEWS2007-06-03 15:21:02 UTC (rev 25778)
@@ -1,8 +1,10 @@
 4.4.2
 =
 
+- Fix dialogs and modals without parents not being automatically 
+  centered like before (#Bug #3278)
 - Fix modifier mask not working with all keynaps (Bug #3194)
-- Fix wrong count of key shortcut causing switch to last workspace
+- Fix wrong count of key shortcut causing switch to last workspace 
   on modifier key press if no window is focused (Bug #3191)
 - Fix spec file missing from the tar ball causing 'make dist' to fail
 - Fix strick bound checking causing wrong window to be focused in focus 

Modified: xfwm4/branches/xfce_4_4/src/placement.c
===
--- xfwm4/branches/xfce_4_4/src/placement.c 2007-06-03 09:44:36 UTC (rev 
25777)
+++ xfwm4/branches/xfce_4_4/src/placement.c 2007-06-03 15:21:02 UTC (rev 
25778)
@@ -467,8 +467,8 @@
translation in Xinerama to center window on physical screen
Not to be confused with clientConstrainPos()
  */
-void
-clientKeepVisible (Client * c)
+static void
+clientKeepVisible (Client * c, gint n_monitors, GdkRectangle *monitor_rect)
 {
 int cx, cy;
 int diff_x, diff_y;
@@ -485,23 +485,15 @@
 diff_x = abs (c->size->x - ((c->screen_info->width - c->width) / 2));
 diff_y = abs (c->size->y - ((c->screen_info->height - c->height) / 2));
 
-if (((gdk_screen_get_n_monitors (c->screen_info->gscr) > 1) && (diff_x < 
25) && (diff_y < 25)) ||
-((frameX (c) == 0) && (frameY (c) == 0) && (c->type & 
(WINDOW_TYPE_DIALOG)) && !clientIsTransient (c)))
+if (((n_monitors > 1) && (diff_x < 25) && (diff_y < 25)) ||
+((frameX (c) == 0) && (frameY (c) == 0) && (c->type & 
(WINDOW_TYPE_DIALOG
 {
-GdkRectangle rect;
-gint monitor_nbr;
-
 /* We consider that the windows is centered on screen,
  * Thus, will move it so its center on the current
  * physical screen
  */
-getMouseXY (c->screen_info, c->screen_info->xroot, &cx, &cy);
-
-monitor_nbr = find_monitor_at_point (c->screen_info->gscr, cx, cy);
-gdk_screen_get_monitor_geometry (c->screen_info->gscr, monitor_nbr, 
&rect);
-
-c->x = rect.x + (rect.width - c->width) / 2;
-c->y = rect.y + (rect.height - c->height) / 2;
+c->x = monitor_rect->x + (monitor_rect->width - c->width) / 2;
+c->y = monitor_rect->y + (monitor_rect->height - c->height) / 2;
 }
 clientConstrainPos (c, TRUE);
 }
@@ -625,7 +617,9 @@
 GdkRectangle rect;
 int full_x, full_y, full_w, full_h, msx, msy;
 gint monitor_nbr;
-gboolean place = TRUE;
+gint n_monitors;
+gboolean place;
+gboolean position;
 
 g_return_if_fail (c != NULL);
 TRACE ("entering clientInitPosition");
@@ -635,41 +629,44 @@
 screen_info = c->screen_info;
 msx = 0;
 msy = 0;
+position = (c->size->flags & (PPosition | USPosition));
 
-if ((c->size->flags & (PPosition | USPosition)) ||
-(c->type & (WINDOW_TYPE_DONT_PLACE)) ||
-((c->type & (WINDOW_TYPE_DIALOG)) && !clientIsTransient (c)))
+n_monitors = gdk_screen_get_n_monitors (c->screen_info->gscr);
+monitor_nbr = 0;
+if (n_monitors > 1)
 {
-if (CONSTRAINED_WINDOW (c))
-{
-clientKeepVisible (c);
-}
-msx = frameX (c) + (frameWidth (c) / 2);
-msy = frameY (c) + (frameHeight (c) / 2);
-place = FALSE;
+getMouseXY (screen_info, screen_info->xroot, &msx, &msy);
+monitor_nbr = find_monitor_at_point (screen_info->gscr, msx, msy);
 }
-else if (clientIsTransient (c) && (c2 = clientGetTransient (c)))
+gdk_screen_get_monitor_geometry (screen_info->gscr, monitor_nbr, &rect);
+
+if (position || (c->type & (WINDOW_TYPE_DONT_PLACE | WINDOW_TYPE_DIALOG)) 
|| clientIsTransient (c))
 {
+if (!position && clientIsTransient (c) && (c2 = clientGetTransient 
(c)))
+{
+/* Center transient relative to their parent window */
+c->x = c2->x + (c2->width - c->width) / 2;
+c->y = c2->y + (c2->height - c->height) / 2;
 
-/* Center transient relative to their parent window */
-c->x = c2->x + (c2->width - c->width) / 2;
-c->y = c2->y + (c2->height - c->height) / 2;
+if (n_monitors > 1)
+{
+msx = frameX (c) + (frameWidth (c) / 2);
+msy = frameY (c) + 

[Xfce4-commits] r25777 - xfwm4/trunk/src

2007-06-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-03 09:44:36 + (Sun, 03 Jun 2007)
New Revision: 25777

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/display.h
   xfwm4/trunk/src/frame.c
   xfwm4/trunk/src/screen.c
   xfwm4/trunk/src/settings.c
   xfwm4/trunk/src/settings.h
Log:
Try to make things less confusing

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-03 08:21:35 UTC (rev 25776)
+++ xfwm4/trunk/src/client.c2007-06-03 09:44:36 UTC (rev 25777)
@@ -1797,7 +1797,7 @@
 FLAG_SET (c->xfwm_flags, XFWM_FLAG_IS_RESIZABLE);
 }
 
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 c->button_pressed[i] = FALSE;
 }
@@ -2022,7 +2022,7 @@
 xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
&c->sides[SIDE_TOP],
myDisplayGetCursorResize(screen_info->display_info, CORNER_COUNT + 
SIDE_TOP));
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
 &c->buttons[i], None);
@@ -2168,7 +2168,7 @@
 xfwmPixmapFree (&c->appmenu[INACTIVE]);
 xfwmPixmapFree (&c->appmenu[PRESSED]);
 
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 xfwmWindowDelete (&c->buttons[i]);
 }
@@ -4996,7 +4996,7 @@
 g_return_if_fail (c != NULL);
 TRACE ("entering clientButtonPress");
 
-for (b = 0; b < BUTTON_LAST; b++)
+for (b = 0; b < BUTTON_COUNT; b++)
 {
 if (MYWINDOW_XWINDOW (c->buttons[b]) == w)
 {

Modified: xfwm4/trunk/src/display.h
===
--- xfwm4/trunk/src/display.h   2007-06-03 08:21:35 UTC (rev 25776)
+++ xfwm4/trunk/src/display.h   2007-06-03 09:44:36 UTC (rev 25777)
@@ -104,9 +104,9 @@
 MAXIMIZE_BUTTON,
 CLOSE_BUTTON,
 TITLE_SEPARATOR,
-BUTTON_COUNT
+BUTTON_STRING_COUNT
 };
-#define BUTTON_LAST (BUTTON_COUNT - 1)
+#define BUTTON_COUNT (BUTTON_STRING_COUNT - 1)
 
 enum
 {

Modified: xfwm4/trunk/src/frame.c
===
--- xfwm4/trunk/src/frame.c 2007-06-03 08:21:35 UTC (rev 25776)
+++ xfwm4/trunk/src/frame.c 2007-06-03 09:44:36 UTC (rev 25777)
@@ -730,7 +730,7 @@
ShapeBounding, 0, 0, 
screen_info->corners[CORNER_TOP_RIGHT][state].mask, ShapeSet);
 }
 
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 if (xfwmWindowVisible (&c->buttons[i]))
 {
@@ -855,7 +855,7 @@
 0, MYWINDOW_XWINDOW 
(c->corners[CORNER_TOP_RIGHT]), ShapeBounding, ShapeUnion);
 }
 
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 if (xfwmWindowVisible (&c->buttons[i]))
 {
@@ -974,7 +974,7 @@
 && !FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
 {
 /* First, hide the buttons that we don't have... */
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 char b = getLetterFromButton (i, c);
 if ((!b) || !strchr (screen_info->params->button_layout, b))
@@ -1215,7 +1215,7 @@
 xfwmWindowHide (&c->corners[i]);
 }
 }
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 if (MYWINDOW_XWINDOW (c->buttons[i]) && xfwmWindowVisible 
(&c->buttons[i]))
 {

Modified: xfwm4/trunk/src/screen.c
===
--- xfwm4/trunk/src/screen.c2007-06-03 08:21:35 UTC (rev 25776)
+++ xfwm4/trunk/src/screen.c2007-06-03 09:44:36 UTC (rev 25777)
@@ -201,7 +201,7 @@
 screen_info->title_shadow_colors[INACTIVE].gc = NULL;
 screen_info->title_shadow_colors[INACTIVE].allocated = FALSE;
 
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 xfwmPixmapInit (screen_info, &screen_info->buttons[i][ACTIVE]);
 xfwmPixmapInit (screen_info, &screen_info->buttons[i][INACTIVE]);

Modified: xfwm4/trunk/src/settings.c
===
--- xfwm4/trunk/src/settings.c  2007-06-03 08:21:35 UTC (rev 25776)
+++ xfwm4/trunk/src/settings.c  2007-06-03 09:44:36 UTC (rev 25777)
@@ -1220,7 +1220,7 @@
 screen_info->params->title_shadow[ACTIVE] = getTitleShadow (rc, 
"title_shadow_active");
 screen_info->params->title_shadow[INACTIVE] = getTitleShadow (rc, 
"title_shadow_inactive");
 
-strncpy (screen_info->params->button_layout, getValue ("button_layout", 
rc), BUTTON_COUNT + 1);
+strncpy (screen_info->params->button_layout, getValue ("button_layout", 
rc), BUTTON_STRING_COUNT);
 screen_info->params->butto

[Xfce4-commits] r25776 - xfwm4/branches/xfce_4_4/src

2007-06-03 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-03 08:21:35 + (Sun, 03 Jun 2007)
New Revision: 25776

Modified:
   xfwm4/branches/xfce_4_4/src/settings.c
Log:
Woops, those BUTTON_COUNT/BUTTON_LAST are really confusing, I should fix that.

Modified: xfwm4/branches/xfce_4_4/src/settings.c
===
--- xfwm4/branches/xfce_4_4/src/settings.c  2007-06-03 00:07:59 UTC (rev 
25775)
+++ xfwm4/branches/xfce_4_4/src/settings.c  2007-06-03 08:21:35 UTC (rev 
25776)
@@ -1597,7 +1597,7 @@
 xfwmPixmapFree (&screen_info->corners[i][ACTIVE]);
 xfwmPixmapFree (&screen_info->corners[i][INACTIVE]);
 }
-for (i = 0; i < BUTTON_COUNT; i++)
+for (i = 0; i < BUTTON_LAST; i++)
 {
 xfwmPixmapFree (&screen_info->buttons[i][ACTIVE]);
 xfwmPixmapFree (&screen_info->buttons[i][INACTIVE]);

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25775 - xfwm4/branches/xfce_4_2/src

2007-06-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-03 00:07:59 + (Sun, 03 Jun 2007)
New Revision: 25775

Modified:
   xfwm4/branches/xfce_4_2/src/client.c
Log:
Leak fix (backported from a patch by Phil Vandry <[EMAIL PROTECTED]>)

Modified: xfwm4/branches/xfce_4_2/src/client.c
===
--- xfwm4/branches/xfce_4_2/src/client.c2007-06-03 00:00:04 UTC (rev 
25774)
+++ xfwm4/branches/xfce_4_2/src/client.c2007-06-03 00:07:59 UTC (rev 
25775)
@@ -1821,10 +1821,10 @@
 xfwmWindowDelete (&c->sides[SIDE_LEFT]);
 xfwmWindowDelete (&c->sides[SIDE_RIGHT]);
 xfwmWindowDelete (&c->sides[SIDE_BOTTOM]);
-xfwmWindowDelete (&c->sides[CORNER_BOTTOM_LEFT]);
-xfwmWindowDelete (&c->sides[CORNER_BOTTOM_RIGHT]);
-xfwmWindowDelete (&c->sides[CORNER_TOP_LEFT]);
-xfwmWindowDelete (&c->sides[CORNER_TOP_RIGHT]);
+xfwmWindowDelete (&c->corners[CORNER_BOTTOM_LEFT]);
+xfwmWindowDelete (&c->corners[CORNER_BOTTOM_RIGHT]);
+xfwmWindowDelete (&c->corners[CORNER_TOP_LEFT]);
+xfwmWindowDelete (&c->corners[CORNER_TOP_RIGHT]);
 clientClearPixmapCache (c);
 for (i = 0; i < BUTTON_COUNT; i++)
 {

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25774 - xfwm4/branches/xfce_4_4/src

2007-06-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-03 00:00:04 + (Sun, 03 Jun 2007)
New Revision: 25774

Modified:
   xfwm4/branches/xfce_4_4/src/client.c
   xfwm4/branches/xfce_4_4/src/settings.c
Log:
Leak fix (backported from a patch by Phil Vandry <[EMAIL PROTECTED]>)

Modified: xfwm4/branches/xfce_4_4/src/client.c
===
--- xfwm4/branches/xfce_4_4/src/client.c2007-06-02 23:52:19 UTC (rev 
25773)
+++ xfwm4/branches/xfce_4_4/src/client.c2007-06-03 00:00:04 UTC (rev 
25774)
@@ -2149,10 +2149,10 @@
 xfwmWindowDelete (&c->sides[SIDE_LEFT]);
 xfwmWindowDelete (&c->sides[SIDE_RIGHT]);
 xfwmWindowDelete (&c->sides[SIDE_BOTTOM]);
-xfwmWindowDelete (&c->sides[CORNER_BOTTOM_LEFT]);
-xfwmWindowDelete (&c->sides[CORNER_BOTTOM_RIGHT]);
-xfwmWindowDelete (&c->sides[CORNER_TOP_LEFT]);
-xfwmWindowDelete (&c->sides[CORNER_TOP_RIGHT]);
+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]);

Modified: xfwm4/branches/xfce_4_4/src/settings.c
===
--- xfwm4/branches/xfce_4_4/src/settings.c  2007-06-02 23:52:19 UTC (rev 
25773)
+++ xfwm4/branches/xfce_4_4/src/settings.c  2007-06-03 00:00:04 UTC (rev 
25774)
@@ -1597,7 +1597,7 @@
 xfwmPixmapFree (&screen_info->corners[i][ACTIVE]);
 xfwmPixmapFree (&screen_info->corners[i][INACTIVE]);
 }
-for (i = 0; i < BUTTON_LAST; i++)
+for (i = 0; i < BUTTON_COUNT; i++)
 {
 xfwmPixmapFree (&screen_info->buttons[i][ACTIVE]);
 xfwmPixmapFree (&screen_info->buttons[i][INACTIVE]);

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25773 - in xfwm4/trunk: . src

2007-06-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-06-02 23:52:19 + (Sat, 02 Jun 2007)
New Revision: 25773

Modified:
   xfwm4/trunk/AUTHORS
   xfwm4/trunk/NEWS
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/client.h
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/display.h
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/frame.c
   xfwm4/trunk/src/frame.h
   xfwm4/trunk/src/screen.c
   xfwm4/trunk/src/screen.h
   xfwm4/trunk/src/settings.c
   xfwm4/trunk/src/settings.h
Log:
Add resize from top of window, based on a patch by Phil Vandry <[EMAIL 
PROTECTED]>, reworked to allow compatibility with unchanged themes, bug fixes, 
and various improvements

Modified: xfwm4/trunk/AUTHORS
===
--- xfwm4/trunk/AUTHORS 2007-06-01 18:36:12 UTC (rev 25772)
+++ xfwm4/trunk/AUTHORS 2007-06-02 23:52:19 UTC (rev 25773)
@@ -19,6 +19,7 @@
 Nils Rennebarth <[EMAIL PROTECTED]>
 Ori Bernstein <[EMAIL PROTECTED]>
 Paramjit Oberoi <[EMAIL PROTECTED]>
+Phil Vandry <[EMAIL PROTECTED]>
 Thomas Leonard <[EMAIL PROTECTED]>
 
 Credits :

Modified: xfwm4/trunk/NEWS
===
--- xfwm4/trunk/NEWS2007-06-01 18:36:12 UTC (rev 25772)
+++ xfwm4/trunk/NEWS2007-06-02 23:52:19 UTC (rev 25773)
@@ -1,6 +1,7 @@
 4.5.x
 =
 
+- Add resize from top of window
 - Rework the event filter to avoid passing all events top gtk+
 - Treat dialogs and utility windows as transients for group (bug #3102)
 - Add support for shape input with XShape extension 1.1 (Bug #3092)

Modified: xfwm4/trunk/src/client.c
===
--- xfwm4/trunk/src/client.c2007-06-01 18:36:12 UTC (rev 25772)
+++ xfwm4/trunk/src/client.c2007-06-02 23:52:19 UTC (rev 25773)
@@ -2017,6 +2017,11 @@
 myDisplayGetCursorResize(screen_info->display_info, CORNER_TOP_RIGHT));
 xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
 &c->title, 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],
+   myDisplayGetCursorResize(screen_info->display_info, CORNER_COUNT + 
SIDE_TOP));
 for (i = 0; i < BUTTON_LAST; i++)
 {
 xfwmWindowCreate (screen_info,  c->visual, c->depth, c->frame,
@@ -2153,10 +2158,11 @@
 xfwmWindowDelete (&c->sides[SIDE_LEFT]);
 xfwmWindowDelete (&c->sides[SIDE_RIGHT]);
 xfwmWindowDelete (&c->sides[SIDE_BOTTOM]);
-xfwmWindowDelete (&c->sides[CORNER_BOTTOM_LEFT]);
-xfwmWindowDelete (&c->sides[CORNER_BOTTOM_RIGHT]);
-xfwmWindowDelete (&c->sides[CORNER_TOP_LEFT]);
-xfwmWindowDelete (&c->sides[CORNER_TOP_RIGHT]);
+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]);

Modified: xfwm4/trunk/src/client.h
===
--- xfwm4/trunk/src/client.h2007-06-01 18:36:12 UTC (rev 25772)
+++ xfwm4/trunk/src/client.h2007-06-02 23:52:19 UTC (rev 25773)
@@ -223,8 +223,8 @@
 Window transient_for;
 Window *cmap_windows;
 xfwmWindow title;
-xfwmWindow sides[3];
-xfwmWindow corners[4];
+xfwmWindow sides[SIDE_COUNT];
+xfwmWindow corners[CORNER_COUNT];
 xfwmWindow buttons[BUTTON_COUNT];
 Window client_leader;
 Window group_leader;

Modified: xfwm4/trunk/src/display.c
===
--- xfwm4/trunk/src/display.c   2007-06-01 18:36:12 UTC (rev 25772)
+++ xfwm4/trunk/src/display.c   2007-06-02 23:52:19 UTC (rev 25773)
@@ -347,7 +347,7 @@
 display->hostname = NULL;
 }
 
-for (i = 0; i < 7; i++)
+for (i = 0; i < SIDE_COUNT + CORNER_COUNT; i++)
 {
 XFreeCursor (display->dpy, display->resize_cursor[i]);
 display->resize_cursor[i] = None;

Modified: xfwm4/trunk/src/display.h
===
--- xfwm4/trunk/src/display.h   2007-06-01 18:36:12 UTC (rev 25772)
+++ xfwm4/trunk/src/display.h   2007-06-02 23:52:19 UTC (rev 25773)
@@ -69,6 +69,16 @@
 
 enum
 {
+TITLE_1 = 0,
+TITLE_2,
+TITLE_3,
+TITLE_4,
+TITLE_5,
+TITLE_COUNT
+};
+
+enum
+{
 CORNER_TOP_LEFT = 0,
 CORNER_TOP_RIGHT,
 CORNER_BOTTOM_LEFT,
@@ -87,6 +97,30 @@
 
 enum
 {
+MENU_BUTTON = 0,
+STICK_BUTTON,
+SHADE_BUTTON,
+HIDE_BUTTON,
+MAXIMIZE_BUTTON,
+CLOSE_BUTTON,
+TITLE_SEPARATOR,
+BUTTON_COUNT
+};
+#define BUTTON_LAST (BUTTON_COUNT - 1)
+
+enum
+{
+ACTIVE = 0,
+INACTIVE,
+PRESSED,
+T_ACTIVE,
+T_INACTIVE,
+T_

[Xfce4-commits] r25756 - in xfwm4/branches/xfce_4_4/doc: C fr it

2007-05-24 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-24 19:39:56 + (Thu, 24 May 2007)
New Revision: 25756

Modified:
   xfwm4/branches/xfce_4_4/doc/C/xfwm4.html
   xfwm4/branches/xfce_4_4/doc/fr/xfwm4.html
   xfwm4/branches/xfce_4_4/doc/it/xfwm4.html
Log:
Update doc

Modified: xfwm4/branches/xfce_4_4/doc/C/xfwm4.html
===
--- xfwm4/branches/xfce_4_4/doc/C/xfwm4.html2007-05-24 18:40:41 UTC (rev 
25755)
+++ xfwm4/branches/xfce_4_4/doc/C/xfwm4.html2007-05-24 19:39:56 UTC (rev 
25756)
@@ -1,5 +1,5 @@
-Xfce 4 Window ManagerXfce 4 Window 
ManagerFran�ois Le 
Clainche[EMAIL 
PROTECTED]>http://www.w3.org/TR/xhtml1/transitional"; class="r
 eleaseinfo">This manual describes xfwm4 version 4.2.0
-  Copyright � 2004 Fran�ois Le 
ClaincheCopyright � 2004 Jasper 
HuijsmansTable of 
ContentsIntroductionUsing xfwm4Manage 
windowsCustomizing xfwm4Decoration styleKeyboard 
shortcutsFocus 
preferencesAdvanced settingsManaging 
workspacesWorkspaces settingsWorkspaces marginsAbout xfwm4�IntroductionThe Xfce 4 Window 
Manager is part of the http://www.xfce.org"; target="_top">Xfce Desktop 
Environment.
+Xfce 4 Window ManagerXfce 4 Window 
ManagerFran�ois Le 
Clainche[EMAIL 
PROTECTED]>http://www.w3.org/TR/xhtml1/transitional"; class="r
 eleaseinfo">This manual describes xfwm4 version 4.2.0
+  Copyright � 2004 Fran�ois Le 
ClaincheCopyright � 2004 Jasper 
HuijsmansTable of 
ContentsIntroductionUsing xfwm4Manage 
windowsCustomizing xfwm4Decoration styleKeyboard 
shortcutsFocus 
preferencesAdvanced settingsManaging 
workspacesWorkspaces settingsWorkspaces marginsAbout xfwm4�IntroductionThe Xfce 4 Window 
Manager is part of the http://www.xfce.org"; target="_top">Xfce Desktop 
Environment.
 The actual command to run is xfwm4. To run it in the background 
use 
 xfwm4 --daemon. The 
window manager is responsible for
 the placement of windows on the screen, provides the window
@@ -31,7 +31,7 @@
   to application windows. The look is defined by the window manager
   theme.In the default theme xfwm4 shows six buttons and a title 
on regular
   application windows. The six buttons perform these basic
-  functions:Figure�1.�xfwm4 title bar 
buttonsYou can open the window menu with a left-click 
on the menu button on
+  functions:Figure�1.�xfwm4 title bar 
buttonsYou can open 
the window menu with a left-click on the menu button on
   the title bar, or with a right-click on the window title area itself.
If you use xftaskbar4, you can open an 
action menu with a right-click on one of the taskbar entries; 
it includes 
@@ -105,7 +105,7 @@
 labelled "Window Manager" in the Xfce 4 Settings
   manager. The dialog shows four tabs : Style,
 Keyboard, Focus, Advanced. All modifications will have an immediate
-effect on the behaviour of the selected module.Decoration styleFigure�2.�Decoration style preferencesWindow styleThe list on the left side of the 
dialog shows all avaible window
+effect on the behaviour of the selected module.Decoration styleFigure�2.�Decoration style preferencesWindow 
styleThe list on the left side of the dialog shows all 
avaible window
  decorations. The xfwm 4 module offers the choice between 4
  different themes, but there are more than 60 supplementary themes
  avaible in xfwm4-themes extra package.
@@ -122,7 +122,7 @@
 Drop a button in the "Hidden" area to remove a button from the 
 titlebar. All modifications will have an immediate effect on 
 the title bar buttons position.
-   Keyboard shortcutsFigure�3.�Keyboard shortcuts preferencesKeyboard ShortcutsThe list on the left side of 
the dialog shows all avaible
+   Keyboard shortcutsFigure�3.�Keyboard shortcuts preferencesKeyboard 
ShortcutsThe list on the left side of the dialog shows all 
avaible
  shortcuts themes, using the name of directories that contain a
  keythemerc file.
By default, there's only one theme :
@@ -141,12 +141,12 @@
double-click on it in the list, using the left button of your 
mouse, and compose your new shortcut when the "Compose 
shortcut" 
popup window appears.
-   Figure�4.�The compose shortcut popupIf you want to create a new theme, create a 
directory like 
+   Figure�4.�The compose shortcut popupIf you want to 
create a new theme, create a directory like 
this one, for instance : $HOME/.themes/Custom/xfwm4/keythemerc, 
then select it in the list of available themes.
If you do not know the names of your keyboard modifier keys, 
you can launch the "xev" application from a terminal and test 
them.
-   Focus 
preferencesFigure�5.�Focus 
preferencesFocus modelA 
focused window receives the keyboard and mouse input. You have
+   Focus 
preferencesFigure�5.�Focus 

[Xfce4-commits] r25697 - gtk-xfce-engine-2/trunk/themes/xfce/gtk-2.0

2007-05-09 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-09 19:55:38 + (Wed, 09 May 2007)
New Revision: 25697

Modified:
   gtk-xfce-engine-2/trunk/themes/xfce/gtk-2.0/gtkrc
Log:
New default gtk theme that goes with new xfwm4 theme

Modified: gtk-xfce-engine-2/trunk/themes/xfce/gtk-2.0/gtkrc
===
--- gtk-xfce-engine-2/trunk/themes/xfce/gtk-2.0/gtkrc   2007-05-09 19:54:33 UTC 
(rev 25696)
+++ gtk-xfce-engine-2/trunk/themes/xfce/gtk-2.0/gtkrc   2007-05-09 19:55:38 UTC 
(rev 25697)
@@ -279,7 +279,7 @@
 
 style "titlebar" = "default"
 {
-bg[SELECTED]  = "#729fcf"
+bg[SELECTED]  = "#2b2b2a"
 fg[SELECTED]  = "#ff"
 bg[INSENSITIVE]   = "#ec"
 fg[INSENSITIVE]   = "#888a85"

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25695 - in xfwm4/trunk: mcs-plugin src themes/default.keys

2007-05-09 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-09 19:51:34 + (Wed, 09 May 2007)
New Revision: 25695

Modified:
   xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c
   xfwm4/trunk/src/events.c
   xfwm4/trunk/src/screen.c
   xfwm4/trunk/src/settings.c
   xfwm4/trunk/src/settings.h
   xfwm4/trunk/themes/default.keys/keythemerc
Log:
Add shortcut for above state (Bug #629)

Modified: xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c
===
--- xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c   2007-05-09 18:32:40 UTC 
(rev 25694)
+++ xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c   2007-05-09 19:51:34 UTC 
(rev 25695)
@@ -1,20 +1,20 @@
 /*  $Id$
- 
+
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2, or (at your option)
 any later version.
- 
+
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
- 
+
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- 
- 
+
+
 shortcut editor - Copyright (C) 2004 Jean-Francois Wauthy
  */
 
@@ -165,7 +165,7 @@
 {
 theme_file = g_build_filename (DATADIR, "themes", "Default", 
KEY_SUFFIX, KEYTHEMERC, NULL);
 }
-
+
 while (TRUE)
 {
 gint response = GTK_RESPONSE_CANCEL;
@@ -314,7 +314,7 @@
 void
 loadtheme_in_treeview (ThemeInfo * ti, gpointer data)
 {
-const gchar *shortcut_options_list[] = { 
+const gchar *shortcut_options_list[] = {
 "close_window_key",
 "maximize_window_key",
 "maximize_vert_key",
@@ -334,6 +334,7 @@
 "move_resize_cancel_key",
 "raise_window_key",
 "lower_window_key",
+"above_key",
 "fullscreen_key",
 "up_workspace_key",
 "down_workspace_key",
@@ -355,7 +356,7 @@
 NULL
 };
 
-const gchar *shortcut_name_list[] = { 
+const gchar *shortcut_name_list[] = {
 N_("Close window"),
 N_("Maximize window"),
 N_("Maximize window vertically"),
@@ -375,6 +376,7 @@
 N_("Cancel move/resize window"),
 N_("Raise window"),
 N_("Lower window"),
+N_("Toggle above"),
 N_("Toggle fullscreen"),
 N_("Upper workspace"),
 N_("Bottom workspace"),
@@ -933,7 +935,7 @@
 /* Release keyboard if not yet done */
 gdk_keyboard_ungrab (GDK_CURRENT_TIME);
 
-/* 
+/*
Tell it to the mcs manager, set the channel to raw mode
so that the client gets notified even if the key theme
name has not changed

Modified: xfwm4/trunk/src/events.c
===
--- xfwm4/trunk/src/events.c2007-05-09 18:32:40 UTC (rev 25694)
+++ xfwm4/trunk/src/events.c2007-05-09 19:51:34 UTC (rev 25695)
@@ -71,7 +71,7 @@
  PointerMotionMask | \
  ButtonPressMask | \
  ButtonReleaseMask)
-  
+
 #define MODIFIER_MASK   (ShiftMask | \
  ControlMask | \
  AltMask | \
@@ -237,7 +237,7 @@
 passdata.ycurrent = passdata.y;
 passdata.clicks = 1;
 passdata.allow_double_click = allow_double_click;
-passdata.timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, 
+passdata.timeout = g_timeout_add_full (G_PRIORITY_DEFAULT,
display_info->dbl_click_time,
(GSourceFunc) typeOfClick_break,
(gpointer) &passdata, NULL);
@@ -410,6 +410,9 @@
 case KEY_LOWER_WINDOW:
 clientLower (c, None);
 break;
+case KEY_TOGGLE_ABOVE:
+clientToggleAbove (c);
+break;
 case KEY_TOGGLE_FULLSCREEN:
 clientToggleFullscreen (c);
 break;
@@ -450,13 +453,13 @@
 }
 break;
 case KEY_POPUP_MENU:
-/* 
-   We need to release the events here prior to grabbing 
+/*
+   We need to release the events here prior to grabbing
the keyboard in gtk menu otherwise we end with a dead 
lock...
   */
 XAllowEvents (display_info->dpy, AsyncKeyboard, CurrentTime);
-show_window_menu (c, frameX (c) + frameLeft (c), 
- frame

[Xfce4-commits] r25675 - in xfce-mcs-plugins: branches/xfce_4_4/plugins/keyboard_plugin trunk/plugins/keyboard_plugin

2007-05-04 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-04 08:11:59 + (Fri, 04 May 2007)
New Revision: 25675

Modified:
   xfce-mcs-plugins/branches/xfce_4_4/plugins/keyboard_plugin/keys_management.c
   xfce-mcs-plugins/trunk/plugins/keyboard_plugin/keys_management.c
Log:
Fix wrong copy/paste preventing load of keyboard plugin (after bug fix #3194)

Modified: 
xfce-mcs-plugins/branches/xfce_4_4/plugins/keyboard_plugin/keys_management.c
===
--- 
xfce-mcs-plugins/branches/xfce_4_4/plugins/keyboard_plugin/keys_management.c
2007-05-02 21:21:52 UTC (rev 25674)
+++ 
xfce-mcs-plugins/branches/xfce_4_4/plugins/keyboard_plugin/keys_management.c
2007-05-04 08:11:59 UTC (rev 25675)
@@ -224,7 +224,7 @@
 }
 
 void
-initModifiers (void)
+init_modifiers (void)
 {
 GdkDisplay *gdisplay;
 GdkScreen *gscr;

Modified: xfce-mcs-plugins/trunk/plugins/keyboard_plugin/keys_management.c
===
--- xfce-mcs-plugins/trunk/plugins/keyboard_plugin/keys_management.c
2007-05-02 21:21:52 UTC (rev 25674)
+++ xfce-mcs-plugins/trunk/plugins/keyboard_plugin/keys_management.c
2007-05-04 08:11:59 UTC (rev 25675)
@@ -247,7 +247,7 @@
 }
 
 void
-initModifiers (void)
+init_modifiers (void)
 {
 GdkDisplay *gdisplay;
 GdkScreen *gscr;

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25674 - xfce-mcs-plugins/trunk

2007-05-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 21:21:52 + (Wed, 02 May 2007)
New Revision: 25674

Modified:
   xfce-mcs-plugins/trunk/configure.in.in
Log:
Update version number

Modified: xfce-mcs-plugins/trunk/configure.in.in
===
--- xfce-mcs-plugins/trunk/configure.in.in  2007-05-02 21:08:49 UTC (rev 
25673)
+++ xfce-mcs-plugins/trunk/configure.in.in  2007-05-02 21:21:52 UTC (rev 
25674)
@@ -12,11 +12,11 @@
 dnl *** Version information ***
 dnl ***
 m4_define([xfce_mcs_plugins_version_major], [4])
-m4_define([xfce_mcs_plugins_version_minor], [4])
+m4_define([xfce_mcs_plugins_version_minor], [5])
 m4_define([xfce_mcs_plugins_version_micro], [0])
 m4_define([xfce_mcs_plugins_version_nano], [])
 m4_define([xfce_mcs_plugins_version_build], [EMAIL PROTECTED]@])
-m4_define([xfce_mcs_plugins_version_tag], [])
+m4_define([xfce_mcs_plugins_version_tag], [svn])
 m4_define([xfce_mcs_plugins_version], 
[xfce_mcs_plugins_version_major().xfce_mcs_plugins_version_minor().xfce_mcs_plugins_version_micro()ifelse(xfce_mcs_plugins_version_nano(),
 [], [], 
[.xfce_mcs_plugins_version_nano()])ifelse(xfce_mcs_plugins_version_tag(), 
[svn], [xfce_mcs_plugins_version_tag()-xfce_mcs_plugins_version_build()], 
[xfce_mcs_plugins_version_tag()])])
 
 

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25673 - xfwm4/branches/xfce_4_4/src

2007-05-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 21:08:49 + (Wed, 02 May 2007)
New Revision: 25673

Modified:
   xfwm4/branches/xfce_4_4/src/keyboard.c
Log:
Code cleanup

Modified: xfwm4/branches/xfce_4_4/src/keyboard.c
===
--- xfwm4/branches/xfce_4_4/src/keyboard.c  2007-05-02 21:08:41 UTC (rev 
25672)
+++ xfwm4/branches/xfce_4_4/src/keyboard.c  2007-05-02 21:08:49 UTC (rev 
25673)
@@ -282,54 +282,54 @@
 
 if (modmap && keymap)
 {
-   for (i = 3 * modmap->max_keypermod; i < 8 * 
modmap->max_keypermod; i++)
-   {
-   keycode = modmap->modifiermap[i];
-   if ((keycode >= min_keycode) && (keycode <= 
max_keycode))
-   {
-   int j;
-   KeySym *syms = keymap + (keycode - min_keycode) 
* keysyms_per_keycode;
+for (i = 3 * modmap->max_keypermod; i < 8 * modmap->max_keypermod; i++)
+{
+keycode = modmap->modifiermap[i];
+if ((keycode >= min_keycode) && (keycode <= max_keycode))
+{
+int j;
+KeySym *syms = keymap + (keycode - min_keycode) * 
keysyms_per_keycode;
 
-   for (j = 0; j < keysyms_per_keycode; j++)
-   {
-   if (!NumLockMask && (syms[j] == 
XK_Num_Lock))
-   {
-   NumLockMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   else if (!ScrollLockMask && (syms[j] == 
XK_Scroll_Lock))
-   {
-   ScrollLockMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   else if (!AltMask && ((syms[j] == 
XK_Alt_L) || (syms[j] == XK_Alt_R)))
-   {
-   AltMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   else if (!SuperMask && ((syms[j] == 
XK_Super_L) || (syms[j] == XK_Super_R)))
-   {
-   SuperMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   else if (!HyperMask && ((syms[j] == 
XK_Hyper_L) || (syms[j] == XK_Hyper_R)))
-   {
-   HyperMask = (1 << (i / 
modmap->max_keypermod));
-   }   
-   else if (!MetaMask && ((syms[j] == 
XK_Meta_L) || (syms[j] == XK_Meta_R)))
-   {
-   MetaMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   }
-   }
-   }
+for (j = 0; j < keysyms_per_keycode; j++)
+{
+if (!NumLockMask && (syms[j] == XK_Num_Lock))
+{
+NumLockMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!ScrollLockMask && (syms[j] == XK_Scroll_Lock))
+{
+ScrollLockMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!AltMask && ((syms[j] == XK_Alt_L) || (syms[j] == 
XK_Alt_R)))
+{
+AltMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!SuperMask && ((syms[j] == XK_Super_L) || 
(syms[j] == XK_Super_R)))
+{
+SuperMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!HyperMask && ((syms[j] == XK_Hyper_L) || 
(syms[j] == XK_Hyper_R)))
+{
+HyperMask = (1 << (i / modmap->max_keypermod));
+}   
+else if (!MetaMask && ((syms[j] == XK_Meta_L) || (syms[j] 
== XK_Meta_R)))
+{
+MetaMask = (1 << (i / modmap->max_keypermod));
+}
+}
+}
+}
 }
 
 /* Cleanup memory */
 if (modmap)
 {
-   XFreeModifiermap (modmap);
+XFreeModifiermap (modmap);
 }
 
 if (keymap)
 {
-   XFree (keymap);
+XFree (keymap);
 }
 
 /* In case we didn't find AltMask, use Mod1Mask */

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-

[Xfce4-commits] r25672 - xfwm4/branches/xfce_4_2/src

2007-05-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 21:08:41 + (Wed, 02 May 2007)
New Revision: 25672

Modified:
   xfwm4/branches/xfce_4_2/src/keyboard.c
   xfwm4/branches/xfce_4_2/src/keyboard.h
Log:
Code cleanup

Modified: xfwm4/branches/xfce_4_2/src/keyboard.c
===
--- xfwm4/branches/xfce_4_2/src/keyboard.c  2007-05-02 21:08:32 UTC (rev 
25671)
+++ xfwm4/branches/xfce_4_2/src/keyboard.c  2007-05-02 21:08:41 UTC (rev 
25672)
@@ -31,9 +31,6 @@
 #include  
 #include "keyboard.h"
 
-unsigned int KeyMask;
-unsigned int ButtonMask;
-unsigned int ButtonKeyMask;
 unsigned int AltMask;
 unsigned int MetaMask;
 unsigned int NumLockMask;
@@ -271,54 +268,54 @@
 
 if (modmap && keymap)
 {
-   for (i = 3 * modmap->max_keypermod; i < 8 * 
modmap->max_keypermod; i++)
-   {
-   keycode = modmap->modifiermap[i];
-   if ((keycode >= min_keycode) && (keycode <= 
max_keycode))
-   {
-   int j;
-   KeySym *syms = keymap + (keycode - min_keycode) 
* keysyms_per_keycode;
+for (i = 3 * modmap->max_keypermod; i < 8 * modmap->max_keypermod; i++)
+{
+keycode = modmap->modifiermap[i];
+if ((keycode >= min_keycode) && (keycode <= max_keycode))
+{
+int j;
+KeySym *syms = keymap + (keycode - min_keycode) * 
keysyms_per_keycode;
 
-   for (j = 0; j < keysyms_per_keycode; j++)
-   {
-   if (!NumLockMask && (syms[j] == 
XK_Num_Lock))
-   {
-   NumLockMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   else if (!ScrollLockMask && (syms[j] == 
XK_Scroll_Lock))
-   {
-   ScrollLockMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   else if (!AltMask && ((syms[j] == 
XK_Alt_L) || (syms[j] == XK_Alt_R)))
-   {
-   AltMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   else if (!SuperMask && ((syms[j] == 
XK_Super_L) || (syms[j] == XK_Super_R)))
-   {
-   SuperMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   else if (!HyperMask && ((syms[j] == 
XK_Hyper_L) || (syms[j] == XK_Hyper_R)))
-   {
-   HyperMask = (1 << (i / 
modmap->max_keypermod));
-   }   
-   else if (!MetaMask && ((syms[j] == 
XK_Meta_L) || (syms[j] == XK_Meta_R)))
-   {
-   MetaMask = (1 << (i / 
modmap->max_keypermod));
-   }
-   }
-   }
-   }
+for (j = 0; j < keysyms_per_keycode; j++)
+{
+if (!NumLockMask && (syms[j] == XK_Num_Lock))
+{
+NumLockMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!ScrollLockMask && (syms[j] == XK_Scroll_Lock))
+{
+ScrollLockMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!AltMask && ((syms[j] == XK_Alt_L) || (syms[j] == 
XK_Alt_R)))
+{
+AltMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!SuperMask && ((syms[j] == XK_Super_L) || 
(syms[j] == XK_Super_R)))
+{
+SuperMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!HyperMask && ((syms[j] == XK_Hyper_L) || 
(syms[j] == XK_Hyper_R)))
+{
+HyperMask = (1 << (i / modmap->max_keypermod));
+}   
+else if (!MetaMask && ((syms[j] == XK_Meta_L) || (syms[j] 
== XK_Meta_R)))
+{
+MetaMask = (1 << (i / modmap->max_keypermod));
+}
+}
+}
+}
 }
 
 /* Cleanup memory */
 if (modmap)
 {
-   XFreeModifiermap (modmap);
+XFreeModifiermap (modmap);
 }
 
 if (keymap)
 {
-   XFr

[Xfce4-commits] r25671 - xfwm4/trunk/src

2007-05-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 21:08:32 + (Wed, 02 May 2007)
New Revision: 25671

Modified:
   xfwm4/trunk/src/keyboard.c
Log:
Code cleanup

Modified: xfwm4/trunk/src/keyboard.c
===
--- xfwm4/trunk/src/keyboard.c  2007-05-02 20:59:53 UTC (rev 25670)
+++ xfwm4/trunk/src/keyboard.c  2007-05-02 21:08:32 UTC (rev 25671)
@@ -167,43 +167,43 @@
 {
 status |= 
 XGrabKey (dpy, key->keycode, AnyModifier, w, FALSE,
-   GrabModeAsync, GrabModeSync);
+GrabModeAsync, GrabModeSync);
 }
 else
 {
 /* Here we grab all combinations of well known modifiers */
 status |= 
 XGrabKey (dpy, key->keycode,
-   key->modifier, w, FALSE,
-   GrabModeAsync, GrabModeSync);
+key->modifier, w, FALSE,
+GrabModeAsync, GrabModeSync);
 status |= 
 XGrabKey (dpy, key->keycode,
-   key->modifier | ScrollLockMask, w,
-   FALSE, GrabModeAsync, GrabModeSync);
+key->modifier | ScrollLockMask, w,
+FALSE, GrabModeAsync, GrabModeSync);
 status |= 
 XGrabKey (dpy, key->keycode,
-   key->modifier | NumLockMask, w,
-   FALSE, GrabModeAsync, GrabModeSync);
+key->modifier | NumLockMask, w,
+FALSE, GrabModeAsync, GrabModeSync);
 status |= 
 XGrabKey (dpy, key->keycode,
-   key->modifier | LockMask, w,
-   FALSE, GrabModeAsync, GrabModeSync);
+key->modifier | LockMask, w,
+FALSE, GrabModeAsync, GrabModeSync);
 status |= 
 XGrabKey (dpy, key->keycode,
-   key->modifier | ScrollLockMask | 
NumLockMask, w, FALSE,
-   GrabModeAsync, GrabModeSync);
+key->modifier | ScrollLockMask | 
NumLockMask, w, FALSE,
+GrabModeAsync, GrabModeSync);
 status |= 
 XGrabKey (dpy, key->keycode,
-   key->modifier | ScrollLockMask | 
LockMask, w, FALSE,
-   GrabModeAsync, GrabModeSync);
+key->modifier | ScrollLockMask | 
LockMask, w, FALSE,
+GrabModeAsync, GrabModeSync);
 status |= 
 XGrabKey (dpy, key->keycode,
-   key->modifier | LockMask | NumLockMask, 
w, FALSE,
-   GrabModeAsync, GrabModeSync);
+key->modifier | LockMask | 
NumLockMask, w, FALSE,
+GrabModeAsync, GrabModeSync);
 status |= 
 XGrabKey (dpy, key->keycode,
-   key->modifier | ScrollLockMask | 
LockMask | NumLockMask,
-   w, FALSE, GrabModeAsync, GrabModeSync);
+key->modifier | ScrollLockMask | 
LockMask | NumLockMask,
+w, FALSE, GrabModeAsync, GrabModeSync);
 }
 }
 
@@ -230,52 +230,52 @@
 {
 status |= 
 XGrabButton (dpy, button, AnyModifier, w, FALSE,
-   ButtonPressMask|ButtonReleaseMask, 
GrabModeSync, GrabModeAsync,
-   None, None);
+ButtonPressMask|ButtonReleaseMask, 
GrabModeSync, GrabModeAsync,
+None, None);
 }
 else
 {
 /* Here we grab all combinations of well known modifiers */
 status |= 
 XGrabButton (dpy, button, modifier,
-   w, FALSE,
-   ButtonPressMask|ButtonReleaseMask, 
GrabModeSync, GrabModeAsync,
-   None, None);
+w, FALSE,
+ButtonPressMask|ButtonReleaseMask, 
GrabModeSync, GrabModeAsync,
+None, None);
 status |= 
 XGrabButton (dpy, button, modifier | ScrollLockMask,
-   w, FALSE,
-   ButtonPressMask|ButtonReleaseMask, 
GrabModeS

[Xfce4-commits] r25670 - in xfce-mcs-plugins/branches/xfce_4_4: . plugins/keyboard_plugin

2007-05-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 20:59:53 + (Wed, 02 May 2007)
New Revision: 25670

Modified:
   xfce-mcs-plugins/branches/xfce_4_4/NEWS
   xfce-mcs-plugins/branches/xfce_4_4/plugins/keyboard_plugin/keys_management.c
Log:
Fix modifier mask not working with all keymaps (Bug #3194)

Modified: xfce-mcs-plugins/branches/xfce_4_4/NEWS
===
--- xfce-mcs-plugins/branches/xfce_4_4/NEWS 2007-05-02 20:57:46 UTC (rev 
25669)
+++ xfce-mcs-plugins/branches/xfce_4_4/NEWS 2007-05-02 20:59:53 UTC (rev 
25670)
@@ -1,5 +1,6 @@
 4.4.2
 =
+- Fix modifier mask not working with all keymaps (Bug #3194)
 - Add support for xinput devices when setting left/right handed mouse.
 
 4.4.1

Modified: 
xfce-mcs-plugins/branches/xfce_4_4/plugins/keyboard_plugin/keys_management.c
===
--- 
xfce-mcs-plugins/branches/xfce_4_4/plugins/keyboard_plugin/keys_management.c
2007-05-02 20:57:46 UTC (rev 25669)
+++ 
xfce-mcs-plugins/branches/xfce_4_4/plugins/keyboard_plugin/keys_management.c
2007-05-02 20:59:53 UTC (rev 25670)
@@ -224,7 +224,7 @@
 }
 
 void
-init_modifiers (void)
+initModifiers (void)
 {
 GdkDisplay *gdisplay;
 GdkScreen *gscr;
@@ -232,10 +232,11 @@
 
 XModifierKeymap *modmap;
 KeySym *keymap;
-int i;
-int keysyms_per_keycode;
+unsigned int keycode;
 int min_keycode;
 int max_keycode;
+int keysyms_per_keycode;
+int i;
 
 gdisplay = gdk_display_get_default ();
 gscr = gdk_display_get_default_screen (gdisplay);
@@ -255,47 +256,61 @@
 modmap = XGetModifierMapping (GDK_DISPLAY_XDISPLAY (gdisplay));
 keymap = XGetKeyboardMapping (GDK_DISPLAY_XDISPLAY (gdisplay), 
min_keycode, max_keycode - min_keycode + 1, &keysyms_per_keycode);
 
-for (i = 3 * modmap->max_keypermod; i < 8 * modmap->max_keypermod; i++)
-{
-unsigned int keycode = modmap->modifiermap[i];
-
-if ((keycode >= min_keycode) && (keycode <= max_keycode))
+if (modmap && keymap)
+{
+for (i = 3 * modmap->max_keypermod; i < 8 * modmap->max_keypermod; i++)
 {
-int j;
-KeySym *syms = keymap + (keycode - min_keycode) * 
keysyms_per_keycode;
+keycode = modmap->modifiermap[i];
+if ((keycode >= min_keycode) && (keycode <= max_keycode))
+{
+int j;
+KeySym *syms = keymap + (keycode - min_keycode) * 
keysyms_per_keycode;
 
-for (j = 0; j < keysyms_per_keycode; j++)
-{
-if (syms[j] == XK_Num_Lock)
+for (j = 0; j < keysyms_per_keycode; j++)
 {
-NumLockMask |= (1 << (i / modmap->max_keypermod));
+if (!NumLockMask && (syms[j] == XK_Num_Lock))
+{
+NumLockMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!ScrollLockMask && (syms[j] == XK_Scroll_Lock))
+{
+ScrollLockMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!AltMask && ((syms[j] == XK_Alt_L) || (syms[j] == 
XK_Alt_R)))
+{
+AltMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!SuperMask && ((syms[j] == XK_Super_L) || 
(syms[j] == XK_Super_R)))
+{
+SuperMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!HyperMask && ((syms[j] == XK_Hyper_L) || 
(syms[j] == XK_Hyper_R)))
+{
+HyperMask = (1 << (i / modmap->max_keypermod));
+}   
+else if (!MetaMask && ((syms[j] == XK_Meta_L) || (syms[j] 
== XK_Meta_R)))
+{
+MetaMask = (1 << (i / modmap->max_keypermod));
+}
 }
-else if (syms[j] == XK_Scroll_Lock)
-{
-ScrollLockMask |= (1 << (i / modmap->max_keypermod));
-}
-else if ((syms[j] == XK_Super_L) || (syms[j] == XK_Super_R))
-{
-SuperMask |= (1 << (i / modmap->max_keypermod));
-}
-else if ((syms[j] == XK_Hyper_L) || (syms[j] == XK_Hyper_R))
-{
-HyperMask |= (1 << (i / modmap->max_keypermod));
-}
-else if ((syms[j] == XK_Meta_L) || (syms[j] == XK_Meta_R))
-{
-MetaMask |= (1 << (i / modmap->max_keypermod));
-}
-else if ((syms[j] == XK_Alt_L) || (syms[j] == XK_Alt_R))
-{
-AltMask |= (1 << (i / modmap->max_keypermod));
-}
 }
  

[Xfce4-commits] r25669 - xfce-mcs-plugins/trunk/plugins/keyboard_plugin

2007-05-02 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 20:57:46 + (Wed, 02 May 2007)
New Revision: 25669

Modified:
   xfce-mcs-plugins/trunk/plugins/keyboard_plugin/keys_management.c
Log:
Fix modifier mask not working with all keymaps (Bug #3194)

Modified: xfce-mcs-plugins/trunk/plugins/keyboard_plugin/keys_management.c
===
--- xfce-mcs-plugins/trunk/plugins/keyboard_plugin/keys_management.c
2007-05-02 05:47:36 UTC (rev 25668)
+++ xfce-mcs-plugins/trunk/plugins/keyboard_plugin/keys_management.c
2007-05-02 20:57:46 UTC (rev 25669)
@@ -247,7 +247,7 @@
 }
 
 void
-init_modifiers (void)
+initModifiers (void)
 {
 GdkDisplay *gdisplay;
 GdkScreen *gscr;
@@ -255,10 +255,11 @@
 
 XModifierKeymap *modmap;
 KeySym *keymap;
-int i;
-int keysyms_per_keycode;
+unsigned int keycode;
 int min_keycode;
 int max_keycode;
+int keysyms_per_keycode;
+int i;
 
 gdisplay = gdk_display_get_default ();
 gscr = gdk_display_get_default_screen (gdisplay);
@@ -278,47 +279,61 @@
 modmap = XGetModifierMapping (GDK_DISPLAY_XDISPLAY (gdisplay));
 keymap = XGetKeyboardMapping (GDK_DISPLAY_XDISPLAY (gdisplay), 
min_keycode, max_keycode - min_keycode + 1, &keysyms_per_keycode);
 
-for (i = 3 * modmap->max_keypermod; i < 8 * modmap->max_keypermod; i++)
-{
-unsigned int keycode = modmap->modifiermap[i];
-
-if ((keycode >= min_keycode) && (keycode <= max_keycode))
+if (modmap && keymap)
+{
+for (i = 3 * modmap->max_keypermod; i < 8 * modmap->max_keypermod; i++)
 {
-int j;
-KeySym *syms = keymap + (keycode - min_keycode) * 
keysyms_per_keycode;
+keycode = modmap->modifiermap[i];
+if ((keycode >= min_keycode) && (keycode <= max_keycode))
+{
+int j;
+KeySym *syms = keymap + (keycode - min_keycode) * 
keysyms_per_keycode;
 
-for (j = 0; j < keysyms_per_keycode; j++)
-{
-if (syms[j] == XK_Num_Lock)
+for (j = 0; j < keysyms_per_keycode; j++)
 {
-NumLockMask |= (1 << (i / modmap->max_keypermod));
+if (!NumLockMask && (syms[j] == XK_Num_Lock))
+{
+NumLockMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!ScrollLockMask && (syms[j] == XK_Scroll_Lock))
+{
+ScrollLockMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!AltMask && ((syms[j] == XK_Alt_L) || (syms[j] == 
XK_Alt_R)))
+{
+AltMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!SuperMask && ((syms[j] == XK_Super_L) || 
(syms[j] == XK_Super_R)))
+{
+SuperMask = (1 << (i / modmap->max_keypermod));
+}
+else if (!HyperMask && ((syms[j] == XK_Hyper_L) || 
(syms[j] == XK_Hyper_R)))
+{
+HyperMask = (1 << (i / modmap->max_keypermod));
+}   
+else if (!MetaMask && ((syms[j] == XK_Meta_L) || (syms[j] 
== XK_Meta_R)))
+{
+MetaMask = (1 << (i / modmap->max_keypermod));
+}
 }
-else if (syms[j] == XK_Scroll_Lock)
-{
-ScrollLockMask |= (1 << (i / modmap->max_keypermod));
-}
-else if ((syms[j] == XK_Super_L) || (syms[j] == XK_Super_R))
-{
-SuperMask |= (1 << (i / modmap->max_keypermod));
-}
-else if ((syms[j] == XK_Hyper_L) || (syms[j] == XK_Hyper_R))
-{
-HyperMask |= (1 << (i / modmap->max_keypermod));
-}
-else if ((syms[j] == XK_Meta_L) || (syms[j] == XK_Meta_R))
-{
-MetaMask |= (1 << (i / modmap->max_keypermod));
-}
-else if ((syms[j] == XK_Alt_L) || (syms[j] == XK_Alt_R))
-{
-AltMask |= (1 << (i / modmap->max_keypermod));
-}
 }
 }
 }
-KeyMask = ControlMask | ShiftMask | AltMask | MetaMask | SuperMask | 
HyperMask;
 
-ButtonMask = Button1Mask | Button2Mask | Button3Mask | Button4Mask | 
Button5Mask;
+/* Cleanup memory */
+if (modmap)
+{
+XFreeModifiermap (modmap);
+}
 
-ButtonKeyMask = KeyMask | ButtonMask;
+if (keymap)
+{
+XFree (keymap);
+}
+
+/* In case we didn't find AltMask, use Mod1Mask */
+if (AltMask == 0)
+{
+AltMask = Mod1Mask;
+}
 }

___
Xfce4-

[Xfce4-commits] r25668 - xfwm4/branches/xfce_4_2/src

2007-05-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 05:47:36 + (Wed, 02 May 2007)
New Revision: 25668

Modified:
   xfwm4/branches/xfce_4_2/src/keyboard.c
Log:
Fix modifier mask not working with all keynaps (Bug #3194)

Modified: xfwm4/branches/xfce_4_2/src/keyboard.c
===
--- xfwm4/branches/xfce_4_2/src/keyboard.c  2007-05-02 05:47:02 UTC (rev 
25667)
+++ xfwm4/branches/xfce_4_2/src/keyboard.c  2007-05-02 05:47:36 UTC (rev 
25668)
@@ -247,8 +247,13 @@
 void
 initModifiers (Display * dpy)
 {
-XModifierKeymap *xmk = XGetModifierMapping (dpy);
-int m, k;
+XModifierKeymap *modmap;
+KeySym *keymap;
+unsigned int keycode;
+int min_keycode;
+int max_keycode;
+int keysyms_per_keycode;
+int i;
 
 AltMask = 0;
 MetaMask = 0;
@@ -256,112 +261,69 @@
 ScrollLockMask = 0;
 SuperMask = 0;
 HyperMask = 0;
+keysyms_per_keycode = 0;
+min_keycode = 0;
+max_keycode = 0;
 
-if (xmk)
-{
-KeyCode *c = xmk->modifiermap;
-KeyCode numLockKeyCode;
-KeyCode scrollLockKeyCode;
-KeyCode altKeyCode;
-KeyCode metaKeyCode;
-KeyCode superKeyCode;
-KeyCode hyperKeyCode;
+XDisplayKeycodes (dpy, &min_keycode, &max_keycode);
+modmap = XGetModifierMapping (dpy);
+keymap = XGetKeyboardMapping (dpy, min_keycode, max_keycode - min_keycode 
+ 1, &keysyms_per_keycode);
 
-numLockKeyCode = XKeysymToKeycode (dpy, XK_Num_Lock);
-scrollLockKeyCode = XKeysymToKeycode (dpy, XK_Scroll_Lock);
-altKeyCode = XKeysymToKeycode (dpy, XK_Alt_L);
-metaKeyCode = XKeysymToKeycode (dpy, XK_Meta_L);
-superKeyCode = XKeysymToKeycode (dpy, XK_Super_L);
-hyperKeyCode = XKeysymToKeycode (dpy, XK_Hyper_L);
+if (modmap && keymap)
+{
+   for (i = 3 * modmap->max_keypermod; i < 8 * 
modmap->max_keypermod; i++)
+   {
+   keycode = modmap->modifiermap[i];
+   if ((keycode >= min_keycode) && (keycode <= 
max_keycode))
+   {
+   int j;
+   KeySym *syms = keymap + (keycode - min_keycode) 
* keysyms_per_keycode;
 
-if (!altKeyCode)
-{
-altKeyCode = XKeysymToKeycode (dpy, XK_Alt_R);
-}
-if (!metaKeyCode)
-{
-metaKeyCode = XKeysymToKeycode (dpy, XK_Meta_R);
-}
-if (!superKeyCode)
-{
-superKeyCode = XKeysymToKeycode (dpy, XK_Super_R);
-}
-if (!hyperKeyCode)
-{
-hyperKeyCode = XKeysymToKeycode (dpy, XK_Hyper_R);
-}
-
-for (m = 0; m < 8; m++)
-{
-for (k = 0; k < xmk->max_keypermod; k++, c++)
-{
-if (*c == NoSymbol)
-{
-continue;
-}
-if (*c == numLockKeyCode)
-{
-NumLockMask = (1 << m);
-}
-if (*c == scrollLockKeyCode)
-{
-ScrollLockMask = (1 << m);
-}
-if (*c == altKeyCode)
-{
-AltMask = (1 << m);
-}
-if (*c == metaKeyCode)
-{
-MetaMask = (1 << m);
-}
-if (*c == superKeyCode)
-{
-SuperMask = (1 << m);
-}
-if (*c == hyperKeyCode)
-{
-HyperMask = (1 << m);
-}
-}
-}
-XFreeModifiermap (xmk);
+   for (j = 0; j < keysyms_per_keycode; j++)
+   {
+   if (!NumLockMask && (syms[j] == 
XK_Num_Lock))
+   {
+   NumLockMask = (1 << (i / 
modmap->max_keypermod));
+   }
+   else if (!ScrollLockMask && (syms[j] == 
XK_Scroll_Lock))
+   {
+   ScrollLockMask = (1 << (i / 
modmap->max_keypermod));
+   }
+   else if (!AltMask && ((syms[j] == 
XK_Alt_L) || (syms[j] == XK_Alt_R)))
+   {
+   AltMask = (1 << (i / 
modmap->max_keypermod));
+   }
+   else if (!SuperMask && ((syms[j] == 
XK_Super_L) || (syms[j] == XK_Super_R)))
+   {
+   SuperMask = (1 << (i / 
modmap->max_keypermod));
+   }
+  

[Xfce4-commits] r25667 - in xfwm4/branches/xfce_4_4: . src

2007-05-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 05:47:02 + (Wed, 02 May 2007)
New Revision: 25667

Modified:
   xfwm4/branches/xfce_4_4/NEWS
   xfwm4/branches/xfce_4_4/src/keyboard.c
Log:
Fix modifier mask not working with all keynaps (Bug #3194)

Modified: xfwm4/branches/xfce_4_4/NEWS
===
--- xfwm4/branches/xfce_4_4/NEWS2007-05-02 05:40:38 UTC (rev 25666)
+++ xfwm4/branches/xfce_4_4/NEWS2007-05-02 05:47:02 UTC (rev 25667)
@@ -1,6 +1,7 @@
 4.4.2
 =
 
+- Fix modifier mask not working with all keynaps (Bug #3194)
 - Fix wrong count of key shortcut causing switch to last workspace
   on modifier key press if no window is focused (Bug #3191)
 - Fix spec file missing from the tar ball causing 'make dist' to fail

Modified: xfwm4/branches/xfce_4_4/src/keyboard.c
===
--- xfwm4/branches/xfce_4_4/src/keyboard.c  2007-05-02 05:40:38 UTC (rev 
25666)
+++ xfwm4/branches/xfce_4_4/src/keyboard.c  2007-05-02 05:47:02 UTC (rev 
25667)
@@ -258,8 +258,13 @@
 void
 initModifiers (Display * dpy)
 {
-XModifierKeymap *xmk = XGetModifierMapping (dpy);
-int m, k;
+XModifierKeymap *modmap;
+KeySym *keymap;
+unsigned int keycode;
+int min_keycode;
+int max_keycode;
+int keysyms_per_keycode;
+int i;
 
 AltMask = 0;
 MetaMask = 0;
@@ -267,102 +272,67 @@
 ScrollLockMask = 0;
 SuperMask = 0;
 HyperMask = 0;
+keysyms_per_keycode = 0;
+min_keycode = 0;
+max_keycode = 0;
 
-if (xmk)
-{
-KeyCode *c = xmk->modifiermap;
-KeyCode numLockKeyCode;
-KeyCode scrollLockKeyCode;
-KeyCode altKeyCode;
-KeyCode metaKeyCode;
-KeyCode superKeyCode;
-KeyCode hyperKeyCode;
+XDisplayKeycodes (dpy, &min_keycode, &max_keycode);
+modmap = XGetModifierMapping (dpy);
+keymap = XGetKeyboardMapping (dpy, min_keycode, max_keycode - min_keycode 
+ 1, &keysyms_per_keycode);
 
-numLockKeyCode = XKeysymToKeycode (dpy, XK_Num_Lock);
-scrollLockKeyCode = XKeysymToKeycode (dpy, XK_Scroll_Lock);
-altKeyCode = XKeysymToKeycode (dpy, XK_Alt_L);
-metaKeyCode = XKeysymToKeycode (dpy, XK_Meta_L);
-superKeyCode = XKeysymToKeycode (dpy, XK_Super_L);
-hyperKeyCode = XKeysymToKeycode (dpy, XK_Hyper_L);
+if (modmap && keymap)
+{
+   for (i = 3 * modmap->max_keypermod; i < 8 * 
modmap->max_keypermod; i++)
+   {
+   keycode = modmap->modifiermap[i];
+   if ((keycode >= min_keycode) && (keycode <= 
max_keycode))
+   {
+   int j;
+   KeySym *syms = keymap + (keycode - min_keycode) 
* keysyms_per_keycode;
 
-if (!altKeyCode)
-{
-altKeyCode = XKeysymToKeycode (dpy, XK_Alt_R);
-}
-if (!metaKeyCode)
-{
-metaKeyCode = XKeysymToKeycode (dpy, XK_Meta_R);
-}
-if (!superKeyCode)
-{
-superKeyCode = XKeysymToKeycode (dpy, XK_Super_R);
-}
-if (!hyperKeyCode)
-{
-hyperKeyCode = XKeysymToKeycode (dpy, XK_Hyper_R);
-}
-
-for (m = 0; m < 8; m++)
-{
-for (k = 0; k < xmk->max_keypermod; k++, c++)
-{
-if (*c == NoSymbol)
-{
-continue;
-}
-if (*c == numLockKeyCode)
-{
-NumLockMask = (1 << m);
-}
-if (*c == scrollLockKeyCode)
-{
-ScrollLockMask = (1 << m);
-}
-if (*c == altKeyCode)
-{
-AltMask = (1 << m);
-}
-if (*c == metaKeyCode)
-{
-MetaMask = (1 << m);
-}
-if (*c == superKeyCode)
-{
-SuperMask = (1 << m);
-}
-if (*c == hyperKeyCode)
-{
-HyperMask = (1 << m);
-}
-}
-}
-XFreeModifiermap (xmk);
+   for (j = 0; j < keysyms_per_keycode; j++)
+   {
+   if (!NumLockMask && (syms[j] == 
XK_Num_Lock))
+   {
+   NumLockMask = (1 << (i / 
modmap->max_keypermod));
+   }
+   else if (!ScrollLockMask && (syms[j] == 
XK_Scroll_Lock))
+   {
+   ScrollLockMask = (1 << (i / 
modmap->max_keypermod));
+   }
+  

[Xfce4-commits] r25666 - xfwm4/trunk/src

2007-05-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-02 05:40:38 + (Wed, 02 May 2007)
New Revision: 25666

Modified:
   xfwm4/trunk/src/keyboard.c
Log:
Fix memleak in modifier mapping

Modified: xfwm4/trunk/src/keyboard.c
===
--- xfwm4/trunk/src/keyboard.c  2007-05-01 22:22:37 UTC (rev 25665)
+++ xfwm4/trunk/src/keyboard.c  2007-05-02 05:40:38 UTC (rev 25666)
@@ -306,7 +306,6 @@
 }
 }
 
-#define set_mask(m_mask, mask_cnt) if (!m_mask) m_mask = (1 << mask_cnt);  
 void
 initModifiers (Display * dpy)
 {
@@ -332,7 +331,7 @@
 modmap = XGetModifierMapping (dpy);
 keymap = XGetKeyboardMapping (dpy, min_keycode, max_keycode - min_keycode 
+ 1, &keysyms_per_keycode);
 
-if (modmap)
+if (modmap && keymap)
 {
for (i = 3 * modmap->max_keypermod; i < 8 * 
modmap->max_keypermod; i++)
{
@@ -344,60 +343,47 @@
 
for (j = 0; j < keysyms_per_keycode; j++)
{
-   if (syms[j] == XK_Num_Lock)
+   if (!NumLockMask && (syms[j] == 
XK_Num_Lock))
{
-   set_mask(NumLockMask, (i / 
modmap->max_keypermod));
+   NumLockMask = (1 << (i / 
modmap->max_keypermod));
}
-   else if (syms[j] == XK_Scroll_Lock)
+   else if (!ScrollLockMask && (syms[j] == 
XK_Scroll_Lock))
{
-   set_mask(ScrollLockMask, (i / 
modmap->max_keypermod));
+   ScrollLockMask = (1 << (i / 
modmap->max_keypermod));
}
-   else if ((syms[j] == XK_Alt_L) || 
(syms[j] == XK_Alt_R))
+   else if (!AltMask && ((syms[j] == 
XK_Alt_L) || (syms[j] == XK_Alt_R)))
{
-   set_mask(AltMask, (i / 
modmap->max_keypermod));
+   AltMask = (1 << (i / 
modmap->max_keypermod));
}
-   else if ((syms[j] == XK_Super_L) || 
(syms[j] == XK_Super_R))
+   else if (!SuperMask && ((syms[j] == 
XK_Super_L) || (syms[j] == XK_Super_R)))
{
-   set_mask(SuperMask, (i / 
modmap->max_keypermod));
+   SuperMask = (1 << (i / 
modmap->max_keypermod));
}
-   else if ((syms[j] == XK_Hyper_L) || 
(syms[j] == XK_Hyper_R))
+   else if (!HyperMask && ((syms[j] == 
XK_Hyper_L) || (syms[j] == XK_Hyper_R)))
{
-   set_mask(HyperMask, (i / 
modmap->max_keypermod));
+   HyperMask = (1 << (i / 
modmap->max_keypermod));
}   
-   else if ((syms[j] == XK_Meta_L) || 
(syms[j] == XK_Meta_R))
+   else if (!MetaMask && ((syms[j] == 
XK_Meta_L) || (syms[j] == XK_Meta_R)))
{
-   set_mask(MetaMask, (i / 
modmap->max_keypermod));
+   MetaMask = (1 << (i / 
modmap->max_keypermod));
}
}
}
}
-XFreeModifiermap (modmap);
 }
 
-if (MetaMask == AltMask)
+/* Cleanup memory */
+if (modmap)
 {
-MetaMask = 0;
+   XFreeModifiermap (modmap);
 }
 
-if ((AltMask != 0) && (MetaMask == Mod1Mask))
+if (keymap)
 {
-MetaMask = AltMask;
-AltMask = Mod1Mask;
+   XFree (keymap);
 }
 
-if ((AltMask == 0) && (MetaMask != 0))
-{
-if (MetaMask != Mod1Mask)
-{
-AltMask = Mod1Mask;
-}
-else
-{
-AltMask = MetaMask;
-MetaMask = 0;
-}
-}
-
+/* In case we didn't find AltMask, use Mod1Mask */
 if (AltMask == 0)
 {
 AltMask = Mod1Mask;

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25665 - xfwm4/trunk/src

2007-05-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-01 22:22:37 + (Tue, 01 May 2007)
New Revision: 25665

Modified:
   xfwm4/trunk/src/keyboard.c
Log:
Change modifier mapping (Bug #3194)

Modified: xfwm4/trunk/src/keyboard.c
===
--- xfwm4/trunk/src/keyboard.c  2007-05-01 21:16:15 UTC (rev 25664)
+++ xfwm4/trunk/src/keyboard.c  2007-05-01 22:22:37 UTC (rev 25665)
@@ -306,11 +306,17 @@
 }
 }
 
+#define set_mask(m_mask, mask_cnt) if (!m_mask) m_mask = (1 << mask_cnt);  
 void
 initModifiers (Display * dpy)
 {
-XModifierKeymap *xmk = XGetModifierMapping (dpy);
-int m, k;
+XModifierKeymap *modmap;
+KeySym *keymap;
+unsigned int keycode;
+int min_keycode;
+int max_keycode;
+int keysyms_per_keycode;
+int i;
 
 AltMask = 0;
 MetaMask = 0;
@@ -318,76 +324,54 @@
 ScrollLockMask = 0;
 SuperMask = 0;
 HyperMask = 0;
+keysyms_per_keycode = 0;
+min_keycode = 0;
+max_keycode = 0;
 
-if (xmk)
-{
-KeyCode *c = xmk->modifiermap;
-KeyCode numLockKeyCode;
-KeyCode scrollLockKeyCode;
-KeyCode altKeyCode;
-KeyCode metaKeyCode;
-KeyCode superKeyCode;
-KeyCode hyperKeyCode;
+XDisplayKeycodes (dpy, &min_keycode, &max_keycode);
+modmap = XGetModifierMapping (dpy);
+keymap = XGetKeyboardMapping (dpy, min_keycode, max_keycode - min_keycode 
+ 1, &keysyms_per_keycode);
 
-numLockKeyCode = XKeysymToKeycode (dpy, XK_Num_Lock);
-scrollLockKeyCode = XKeysymToKeycode (dpy, XK_Scroll_Lock);
-altKeyCode = XKeysymToKeycode (dpy, XK_Alt_L);
-metaKeyCode = XKeysymToKeycode (dpy, XK_Meta_L);
-superKeyCode = XKeysymToKeycode (dpy, XK_Super_L);
-hyperKeyCode = XKeysymToKeycode (dpy, XK_Hyper_L);
+if (modmap)
+{
+   for (i = 3 * modmap->max_keypermod; i < 8 * 
modmap->max_keypermod; i++)
+   {
+   keycode = modmap->modifiermap[i];
+   if ((keycode >= min_keycode) && (keycode <= 
max_keycode))
+   {
+   int j;
+   KeySym *syms = keymap + (keycode - min_keycode) 
* keysyms_per_keycode;
 
-if (!altKeyCode)
-{
-altKeyCode = XKeysymToKeycode (dpy, XK_Alt_R);
-}
-if (!metaKeyCode)
-{
-metaKeyCode = XKeysymToKeycode (dpy, XK_Meta_R);
-}
-if (!superKeyCode)
-{
-superKeyCode = XKeysymToKeycode (dpy, XK_Super_R);
-}
-if (!hyperKeyCode)
-{
-hyperKeyCode = XKeysymToKeycode (dpy, XK_Hyper_R);
-}
-
-for (m = 0; m < 8; m++)
-{
-for (k = 0; k < xmk->max_keypermod; k++, c++)
-{
-if (*c == NoSymbol)
-{
-continue;
-}
-if (*c == numLockKeyCode)
-{
-NumLockMask = (1 << m);
-}
-if (*c == scrollLockKeyCode)
-{
-ScrollLockMask = (1 << m);
-}
-if (*c == altKeyCode)
-{
-AltMask = (1 << m);
-}
-if (*c == metaKeyCode)
-{
-MetaMask = (1 << m);
-}
-if (*c == superKeyCode)
-{
-SuperMask = (1 << m);
-}
-if (*c == hyperKeyCode)
-{
-HyperMask = (1 << m);
-}
-}
-}
-XFreeModifiermap (xmk);
+   for (j = 0; j < keysyms_per_keycode; j++)
+   {
+   if (syms[j] == XK_Num_Lock)
+   {
+   set_mask(NumLockMask, (i / 
modmap->max_keypermod));
+   }
+   else if (syms[j] == XK_Scroll_Lock)
+   {
+   set_mask(ScrollLockMask, (i / 
modmap->max_keypermod));
+   }
+   else if ((syms[j] == XK_Alt_L) || 
(syms[j] == XK_Alt_R))
+   {
+   set_mask(AltMask, (i / 
modmap->max_keypermod));
+   }
+   else if ((syms[j] == XK_Super_L) || 
(syms[j] == XK_Super_R))
+   {
+   set_mask(SuperMask, (i / 
modmap->max_keypermod));
+   }
+   else if ((syms[j] == XK_

[Xfce4-commits] r25660 - xfwm4/trunk/src

2007-05-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-01 15:24:59 + (Tue, 01 May 2007)
New Revision: 25660

Modified:
   xfwm4/trunk/src/keyboard.c
Log:
Small cleanup

Modified: xfwm4/trunk/src/keyboard.c
===
--- xfwm4/trunk/src/keyboard.c  2007-05-01 15:08:28 UTC (rev 25659)
+++ xfwm4/trunk/src/keyboard.c  2007-05-01 15:24:59 UTC (rev 25660)
@@ -316,7 +316,6 @@
 MetaMask = 0;
 NumLockMask = 0;
 ScrollLockMask = 0;
-CapsLockMask = 0;
 SuperMask = 0;
 HyperMask = 0;
 
@@ -354,7 +353,6 @@
 hyperKeyCode = XKeysymToKeycode (dpy, XK_Hyper_R);
 }
 
-
 for (m = 0; m < 8; m++)
 {
 for (k = 0; k < xmk->max_keypermod; k++, c++)

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25659 - xfwm4/trunk/src

2007-05-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-01 15:08:28 + (Tue, 01 May 2007)
New Revision: 25659

Modified:
   xfwm4/trunk/src/keyboard.c
Log:
Small cleanup

Modified: xfwm4/trunk/src/keyboard.c
===
--- xfwm4/trunk/src/keyboard.c  2007-05-01 15:03:56 UTC (rev 25658)
+++ xfwm4/trunk/src/keyboard.c  2007-05-01 15:08:28 UTC (rev 25659)
@@ -312,14 +312,19 @@
 XModifierKeymap *xmk = XGetModifierMapping (dpy);
 int m, k;
 
-AltMask = MetaMask = NumLockMask = ScrollLockMask =
-SuperMask = HyperMask = 0;
+AltMask = 0;
+MetaMask = 0;
+NumLockMask = 0;
+ScrollLockMask = 0;
+CapsLockMask = 0;
+SuperMask = 0;
+HyperMask = 0;
+
 if (xmk)
 {
 KeyCode *c = xmk->modifiermap;
 KeyCode numLockKeyCode;
 KeyCode scrollLockKeyCode;
-KeyCode capsLockKeyCode;
 KeyCode altKeyCode;
 KeyCode metaKeyCode;
 KeyCode superKeyCode;
@@ -327,7 +332,6 @@
 
 numLockKeyCode = XKeysymToKeycode (dpy, XK_Num_Lock);
 scrollLockKeyCode = XKeysymToKeycode (dpy, XK_Scroll_Lock);
-capsLockKeyCode = XKeysymToKeycode (dpy, XK_Caps_Lock);
 altKeyCode = XKeysymToKeycode (dpy, XK_Alt_L);
 metaKeyCode = XKeysymToKeycode (dpy, XK_Meta_L);
 superKeyCode = XKeysymToKeycode (dpy, XK_Super_L);

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] r25658 - xfwm4/branches/xfce_4_4/src

2007-05-01 Thread Olivier Fourdan
Author: olivier
Date: 2007-05-01 15:03:56 + (Tue, 01 May 2007)
New Revision: 25658

Modified:
   xfwm4/branches/xfce_4_4/src/keyboard.c
Log:
Small cleanup

Modified: xfwm4/branches/xfce_4_4/src/keyboard.c
===
--- xfwm4/branches/xfce_4_4/src/keyboard.c  2007-05-01 15:01:52 UTC (rev 
25657)
+++ xfwm4/branches/xfce_4_4/src/keyboard.c  2007-05-01 15:03:56 UTC (rev 
25658)
@@ -261,14 +261,18 @@
 XModifierKeymap *xmk = XGetModifierMapping (dpy);
 int m, k;
 
-AltMask = MetaMask = NumLockMask = ScrollLockMask =
-SuperMask = HyperMask = 0;
+AltMask = 0;
+MetaMask = 0;
+NumLockMask = 0;
+ScrollLockMask = 0;
+SuperMask = 0;
+HyperMask = 0;
+
 if (xmk)
 {
 KeyCode *c = xmk->modifiermap;
 KeyCode numLockKeyCode;
 KeyCode scrollLockKeyCode;
-KeyCode capsLockKeyCode;
 KeyCode altKeyCode;
 KeyCode metaKeyCode;
 KeyCode superKeyCode;
@@ -276,7 +280,6 @@
 
 numLockKeyCode = XKeysymToKeycode (dpy, XK_Num_Lock);
 scrollLockKeyCode = XKeysymToKeycode (dpy, XK_Scroll_Lock);
-capsLockKeyCode = XKeysymToKeycode (dpy, XK_Caps_Lock);
 altKeyCode = XKeysymToKeycode (dpy, XK_Alt_L);
 metaKeyCode = XKeysymToKeycode (dpy, XK_Meta_L);
 superKeyCode = XKeysymToKeycode (dpy, XK_Super_L);
@@ -299,7 +302,6 @@
 hyperKeyCode = XKeysymToKeycode (dpy, XK_Hyper_R);
 }
 
-
 for (m = 0; m < 8; m++)
 {
 for (k = 0; k < xmk->max_keypermod; k++, c++)

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


<    2   3   4   5   6   7   8   9   10   11   >