[Xfce4-commits] r23128 - xfwm4/trunk/src
Olivier Fourdan
olivier at xfce.org
Mon Sep 11 20:39:59 UTC 2006
Author: olivier
Date: 2006-09-11 20:39:40 +0000 (Mon, 11 Sep 2006)
New Revision: 23128
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/inline-default-icon.h
xfwm4/trunk/src/inline-tabwin-icon.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
xfwm4/trunk/src/xpm-color-table.h
Log:
Set focus flag on windows initially mapped on other desktops
Modified: xfwm4/trunk/src/client.c
===================================================================
--- xfwm4/trunk/src/client.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/client.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -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-2006 Olivier Fourdan
-
+
*/
-
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -233,7 +233,7 @@
TRACE ("entering clientRedrawAllFrames");
myScreenGrabPointer (screen_info, EnterWindowMask, None, CurrentTime);
-
+
for (c = screen_info->clients, i = 0; i < screen_info->client_count; c = c->next, i++)
{
unsigned long configure_flags = 0L;
@@ -252,12 +252,12 @@
{
clientGravitate (c, REMOVE);
clientGravitate (c, APPLY);
- setNetFrameExtents (screen_info->display_info,
- c->window,
+ setNetFrameExtents (screen_info->display_info,
+ c->window,
frameTop (c),
frameLeft (c),
frameRight (c),
- frameBottom (c));
+ frameBottom (c));
configure_flags |= CFG_FORCE_REDRAW;
mask &= ~UPDATE_FRAME;
}
@@ -268,9 +268,9 @@
/* 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,
+ maximization_flags |= FLAG_TEST (c->flags,
CLIENT_FLAG_MAXIMIZED_HORIZ) ? WIN_STATE_MAXIMIZED_HORIZ : 0;
- maximization_flags |= FLAG_TEST (c->flags,
+ maximization_flags |= FLAG_TEST (c->flags,
CLIENT_FLAG_MAXIMIZED_VERT) ? WIN_STATE_MAXIMIZED_VERT : 0;
/* Force an update by clearing the internal flags */
@@ -720,8 +720,8 @@
}
mask &= ~(CWStackMode | CWSibling);
- /* Keep control over what the application does. However, some broken apps try
- to achieve fullscreen by using static gravity and a (0,0) position, the
+ /* Keep control over what the application does. However, some broken apps try
+ to achieve fullscreen by using static gravity and a (0,0) position, the
second part of the test is for this case.
*/
if (((flags & (CFG_CONSTRAINED | CFG_REQUEST)) == (CFG_CONSTRAINED | CFG_REQUEST))
@@ -746,7 +746,7 @@
mask |= CWY;
moved = TRUE;
}
-
+
if (c->width != pwidth)
{
mask |= CWWidth;
@@ -828,9 +828,9 @@
else
{
FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_HAS_BORDER | XFWM_FLAG_HAS_MENU);
- FLAG_SET (c->xfwm_flags, (mwm_hints-> decorations & (MWM_DECOR_TITLE | MWM_DECOR_BORDER))
+ FLAG_SET (c->xfwm_flags, (mwm_hints-> decorations & (MWM_DECOR_TITLE | MWM_DECOR_BORDER))
? XFWM_FLAG_HAS_BORDER : 0);
- FLAG_SET (c->xfwm_flags, (mwm_hints->decorations & (MWM_DECOR_MENU))
+ FLAG_SET (c->xfwm_flags, (mwm_hints->decorations & (MWM_DECOR_MENU))
? XFWM_FLAG_HAS_MENU : 0);
/*
FLAG_UNSET(c->xfwm_flags, XFWM_FLAG_HAS_HIDE);
@@ -1380,7 +1380,7 @@
xfwmPixmapDuplicate (&screen_info->buttons[MENU_BUTTON][PRESSED],
&c->appmenu[PRESSED]);
- size = MIN (screen_info->buttons[MENU_BUTTON][ACTIVE].width,
+ size = MIN (screen_info->buttons[MENU_BUTTON][ACTIVE].width,
screen_info->buttons[MENU_BUTTON][ACTIVE].height);
if (size > 1)
@@ -1682,7 +1682,7 @@
#endif
c->frame =
- XCreateWindow (display_info->dpy, screen_info->xroot, 0, 0, 1, 1, 0,
+ XCreateWindow (display_info->dpy, screen_info->xroot, 0, 0, 1, 1, 0,
c->depth, InputOutput, c->visual, valuemask, &attributes);
XSelectInput (display_info->dpy, c->window, 0);
@@ -1710,40 +1710,40 @@
xfwmPixmapInit (screen_info, &c->appmenu[INACTIVE]);
xfwmPixmapInit (screen_info, &c->appmenu[PRESSED]);
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
- &c->sides[SIDE_LEFT],
+ xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
+ &c->sides[SIDE_LEFT],
myDisplayGetCursorResize(screen_info->display_info, 4 + SIDE_LEFT));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
+ xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
&c->sides[SIDE_RIGHT],
myDisplayGetCursorResize(screen_info->display_info, 4 + SIDE_RIGHT));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
+ xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
&c->sides[SIDE_BOTTOM],
myDisplayGetCursorResize(screen_info->display_info, 4 + SIDE_BOTTOM));
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
+ 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,
+ 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,
+ 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,
+ 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,
+ xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
&c->title, None);
for (i = 0; i < BUTTON_COUNT; i++)
{
- xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
+ xfwmWindowCreate (screen_info, c->visual, c->depth, c->frame,
&c->buttons[i], None);
}
clientUpdateIcon (c);
- /* 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;
@@ -1780,6 +1780,7 @@
else
{
clientRaise (c, None);
+ clientInitFocusFlag (c);
}
}
else
@@ -1788,14 +1789,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
*/
@@ -1804,7 +1805,7 @@
DBG ("client \"%s\" (0x%lx) is now managed", c->name, c->window);
DBG ("client_count=%d", screen_info->client_count);
-
+
return c;
}
@@ -1855,17 +1856,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,
+ XDeleteProperty (display_info->dpy, c->window,
display_info->atoms[WIN_WORKSPACE]);
- XDeleteProperty (display_info->dpy, c->window,
+ XDeleteProperty (display_info->dpy, c->window,
display_info->atoms[WIN_LAYER]);
- XDeleteProperty (display_info->dpy, c->window,
+ XDeleteProperty (display_info->dpy, c->window,
display_info->atoms[NET_WM_ALLOWED_ACTIONS]);
}
@@ -1913,7 +1914,7 @@
xfwmWindowTemp (screen_info,
NULL, 0,
screen_info->xroot,
- &shield,
+ &shield,
0, 0,
screen_info->width,
screen_info->height,
@@ -2249,7 +2250,7 @@
if (CLIENT_CAN_HIDE_WINDOW (c2)
&& !clientIsValidTransientOrModal (c2) && (c2 != c))
{
- if (((!c) && (c2->win_workspace == ws))
+ if (((!c) && (c2->win_workspace == ws))
|| ((c) && !clientIsTransientOrModalFor (c, c2)
&& (c2->win_workspace == c->win_workspace)))
{
@@ -2286,8 +2287,8 @@
TRACE ("entering clientToggleShowDesktop");
- clientSetFocus (screen_info, NULL,
- myDisplayGetCurrentTime (screen_info->display_info),
+ clientSetFocus (screen_info, NULL,
+ myDisplayGetCurrentTime (screen_info->display_info),
FOCUS_IGNORE_MODAL);
if (screen_info->show_desktop)
{
@@ -2334,7 +2335,7 @@
if (FLAG_TEST (c->wm_flags, WM_FLAG_DELETE))
{
- sendClientMessage (screen_info, c->window, WM_DELETE_WINDOW,
+ sendClientMessage (screen_info, c->window, WM_DELETE_WINDOW,
myDisplayGetCurrentTime (display_info));
}
else
@@ -2369,7 +2370,7 @@
if (FLAG_TEST (c->wm_flags, WM_FLAG_CONTEXT_HELP))
{
- sendClientMessage (c->screen_info, c->window, NET_WM_CONTEXT_HELP,
+ sendClientMessage (c->screen_info, c->window, NET_WM_CONTEXT_HELP,
myDisplayGetCurrentTime (display_info));
}
}
@@ -2693,9 +2694,9 @@
{
/*
* We treat differently full maximization from vertical or horizontal maximization.
- * This is for usability concerns, otherwise maximization acts like a toggle,
+ * This is for usability concerns, otherwise maximization acts like a toggle,
* switching from horizontal to vertical instead of switching to full maximization.
- *
+ *
* The full size is not computed yet, as full maximization removes borders
* while either horizontal or vertical maximization still shows decorations...
*/
@@ -2738,7 +2739,7 @@
wc->height = c->old_height;
}
-static void
+static void
clientNewMaxSize (Client * c, XWindowChanges *wc)
{
ScreenInfo *screen_info;
@@ -2748,7 +2749,7 @@
gint monitor_nbr;
tmp_x = frameX (c);
- tmp_y = frameY (c);
+ tmp_y = frameY (c);
tmp_h = frameHeight (c);
tmp_w = frameWidth (c);
@@ -2829,7 +2830,7 @@
/* 1) Compute the new state */
clientNewMaxState (c, &wc, mode);
-
+
/* 2) Compute the new size, based on the state */
clientNewMaxSize (c, &wc);
@@ -3009,9 +3010,9 @@
if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ | CLIENT_FLAG_MAXIMIZED_VERT))
{
/* Too bad, the flags used internally are different from the WIN_STATE_* bits */
- maximization_flags |= FLAG_TEST (c->flags,
+ maximization_flags |= FLAG_TEST (c->flags,
CLIENT_FLAG_MAXIMIZED_HORIZ) ? WIN_STATE_MAXIMIZED_HORIZ : 0;
- maximization_flags |= FLAG_TEST (c->flags,
+ maximization_flags |= FLAG_TEST (c->flags,
CLIENT_FLAG_MAXIMIZED_VERT) ? WIN_STATE_MAXIMIZED_VERT : 0;
/* Force an update by clearing the internal flags */
@@ -3112,7 +3113,7 @@
}
else
{
- if (!screen_info->params->snap_resist || ((frame_x2 >= disp_max_x) && (c->x > prev_x)))
+ if (!screen_info->params->snap_resist || ((frame_x2 >= disp_max_x) && (c->x > prev_x)))
{
best_delta_x = abs (disp_max_x - frame_x2);
best_frame_x = disp_max_x - frame_width;
@@ -3262,7 +3263,7 @@
myDisplayUpdateCurrentTime (display_info, xevent);
}
- if ((passdata->use_keys) && !FLAG_TEST_ALL(c->flags, CLIENT_FLAG_MAXIMIZED))
+ if ((passdata->use_keys) && !FLAG_TEST_ALL(c->flags, CLIENT_FLAG_MAXIMIZED))
{
int key_move = 16;
unsigned int edge;
@@ -3453,7 +3454,7 @@
{
edge_scroll_x++;
}
- if (msx == 0)
+ if (msx == 0)
{
rx = 1;
}
@@ -3474,7 +3475,7 @@
{
edge_scroll_y++;
}
- if (msy == 0)
+ if (msy == 0)
{
ry = 1;
}
@@ -3546,7 +3547,7 @@
}
}
- if (FLAG_TEST_ALL(c->flags, CLIENT_FLAG_MAXIMIZED)
+ if (FLAG_TEST_ALL(c->flags, CLIENT_FLAG_MAXIMIZED)
&& (screen_info->params->restore_on_move))
{
if (xevent->xmotion.y_root - passdata->my > 15)
@@ -3583,9 +3584,9 @@
clientToggleMaximized (c, WIN_STATE_MAXIMIZED, FALSE);
toggled_maximize = FALSE;
passdata->move_resized = TRUE;
- /*
- Update "passdata->my" to the current value to
- allow "restore on move" to keep working next time
+ /*
+ Update "passdata->my" to the current value to
+ allow "restore on move" to keep working next time
*/
passdata->my = c->y - frameTop(c) / 2;
}
@@ -3679,7 +3680,7 @@
passdata.button = ev->xbutton.button;
passdata.is_transient = clientIsValidTransientOrModal (c);
passdata.move_resized = FALSE;
-
+
if (ev->type == KeyPress)
{
cursor = None;
@@ -3699,7 +3700,7 @@
getMouseXY (screen_info, screen_info->xroot, &passdata.mx, &passdata.my);
}
g1 = myScreenGrabKeyboard (screen_info, myDisplayGetCurrentTime (display_info));
- g2 = myScreenGrabPointer (screen_info, ButtonMotionMask | ButtonReleaseMask,
+ g2 = myScreenGrabPointer (screen_info, ButtonMotionMask | ButtonReleaseMask,
cursor, myDisplayGetCurrentTime (display_info));
if (!g1 || !g2)
{
@@ -3725,9 +3726,9 @@
clientSetOpacity (c, c->opacity, OPACITY_MOVE, OPACITY_MOVE);
}
- /*
- * Need to remove the sidewalk windows while moving otherwise
- * the motion events aren't reported on screen edges
+ /*
+ * Need to remove the sidewalk windows while moving otherwise
+ * the motion events aren't reported on screen edges
*/
placeSidewalks(screen_info, FALSE);
@@ -4215,8 +4216,8 @@
}
g1 = myScreenGrabKeyboard (screen_info, myDisplayGetCurrentTime (display_info));
- g2 = myScreenGrabPointer (screen_info, ButtonMotionMask | ButtonReleaseMask,
- myDisplayGetCursorResize(display_info, passdata.corner),
+ g2 = myScreenGrabPointer (screen_info, ButtonMotionMask | ButtonReleaseMask,
+ myDisplayGetCursorResize(display_info, passdata.corner),
myDisplayGetCurrentTime (display_info));
if (!g1 || !g2)
@@ -4245,7 +4246,7 @@
{
clientSetOpacity (c, c->opacity, OPACITY_RESIZE, OPACITY_RESIZE);
}
-
+
FLAG_SET (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING);
TRACE ("entering resize loop");
eventFilterPush (display_info->xfilter, clientResizeEventFilter, &passdata);
@@ -4269,7 +4270,7 @@
/* Set window opacity to its original value */
clientSetOpacity (c, c->opacity, OPACITY_RESIZE, 0);
- if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED) &&
+ if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED) &&
((w_orig != c->width) || (h_orig != c->height)))
{
clientRemoveMaximizeFlag (c);
@@ -4468,7 +4469,7 @@
passdata.c = clientGetNext (c, passdata.cycle_range);
/* If there is one single client, and if it's eligible for focus, use it */
- if ((passdata.c == NULL) && (c != clientGetFocus()) &&
+ if ((passdata.c == NULL) && (c != clientGetFocus()) &&
clientSelectMask (c, passdata.cycle_range, WINDOW_REGULAR_FOCUSABLE))
{
passdata.c = c;
@@ -4604,9 +4605,9 @@
display_info = screen_info->display_info;
g1 = XGrabPointer (display_info->dpy, w, FALSE,
- ButtonReleaseMask | EnterWindowMask | LeaveWindowMask,
- GrabModeAsync, GrabModeAsync,
- screen_info->xroot, None,
+ ButtonReleaseMask | EnterWindowMask | LeaveWindowMask,
+ GrabModeAsync, GrabModeAsync,
+ screen_info->xroot, None,
myDisplayGetCurrentTime (display_info));
if (g1 != GrabSuccess)
@@ -4702,21 +4703,21 @@
ScreenInfo *screen_info;
DisplayInfo *display_info;
gboolean got_startup_id;
-
+
g_return_val_if_fail (c != NULL, NULL);
g_return_val_if_fail (c->window != None, NULL);
screen_info = c->screen_info;
display_info = screen_info->display_info;
got_startup_id = FALSE;
-
+
if (c->startup_id)
{
return (c->startup_id);
}
got_startup_id = getWindowStartupId (display_info, c->window, &c->startup_id);
-
+
if (!got_startup_id && (c->client_leader))
{
got_startup_id = getWindowStartupId (display_info, c->client_leader, &c->startup_id);
@@ -4726,7 +4727,7 @@
{
got_startup_id = getWindowStartupId (display_info, c->group_leader, &c->startup_id);
}
-
+
return (c->startup_id);
}
#endif /* HAVE_LIBSTARTUP_NOTIFICATION */
Modified: xfwm4/trunk/src/client.h
===================================================================
--- xfwm4/trunk/src/client.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/client.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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-2006 Olivier Fourdan
-
+
*/
#ifdef HAVE_CONFIG_H
@@ -206,7 +206,7 @@
{
/* Reference to our screen structure */
ScreenInfo *screen_info;
-
+
Window window;
Window frame;
Window transient_for;
@@ -268,7 +268,7 @@
guint opacity_applied;
guint opacity_flags;
gboolean opacity_locked;
-
+
#ifdef HAVE_LIBSTARTUP_NOTIFICATION
/* Startup notification */
gchar *startup_id;
Modified: xfwm4/trunk/src/compositor.c
===================================================================
--- xfwm4/trunk/src/compositor.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/compositor.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -667,11 +667,11 @@
screen_info = cw->screen_info;
display_info = screen_info->display_info;
- border = XFixesCreateRegionFromWindow (display_info->dpy,
+ border = XFixesCreateRegionFromWindow (display_info->dpy,
cw->id, WindowRegionBounding);
g_return_val_if_fail (border != None, None);
- XFixesTranslateRegion (display_info->dpy, border,
- cw->attr.x + cw->attr.border_width,
+ XFixesTranslateRegion (display_info->dpy, border,
+ cw->attr.x + cw->attr.border_width,
cw->attr.y + cw->attr.border_width);
return border;
@@ -915,7 +915,7 @@
r.width = cw->attr.width + cw->attr.border_width * 2;
r.height = cw->attr.height + cw->attr.border_width * 2;
- /*
+ /*
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
@@ -925,11 +925,11 @@
*/
if (!(screen_info->overlays) &&
- ((screen_info->params->show_popup_shadow &&
- WIN_IS_OVERRIDE(cw) &&
- !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) ||
+ ((screen_info->params->show_popup_shadow &&
+ WIN_IS_OVERRIDE(cw) &&
+ !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) ||
(screen_info->params->show_frame_shadow &&
- !WIN_IS_OVERRIDE(cw) &&
+ !WIN_IS_OVERRIDE(cw) &&
!WIN_NO_SHADOW(cw) &&
(WIN_HAS_FRAME(cw) || !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))))))
{
@@ -1128,34 +1128,34 @@
/* Top Border (title bar) */
XRenderComposite (display_info->dpy, PictOpOver, cw->picture, cw->alphaBorderPict,
- screen_info->rootBuffer,
- 0, 0,
- 0, 0,
- frame_x, frame_y,
+ screen_info->rootBuffer,
+ 0, 0,
+ 0, 0,
+ frame_x, frame_y,
frame_width, frame_top);
/* Bottom Border */
XRenderComposite (display_info->dpy, PictOpOver, cw->picture, cw->alphaBorderPict,
- screen_info->rootBuffer,
- 0, frame_height - frame_bottom,
+ screen_info->rootBuffer,
+ 0, frame_height - frame_bottom,
0, 0,
- frame_x, frame_y + frame_height - frame_bottom,
+ frame_x, frame_y + frame_height - frame_bottom,
frame_width, frame_bottom);
/* Left Border */
XRenderComposite (display_info->dpy, PictOpOver, cw->picture, cw->alphaBorderPict,
- screen_info->rootBuffer,
- 0, frame_top,
+ screen_info->rootBuffer,
+ 0, frame_top,
0, 0,
- frame_x, frame_y + frame_top,
+ frame_x, frame_y + frame_top,
frame_left, frame_height - frame_top - frame_bottom);
/* Right Border */
XRenderComposite (display_info->dpy, PictOpOver, cw->picture, cw->alphaBorderPict,
- screen_info->rootBuffer,
- frame_width - frame_right, frame_top,
+ screen_info->rootBuffer,
+ frame_width - frame_right, frame_top,
0, 0,
- frame_x + frame_width - frame_right,
- frame_y + frame_top, frame_right,
+ frame_x + frame_width - frame_right,
+ frame_y + frame_top, frame_right,
frame_height - frame_top - frame_bottom);
}
/* Client Window */
@@ -1166,10 +1166,10 @@
XFixesSetPictureClipRegion (display_info->dpy, screen_info->rootBuffer, 0, 0, region);
XRenderComposite (display_info->dpy, PictOpSrc, cw->picture, None,
- screen_info->rootBuffer,
- frame_left, frame_top,
+ screen_info->rootBuffer,
+ frame_left, frame_top,
0, 0,
- frame_x + frame_left, frame_y + frame_top,
+ frame_x + frame_left, frame_y + frame_top,
frame_width - frame_left - frame_right, frame_height - frame_top - frame_bottom);
r.x = frame_x + frame_left;
@@ -1183,10 +1183,10 @@
else if (!solid_part)
{
XRenderComposite (display_info->dpy, PictOpOver, cw->picture, cw->alphaPict,
- screen_info->rootBuffer,
- frame_left, frame_top,
+ screen_info->rootBuffer,
+ frame_left, frame_top,
0, 0,
- frame_x + frame_left, frame_y + frame_top,
+ frame_x + frame_left, frame_y + frame_top,
frame_width - frame_left - frame_right, frame_height - frame_top - frame_bottom);
}
}
@@ -1204,7 +1204,7 @@
}
else if (!solid_part)
{
- XRenderComposite (display_info->dpy, PictOpOver, cw->picture, cw->alphaPict, screen_info->rootBuffer,
+ XRenderComposite (display_info->dpy, PictOpOver, cw->picture, cw->alphaPict, screen_info->rootBuffer,
0, 0, 0, 0, x, y, w, h);
}
}
@@ -1474,8 +1474,8 @@
return;
}
- display_info->compositor_timeout_id =
- g_timeout_add (50 /* ms */,
+ display_info->compositor_timeout_id =
+ g_timeout_add (50 /* ms */,
compositor_timeout_cb, display_info);
#endif /* USE_IDLE_REPAINT */
}
@@ -1540,7 +1540,7 @@
{
cw2->clientSize = client_size (cw2);
}
- /* ...before substracting them from the damaged zone. */
+ /* ...before substracting them from the damaged zone. */
if ((cw2->clientSize) && (screen_info->params->frame_opacity < 100))
{
XFixesSubtractRegion (display_info->dpy, region,
@@ -1769,7 +1769,7 @@
}
/* 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) && WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
WIN_IS_NATIVE_OPAQUE(cw) && WIN_IS_REDIRECTED(cw) && !WIN_IS_SHAPED(cw))
{
CWindow *top;
@@ -1979,7 +1979,7 @@
previous_above = ncw->id;
}
- /* If above is set to None, the window whose state was changed is on
+ /* If above is set to None, the window whose state was changed is on
* the bottom of the stack with respect to sibling.
*/
if (above == None)
@@ -2067,7 +2067,7 @@
}
}
- if ((cw->attr.width != width) || (cw->attr.height != height) ||
+ if ((cw->attr.width != width) || (cw->attr.height != height) ||
(cw->attr.x != x) || (cw->attr.y != y) || shape_notify)
{
if (cw->borderSize)
@@ -2108,7 +2108,7 @@
destroy_win (DisplayInfo *display_info, Window id)
{
CWindow *cw;
-
+
g_return_if_fail (display_info != NULL);
g_return_if_fail (id != None);
TRACE ("entering destroy_win: 0x%lx", id);
@@ -2196,7 +2196,7 @@
set_win_opacity (cw, cw->opacity);
cw->native_opacity = WIN_IS_OPAQUE(cw);
- /* Transset changes the property on the frame, not the client
+ /* Transset changes the property on the frame, not the client
window. We need to check and update the client "opacity"
value accordingly.
*/
@@ -2320,7 +2320,7 @@
g_return_if_fail (ev != NULL);
TRACE ("entering compositorHandleCreateNotify for 0x%lx", ev->window);
- /*
+ /*
We are only interested in top level windows, other will
be caught by the WM.
*/
@@ -2417,8 +2417,8 @@
{
cw->shaped = FALSE;
}
- resize_win (cw, cw->attr.x, cw->attr.y,
- ev->width + ev->x, ev->height + ev->y,
+ resize_win (cw, cw->attr.x, cw->attr.y,
+ ev->width + ev->x, ev->height + ev->y,
cw->attr.border_width, TRUE);
if ((ev->shaped) && !(cw->shaped))
{
@@ -2717,7 +2717,7 @@
DisplayInfo *display_info;
gchar selection[32];
Atom a;
-
+
g_return_if_fail (screen_info != NULL);
display_info = screen_info->display_info;
@@ -2872,7 +2872,7 @@
screen_info->gaussianSize = -1;
screen_info->overlays = 0;
- XCompositeUnredirectSubwindows (display_info->dpy, screen_info->xroot,
+ XCompositeUnredirectSubwindows (display_info->dpy, screen_info->xroot,
display_info->composite_mode);
compositorSetCMSelection (screen_info, None);
@@ -3034,7 +3034,7 @@
if (vendor && (!strstr ("X.Org", vendor)))
{
- /*
+ /*
Check the version, X.org 6.8.x has some bugs that makes
it not suitable for use with xfwm4 compositor
*/
Modified: xfwm4/trunk/src/compositor.h
===================================================================
--- xfwm4/trunk/src/compositor.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/compositor.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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.
-
+
xcompmgr - (c) 2003 Keith Packard
xfwm4 - (c) 2005-2006 Olivier Fourdan
-
+
*/
#ifndef INC_COMPOSITOR_H
@@ -41,7 +41,7 @@
Client *);
void compositorRemoveWindow (DisplayInfo *,
Window);
-void compositorDamageWindow (DisplayInfo *,
+void compositorDamageWindow (DisplayInfo *,
Window);
void compositorHandleEvent (DisplayInfo *,
XEvent *);
Modified: xfwm4/trunk/src/display.c
===================================================================
--- xfwm4/trunk/src/display.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/display.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,21 +1,21 @@
/* $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.
-
+
xfwm4 - (c) 2002-2006 Olivier Fourdan
-
+
*/
#ifdef HAVE_CONFIG_H
@@ -33,7 +33,7 @@
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
-#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util.h>
#ifdef HAVE_RENDER
#include <X11/extensions/Xrender.h>
#endif
@@ -55,9 +55,9 @@
char buf[64];
XGetErrorText (dpy, err->error_code, buf, 63);
- g_print ("XError: %s\n", buf);
- g_print ("==> XID 0x%lx, Request %d, Error %d <==\n",
- err->resourceid, err->request_code, err->error_code);
+ g_print ("XError: %s\n", buf);
+ g_print ("==> XID 0x%lx, Request %d, Error %d <==\n",
+ err->resourceid, err->request_code, err->error_code);
#endif
return 0;
}
@@ -161,10 +161,10 @@
"_XROOTPMAP_ID",
"_XSETROOT_ID"
};
-
+
g_assert (NB_ATOMS == G_N_ELEMENTS (atom_names));
- return (XInternAtoms (display_info->dpy,
- (char **) atom_names,
+ return (XInternAtoms (display_info->dpy,
+ (char **) atom_names,
NB_ATOMS,
FALSE, display_info->atoms) != 0);
}
@@ -193,8 +193,8 @@
}
/* Test XShape extension support */
- if (XShapeQueryExtension (display->dpy,
- &display->shape_event_base,
+ if (XShapeQueryExtension (display->dpy,
+ &display->shape_event_base,
&dummy))
{
display->have_shape = TRUE;
@@ -226,7 +226,7 @@
#ifdef HAVE_RANDR
if (XRRQueryExtension (display->dpy,
- &display->xrandr_event_base,
+ &display->xrandr_event_base,
&display->xrandr_error_base))
{
display->have_xrandr = TRUE;
@@ -242,11 +242,11 @@
display->have_xrandr = FALSE;
#endif
- display->root_cursor =
+ display->root_cursor =
XCreateFontCursor (display->dpy, XC_left_ptr);
- display->move_cursor =
+ display->move_cursor =
XCreateFontCursor (display->dpy, XC_fleur);
- display->busy_cursor =
+ display->busy_cursor =
cursorCreateSpinning (display->dpy);
display->resize_cursor[CORNER_TOP_LEFT] =
XCreateFontCursor (display->dpy, XC_top_left_corner);
@@ -256,13 +256,13 @@
XCreateFontCursor (display->dpy, XC_bottom_left_corner);
display->resize_cursor[CORNER_BOTTOM_RIGHT] =
XCreateFontCursor (display->dpy, XC_bottom_right_corner);
- display->resize_cursor[4 + SIDE_LEFT] =
+ display->resize_cursor[4 + SIDE_LEFT] =
XCreateFontCursor (display->dpy, XC_left_side);
- display->resize_cursor[4 + SIDE_RIGHT] =
+ display->resize_cursor[4 + SIDE_RIGHT] =
XCreateFontCursor (display->dpy, XC_right_side);
- display->resize_cursor[4 + SIDE_TOP] =
+ display->resize_cursor[4 + SIDE_TOP] =
XCreateFontCursor (display->dpy, XC_top_side);
- display->resize_cursor[4 + SIDE_BOTTOM] =
+ display->resize_cursor[4 + SIDE_BOTTOM] =
XCreateFontCursor (display->dpy, XC_bottom_side);
display->xfilter = NULL;
@@ -279,7 +279,7 @@
g_free (display->hostname);
display->hostname = NULL;
}
-
+
compositorInitDisplay (display);
return display;
@@ -296,7 +296,7 @@
display->move_cursor = None;
XFreeCursor (display->dpy, display->root_cursor);
display->root_cursor = None;
-
+
if (display->hostname)
{
g_free (display->hostname);
@@ -308,10 +308,10 @@
XFreeCursor (display->dpy, display->resize_cursor[i]);
display->resize_cursor[i] = None;
}
-
+
g_slist_free (display->clients);
display->clients = NULL;
-
+
g_slist_free (display->screens);
display->screens = NULL;
@@ -322,7 +322,7 @@
myDisplayHaveShape (DisplayInfo *display)
{
g_return_val_if_fail (display != NULL, FALSE);
-
+
return (display->have_shape);
}
@@ -330,35 +330,35 @@
myDisplayHaveRender (DisplayInfo *display)
{
g_return_val_if_fail (display != NULL, FALSE);
-
+
return (display->have_render);
}
-Cursor
+Cursor
myDisplayGetCursorBusy (DisplayInfo *display)
{
g_return_val_if_fail (display, None);
-
+
return display->busy_cursor;
}
-Cursor
+Cursor
myDisplayGetCursorMove (DisplayInfo *display)
{
g_return_val_if_fail (display, None);
-
+
return display->move_cursor;
}
-Cursor
+Cursor
myDisplayGetCursorRoot (DisplayInfo *display)
{
g_return_val_if_fail (display, None);
-
+
return display->root_cursor;
}
-Cursor
+Cursor
myDisplayGetCursorResize (DisplayInfo *display, guint index)
{
g_return_val_if_fail (display, None);
@@ -372,7 +372,7 @@
myDisplayGrabServer (DisplayInfo *display)
{
g_return_if_fail (display);
-
+
DBG ("entering myDisplayGrabServer");
if (display->xgrabcount == 0)
{
@@ -401,7 +401,7 @@
DBG ("grabs : %i", display->xgrabcount);
}
-void
+void
myDisplayAddClient (DisplayInfo *display, Client *c)
{
g_return_if_fail (c != None);
@@ -410,7 +410,7 @@
display->clients = g_slist_append (display->clients, c);
}
-void
+void
myDisplayRemoveClient (DisplayInfo *display, Client *c)
{
g_return_if_fail (c != None);
@@ -461,7 +461,7 @@
return NULL;
}
-void
+void
myDisplayAddScreen (DisplayInfo *display, ScreenInfo *screen)
{
g_return_if_fail (screen != NULL);
@@ -471,7 +471,7 @@
display->nb_screens = display->nb_screens + 1;
}
-void
+void
myDisplayRemoveScreen (DisplayInfo *display, ScreenInfo *screen)
{
g_return_if_fail (screen != NULL);
@@ -604,11 +604,11 @@
return NULL;
}
-Time
+Time
myDisplayUpdateCurrentTime (DisplayInfo *display, XEvent *ev)
{
g_return_val_if_fail (display != NULL, (Time) CurrentTime);
-
+
switch (ev->type)
{
case KeyPress:
@@ -644,7 +644,7 @@
return display->current_time;
}
-Time
+Time
myDisplayGetCurrentTime (DisplayInfo *display)
{
g_return_val_if_fail (display != NULL, (Time) CurrentTime);
@@ -655,7 +655,7 @@
Time myDisplayGetLastUserTime (DisplayInfo *);
void myDisplaySetLastUserTime (DisplayInfo *,
Time);
-Time
+Time
myDisplayGetLastUserTime (DisplayInfo *display)
{
g_return_val_if_fail (display != NULL, (Time) CurrentTime);
@@ -663,7 +663,7 @@
return (Time) display->last_user_time;
}
-void
+void
myDisplaySetLastUserTime (DisplayInfo *display, Time timestamp)
{
g_return_if_fail (display != NULL);
@@ -729,7 +729,7 @@
format_src = XRenderFindStandardFormat (dpy, PictStandardA8);
g_return_val_if_fail (format_src != NULL , FALSE);
- ximage = XGetImage (dpy,
+ ximage = XGetImage (dpy,
DefaultRootWindow(dpy),
x, y, w, h,
AllPlanes, ZPixmap);
@@ -738,7 +738,7 @@
rootPixmap = XCreatePixmap (dpy,
DefaultRootWindow(dpy),
w, h, depth);
- XPutImage (dpy, rootPixmap,
+ XPutImage (dpy, rootPixmap,
DefaultGC (dpy, screen_number), ximage,
0, 0, 0, 0, w, h);
XDestroyImage (ximage);
@@ -746,7 +746,7 @@
attrs.override_redirect = TRUE;
output = XCreateWindow (dpy,
DefaultRootWindow(dpy),
- x, y, w, h,
+ x, y, w, h,
0, CopyFromParent, CopyFromParent,
(Visual *) CopyFromParent,
CWOverrideRedirect, &attrs);
@@ -757,30 +757,30 @@
1, 1, 8);
t1 = get_time();
-
+
pa.repeat = TRUE;
- picture1 = XRenderCreatePicture (dpy,
+ picture1 = XRenderCreatePicture (dpy,
rootPixmap,
format_dst, 0, NULL);
- picture2 = XRenderCreatePicture (dpy,
+ picture2 = XRenderCreatePicture (dpy,
fillPixmap,
format_src, CPRepeat, &pa);
- picture3 = XRenderCreatePicture (dpy,
+ picture3 = XRenderCreatePicture (dpy,
output,
format_dst, 0, NULL);
- XRenderComposite (dpy, PictOpSrc,
- picture1, None, picture3,
+ XRenderComposite (dpy, PictOpSrc,
+ picture1, None, picture3,
0, 0, 0, 0, 0, 0, w, h);
XRenderFillRectangle (dpy, PictOpSrc,
- picture2, &c, 0, 0,
+ picture2, &c, 0, 0,
1, 1);
for (iterations = 0; iterations < 10; iterations++)
{
- XRenderComposite (dpy, PictOpOver,
- picture1, picture2, picture3,
+ XRenderComposite (dpy, PictOpOver,
+ picture1, picture2, picture3,
0, 0, 0, 0, 0, 0, w, h);
- ximage = XGetImage (dpy, output,
- 0, 0, 1, 1,
+ ximage = XGetImage (dpy, output,
+ 0, 0, 1, 1,
AllPlanes, ZPixmap);
if (ximage)
{
Modified: xfwm4/trunk/src/display.h
===================================================================
--- xfwm4/trunk/src/display.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/display.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,21 +1,21 @@
/* $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.
-
+
xfwm4 - (c) 2002-2006 Olivier Fourdan
-
+
*/
#ifndef INC_DISPLAY_H
@@ -65,9 +65,9 @@
#define WINDOW 1
#define FRAME 2
-/*
- * The following macro is taken straight from metacity,
- * if that needs some explanation, please refer to metacity's
+/*
+ * The following macro is taken straight from metacity,
+ * if that needs some explanation, please refer to metacity's
* display.h source where it is explaned
*/
#define TIMESTAMP_IS_BEFORE_REAL(time1, time2) ((((time1) < (time2)) && ((time2) - (time1) < ((guint32)-1)/2 )) || \
@@ -76,7 +76,7 @@
(TIMESTAMP_IS_BEFORE_REAL(time1, time2) && \
(time2) != 0))
-enum
+enum
{
COMPOSITING_MANAGER = 0,
GNOME_PANEL_DESKTOP_AREA,
@@ -183,7 +183,7 @@
typedef struct _ScreenInfo ScreenInfo;
typedef struct _Settings Settings;
-struct _DisplayInfo
+struct _DisplayInfo
{
GdkDisplay *gdisplay;
Display *dpy;
@@ -196,7 +196,7 @@
Cursor move_cursor;
Cursor root_cursor;
Cursor resize_cursor[8];
-
+
Atom atoms[NB_ATOMS];
eventFilterSetup *xfilter;
@@ -216,11 +216,11 @@
Time last_user_time;
gboolean enable_compositor;
-#ifdef HAVE_RENDER
+#ifdef HAVE_RENDER
gint render_error_base;
gint render_event_base;
#endif
-#ifdef HAVE_RANDR
+#ifdef HAVE_RANDR
gint xrandr_error_base;
gint xrandr_event_base;
#endif
@@ -247,42 +247,42 @@
#endif /* HAVE_COMPOSITOR */
};
-DisplayInfo * myDisplayInit (GdkDisplay *);
+DisplayInfo * myDisplayInit (GdkDisplay *);
DisplayInfo * myDisplayClose (DisplayInfo *);
gboolean myDisplayHaveShape (DisplayInfo *);
gboolean myDisplayHaveRender (DisplayInfo *);
Cursor myDisplayGetCursorBusy (DisplayInfo *);
Cursor myDisplayGetCursorMove (DisplayInfo *);
Cursor myDisplayGetCursorRoot (DisplayInfo *);
-Cursor myDisplayGetCursorResize (DisplayInfo *,
+Cursor myDisplayGetCursorResize (DisplayInfo *,
guint);
void myDisplayGrabServer (DisplayInfo *);
void myDisplayUngrabServer (DisplayInfo *);
void myDisplayAddClient (DisplayInfo *,
Client *);
-void myDisplayRemoveClient (DisplayInfo *,
+void myDisplayRemoveClient (DisplayInfo *,
Client *);
-Client * myDisplayGetClientFromWindow (DisplayInfo *,
- Window,
+Client * myDisplayGetClientFromWindow (DisplayInfo *,
+ Window,
int);
-void myDisplayAddScreen (DisplayInfo *,
+void myDisplayAddScreen (DisplayInfo *,
ScreenInfo *);
-void myDisplayRemoveScreen (DisplayInfo *,
+void myDisplayRemoveScreen (DisplayInfo *,
ScreenInfo *);
-ScreenInfo * myDisplayGetScreenFromRoot (DisplayInfo *,
+ScreenInfo * myDisplayGetScreenFromRoot (DisplayInfo *,
Window);
-ScreenInfo * myDisplayGetScreenFromNum (DisplayInfo *,
+ScreenInfo * myDisplayGetScreenFromNum (DisplayInfo *,
int);
-Window myDisplayGetRootFromWindow (DisplayInfo *,
+Window myDisplayGetRootFromWindow (DisplayInfo *,
Window w);
-ScreenInfo * myDisplayGetScreenFromWindow (DisplayInfo *,
+ScreenInfo * myDisplayGetScreenFromWindow (DisplayInfo *,
Window w);
#ifdef ENABLE_KDE_SYSTRAY_PROXY
-ScreenInfo * myDisplayGetScreenFromSystray (DisplayInfo *,
+ScreenInfo * myDisplayGetScreenFromSystray (DisplayInfo *,
Window);
#endif
ScreenInfo * myDisplayGetDefaultScreen (DisplayInfo *);
-Time myDisplayUpdateCurrentTime (DisplayInfo *,
+Time myDisplayUpdateCurrentTime (DisplayInfo *,
XEvent *);
Time myDisplayGetCurrentTime (DisplayInfo *);
Time myDisplayGetLastUserTime (DisplayInfo *);
Modified: xfwm4/trunk/src/event_filter.c
===================================================================
--- xfwm4/trunk/src/event_filter.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/event_filter.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,23 +1,23 @@
/* $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.
-
+
xfwm4 - (c) 2002-2006 Olivier Fourdan
-
+
*/
-
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -208,10 +208,10 @@
Window xroot;
GdkWindow *event_win;
guint error;
-
+
g_return_val_if_fail (gscr, NULL);
g_return_val_if_fail (GDK_IS_SCREEN (gscr), NULL);
-
+
event_win = gdk_screen_get_root_window (gscr);
xroot = (Window) GDK_DRAWABLE_XID(event_win);
dpy = GDK_DRAWABLE_XDISPLAY(event_win);
@@ -221,17 +221,17 @@
XGetWindowAttributes (dpy, xroot, &attribs);
XSelectInput (dpy, xroot, attribs.your_event_mask | event_mask);
-
+
gdk_x11_ungrab_server ();
gdk_flush ();
-
+
error = gdk_error_trap_pop ();
if (error)
{
TRACE ("eventFilterAddWin error code: %i", error);
return (NULL);
}
-
+
return event_win;
}
@@ -239,7 +239,7 @@
eventFilterInit (gpointer data)
{
eventFilterSetup *setup;
-
+
setup = g_new0 (eventFilterSetup, 1);
setup->filterstack = NULL;
eventFilterPush (setup, default_event_filter, data);
Modified: xfwm4/trunk/src/event_filter.h
===================================================================
--- xfwm4/trunk/src/event_filter.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/event_filter.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,23 +1,23 @@
/* $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.
-
+
xfwm4 - (c) 2002-2006 Olivier Fourdan
-
+
*/
-
+
#ifndef __EVENT_FILTER_H__
#define __EVENT_FILTER_H__
Modified: xfwm4/trunk/src/events.c
===================================================================
--- xfwm4/trunk/src/events.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/events.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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-2006 Olivier Fourdan
-
+
*/
#ifdef HAVE_CONFIG_H
@@ -34,7 +34,7 @@
#ifdef HAVE_RANDR
#include <X11/extensions/Xrandr.h>
#endif
-#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util.h>
#include <string.h>
#include "misc.h"
@@ -68,7 +68,7 @@
PointerMotionMask | \
ButtonPressMask | \
ButtonReleaseMask)
-
+
#define MODIFIER_MASK (ShiftMask | \
ControlMask | \
AltMask | \
@@ -152,7 +152,7 @@
passdata->clicks++;
}
if (((XfwmButtonClickType) passdata->clicks == XFWM_BUTTON_DOUBLE_CLICK)
- || (!(passdata->allow_double_click) &&
+ || (!(passdata->allow_double_click) &&
(XfwmButtonClickType) passdata->clicks == XFWM_BUTTON_CLICK))
{
keep_going = FALSE;
@@ -178,7 +178,7 @@
status = EVENT_FILTER_CONTINUE;
}
- if ((ABS (passdata->x - passdata->xcurrent) > 1) ||
+ if ((ABS (passdata->x - passdata->xcurrent) > 1) ||
(ABS (passdata->y - passdata->ycurrent) > 1) ||
(!keep_going))
{
@@ -199,8 +199,8 @@
g_return_val_if_fail (screen_info != NULL, XFWM_BUTTON_UNDEFINED);
g_return_val_if_fail (ev != NULL, XFWM_BUTTON_UNDEFINED);
g_return_val_if_fail (w != None, XFWM_BUTTON_UNDEFINED);
-
- display_info = screen_info->display_info;
+
+ display_info = screen_info->display_info;
XFlush (display_info->dpy);
g = myScreenGrabPointer (screen_info, DBL_CLICK_GRAB, None, ev->xbutton.time);
@@ -221,8 +221,8 @@
passdata.ycurrent = passdata.y;
passdata.clicks = 1;
passdata.allow_double_click = allow_double_click;
- passdata.timeout = g_timeout_add_full (0, display_info->dbl_click_time,
- (GtkFunction) typeOfClick_break,
+ passdata.timeout = g_timeout_add_full (0, display_info->dbl_click_time,
+ (GtkFunction) typeOfClick_break,
(gpointer) &passdata, NULL);
TRACE ("entering typeOfClick loop");
@@ -241,7 +241,7 @@
check_button_time (XButtonEvent *ev)
{
static Time last_button_time = (Time) 0;
-
+
if (last_button_time > ev->time)
{
return FALSE;
@@ -251,7 +251,7 @@
return TRUE;
}
#endif
-
+
static void
clear_timeout (void)
{
@@ -271,7 +271,7 @@
clear_timeout ();
c = clientGetFocus ();
-
+
if (c)
{
clientRaise (c, None);
@@ -320,9 +320,9 @@
toggle_show_desktop (ScreenInfo *screen_info)
{
screen_info->show_desktop = !screen_info->show_desktop;
- setHint (screen_info->display_info, screen_info->xroot, NET_SHOWING_DESKTOP,
+ setHint (screen_info->display_info, screen_info->xroot, NET_SHOWING_DESKTOP,
screen_info->show_desktop);
- sendRootMessage (screen_info, NET_SHOWING_DESKTOP, screen_info->show_desktop,
+ sendRootMessage (screen_info, NET_SHOWING_DESKTOP, screen_info->show_desktop,
myDisplayGetCurrentTime (screen_info->display_info));
}
@@ -336,7 +336,7 @@
getKeyPressed (ScreenInfo *screen_info, XKeyEvent * ev)
{
int key, state;
-
+
state = ev->state & MODIFIER_MASK;
for (key = 0; key < KEY_COUNT; key++)
{
@@ -346,7 +346,7 @@
break;
}
}
-
+
return key;
}
@@ -469,7 +469,7 @@
{
return;
}
-
+
key = getKeyPressed (screen_info, ev);
switch (key)
{
@@ -489,8 +489,8 @@
break;
}
}
- /*
- Here we know that "screen_info" is defined, otherwise, we would
+ /*
+ Here we know that "screen_info" is defined, otherwise, we would
already have returned...
*/
switch (key)
@@ -742,7 +742,7 @@
return;
}
lastscroll = ev->time;
-
+
/* Get the screen structure from the root of the event */
screen_info = myDisplayGetScreenFromRoot (display_info, ev->root);
if (!screen_info)
@@ -973,7 +973,7 @@
{
clientSetFocus (screen_info, c, ev->time, NO_FOCUS_FLAG);
}
- if ((screen_info->params->raise_on_click) ||
+ if ((screen_info->params->raise_on_click) ||
!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER))
{
/* Clear timeout */
@@ -996,7 +996,7 @@
return;
}
- /*
+ /*
The event did not occur in one of our known good client...
Get the screen structure from the root of the event.
*/
@@ -1005,7 +1005,7 @@
{
return;
}
-
+
if ((ev->window == screen_info->xroot) && (screen_info->params->scroll_workspaces)
&& ((ev->button == Button4) || (ev->button == Button5)))
{
@@ -1144,7 +1144,7 @@
TRACE ("entering handleUnmapNotify");
TRACE ("UnmapNotify on window (0x%lx)", ev->window);
-
+
if (ev->from_configure)
{
TRACE ("Ignoring UnmapNotify caused by parent's resize");
@@ -1166,9 +1166,9 @@
if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MAP_PENDING))
{
- /*
+ /*
* This UnmapNotify event is caused by reparenting
- * so we just ignore it, so the window won't return
+ * so we just ignore it, so the window won't return
* to withdrawn state by mistake.
*/
TRACE ("Client \"%s\" is not mapped, event ignored", c->name);
@@ -1179,8 +1179,8 @@
/*
* ICCCM spec states that a client wishing to switch
- * to WithdrawnState should send a synthetic UnmapNotify
- * with the event field set to root if the client window
+ * to WithdrawnState should send a synthetic UnmapNotify
+ * with the event field set to root if the client window
* is already unmapped.
* Therefore, bypass the ignore_unmap counter and
* unframe the client.
@@ -1196,12 +1196,12 @@
if (c->ignore_unmap)
{
c->ignore_unmap--;
- TRACE ("ignore_unmap for \"%s\" is now %i",
+ TRACE ("ignore_unmap for \"%s\" is now %i",
c->name, c->ignore_unmap);
}
else
{
- TRACE ("unmapping \"%s\" as ignore_unmap is %i",
+ TRACE ("unmapping \"%s\" as ignore_unmap is %i",
c->name, c->ignore_unmap);
clientPassFocus (screen_info, c, c);
clientUnframe (c, FALSE);
@@ -1214,11 +1214,11 @@
{
ScreenInfo *screen_info;
DisplayInfo *display_info;
-
+
screen_info = (ScreenInfo *) data;
display_info = screen_info->display_info;
- setNetWorkarea (display_info, screen_info->xroot, screen_info->workspace_count,
+ setNetWorkarea (display_info, screen_info->xroot, screen_info->workspace_count,
screen_info->width, screen_info->height, screen_info->margins);
placeSidewalks (screen_info, screen_info->params->wrap_workspaces);
clientScreenResize (screen_info);
@@ -1238,7 +1238,7 @@
{
return;
}
-
+
if (display_info->have_xrandr)
{
#ifdef HAVE_RANDR
@@ -1255,10 +1255,10 @@
screen_info->width = WidthOfScreen (screen_info->xscreen);
screen_info->height = HeightOfScreen (screen_info->xscreen);
- /*
+ /*
We need to use an idle function to update our screen layout to give gdk the
- time to update its internal structures for Xinerama and monitor size,
- otherwise the functions gdk_screen_get_monitor_geometry () don't return
+ time to update its internal structures for Xinerama and monitor size,
+ otherwise the functions gdk_screen_get_monitor_geometry () don't return
accurate values...
*/
g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, update_screen_idle_cb, screen_info, NULL);
@@ -1387,7 +1387,7 @@
/* Let's say that if the client performs a XRaiseWindow, we show the window if hidden */
if ((ev->value_mask & CWStackMode) && (wc.stack_mode == Above))
{
- if ((c->win_workspace == screen_info->current_ws) ||
+ if ((c->win_workspace == screen_info->current_ws) ||
(FLAG_TEST (c->flags, CLIENT_FLAG_STICKY)))
{
if (FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED))
@@ -1431,7 +1431,7 @@
if (c)
{
screen_info = c->screen_info;
-
+
if (!(screen_info->params->click_to_focus) && clientAcceptFocus (c))
{
TRACE ("EnterNotify window is \"%s\"", c->name);
@@ -1440,11 +1440,11 @@
clientSetFocus (c->screen_info, c, ev->time, NO_FOCUS_FLAG);
}
}
-
+
/* No need to process the event any further */
return;
}
-
+
/* The event was not for a client window */
if (display_info->nb_screens > 1)
@@ -1452,7 +1452,7 @@
/* Wrap workspace/wrap windows is disabled with multiscreen */
return;
}
-
+
/* Get the screen structure from the root of the event */
screen_info = myDisplayGetScreenFromRoot (display_info, ev->root);
@@ -1460,7 +1460,7 @@
{
return;
}
-
+
if (screen_info->workspace_count && screen_info->params->wrap_workspaces
&& screen_info->params->wrap_resistance)
{
@@ -1485,7 +1485,7 @@
{
edge_scroll_x++;
}
- if (msx == 0)
+ if (msx == 0)
{
rx = 1;
}
@@ -1506,7 +1506,7 @@
{
edge_scroll_y++;
}
- if (msy == 0)
+ if (msy == 0)
{
ry = 1;
}
@@ -1575,8 +1575,8 @@
{
ScreenInfo *screen_info;
Client *c, *last_raised;
-
+
TRACE ("entering handleFocusIn");
TRACE ("handleFocusIn (0x%lx) mode = %s",
ev->window,
@@ -1612,7 +1612,7 @@
screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
last_raised = NULL;
- if (screen_info && (ev->window == screen_info->xroot) && (ev->mode == NotifyNormal) &&
+ if (screen_info && (ev->window == screen_info->xroot) && (ev->mode == NotifyNormal) &&
((ev->detail == NotifyDetailNone) || (ev->detail == NotifyInferior)))
{
/* Handle focus transition to root (means that an unknown
@@ -1625,7 +1625,7 @@
}
return;
}
-
+
if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab) ||
(ev->detail > NotifyNonlinearVirtual))
{
@@ -1641,8 +1641,8 @@
screen_info = c->screen_info;
clientUpdateFocus (screen_info, c, FOCUS_SORT);
last_raised = clientGetLastRaise (screen_info);
- if ((screen_info->params->click_to_focus) &&
- (screen_info->params->raise_on_click) &&
+ if ((screen_info->params->click_to_focus) &&
+ (screen_info->params->raise_on_click) &&
(last_raised != NULL) && (c != last_raised))
{
clientRaise (c, None);
@@ -1658,7 +1658,7 @@
handleFocusOut (DisplayInfo *display_info, XFocusChangeEvent * ev)
{
Client *c;
-
+
TRACE ("entering handleFocusOut");
TRACE ("handleFocusOut (0x%lx) mode = %s",
ev->window,
@@ -1687,7 +1687,7 @@
"NotifyDetailNone" :
"(unknown)");
if ((ev->mode == NotifyNormal)
- && ((ev->detail == NotifyNonlinear)
+ && ((ev->detail == NotifyNonlinear)
|| (ev->detail == NotifyNonlinearVirtual)))
{
c = myDisplayGetClientFromWindow (display_info, ev->window, ANY);
@@ -1720,8 +1720,8 @@
TRACE ("client \"%s\" (0x%lx) has received a XA_WM_NORMAL_HINTS notify", c->name, c->window);
clientGetWMNormalHints (c, TRUE);
}
- else if ((ev->atom == XA_WM_NAME) ||
- (ev->atom == display_info->atoms[NET_WM_NAME]) ||
+ else if ((ev->atom == XA_WM_NAME) ||
+ (ev->atom == display_info->atoms[NET_WM_NAME]) ||
(ev->atom == display_info->atoms[WM_CLIENT_MACHINE]))
{
TRACE ("client \"%s\" (0x%lx) has received a XA_WM_NAME/NET_WM_NAME/WM_CLIENT_MACHINE notify", c->name, c->window);
@@ -1792,7 +1792,7 @@
clientGetNetWmType (c);
frameDraw (c, TRUE);
}
- else if ((ev->atom == display_info->atoms[NET_WM_STRUT]) ||
+ else if ((ev->atom == display_info->atoms[NET_WM_STRUT]) ||
(ev->atom == display_info->atoms[NET_WM_STRUT_PARTIAL]))
{
TRACE ("client \"%s\" (0x%lx) has received a net_wm_strut notify", c->name, c->window);
@@ -1850,7 +1850,7 @@
#endif
return;
}
-
+
screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
if (!screen_info)
{
@@ -1896,7 +1896,7 @@
{
screen_info = c->screen_info;
is_transient = clientIsValidTransientOrModal (c);
-
+
if ((ev->message_type == display_info->atoms[WM_CHANGE_STATE]) && (ev->format == 32) && (ev->data.l[0] == IconicState))
{
TRACE ("client \"%s\" (0x%lx) has received a wm_change_state event", c->name, c->window);
@@ -2005,7 +2005,7 @@
{
TRACE ("client \"%s\" (0x%lx) has received a net_request_frame_extents event", c->name, c->window);
setNetFrameExtents (display_info, c->window, frameTop (c), frameLeft (c),
- frameRight (c), frameBottom (c));
+ frameRight (c), frameBottom (c));
}
}
else
@@ -2015,8 +2015,8 @@
{
return;
}
-
- if (((ev->message_type == display_info->atoms[WIN_WORKSPACE]) ||
+
+ if (((ev->message_type == display_info->atoms[WIN_WORKSPACE]) ||
(ev->message_type == display_info->atoms[NET_CURRENT_DESKTOP])) && (ev->format == 32))
{
TRACE ("root has received a win_workspace or a net_current_desktop event %li", ev->data.l[0]);
@@ -2025,7 +2025,7 @@
workspaceSwitch (screen_info, ev->data.l[0], NULL, TRUE);
}
}
- else if (((ev->message_type == display_info->atoms[WIN_WORKSPACE_COUNT]) ||
+ else if (((ev->message_type == display_info->atoms[WIN_WORKSPACE_COUNT]) ||
(ev->message_type == display_info->atoms[NET_NUMBER_OF_DESKTOPS])) && (ev->format == 32))
{
TRACE ("root has received a win_workspace_count event");
@@ -2053,7 +2053,7 @@
{
TRACE ("window (0x%lx) has received a net_request_frame_extents event", ev->window);
/* Size estimate from the decoration extents */
- setNetFrameExtents (display_info, ev->window,
+ setNetFrameExtents (display_info, ev->window,
frameDecorationTop (screen_info),
frameDecorationLeft (screen_info),
frameDecorationRight (screen_info),
@@ -2246,7 +2246,7 @@
DisplayInfo *display_info;
display_info = (DisplayInfo *) data;
-
+
TRACE ("entering xfwm4_event_filter");
handleEvent (display_info, xevent);
TRACE ("leaving xfwm4_event_filter");
@@ -2359,7 +2359,7 @@
Client *c;
gint x;
gint y;
-
+
TRACE ("entering show_popup_cb");
x = ev->x_root;
@@ -2437,7 +2437,7 @@
insensitive |= MENU_OP_STICK;
}
}
-
+
/* KDE extension */
clientGetWMProtocols(c);
if (FLAG_TEST (c->wm_flags, WM_FLAG_CONTEXT_HELP))
@@ -2448,7 +2448,7 @@
if (FLAG_TEST(c->flags, CLIENT_FLAG_ABOVE))
{
ops |= MENU_OP_NORMAL;
- if (clientIsValidTransientOrModal (c) ||
+ if (clientIsValidTransientOrModal (c) ||
FLAG_TEST (c->flags, CLIENT_FLAG_BELOW | CLIENT_FLAG_FULLSCREEN))
{
insensitive |= MENU_OP_NORMAL;
@@ -2457,7 +2457,7 @@
else
{
ops |= MENU_OP_ABOVE;
- if (clientIsValidTransientOrModal (c) ||
+ if (clientIsValidTransientOrModal (c) ||
FLAG_TEST (c->flags, CLIENT_FLAG_BELOW | CLIENT_FLAG_FULLSCREEN))
{
insensitive |= MENU_OP_ABOVE;
@@ -2475,11 +2475,11 @@
{
return (TRUE);
}
-
+
/* c is not null here */
screen_info = c->screen_info;
display_info = screen_info->display_info;
-
+
if (screen_info->button_handler_id)
{
g_signal_handler_disconnect (GTK_OBJECT (myScreenGetGtkWidget (screen_info)), screen_info->button_handler_id);
@@ -2502,16 +2502,16 @@
Don't forget to delete that window once the menu is closed, though, or we'll get in
trouble.
*/
- xfwmWindowTemp (screen_info,
+ xfwmWindowTemp (screen_info,
NULL, 0,
screen_info->xroot,
- &menu_event_window, 0, 0,
+ &menu_event_window, 0, 0,
screen_info->width,
- screen_info->height,
+ screen_info->height,
NoEventMask,
FALSE);
- menu = menu_default (screen_info->gscr, c->window, ops, insensitive, menu_callback,
- c->win_workspace, screen_info->workspace_count,
+ menu = menu_default (screen_info->gscr, c->window, ops, insensitive, menu_callback,
+ c->win_workspace, screen_info->workspace_count,
screen_info->workspace_names, screen_info->workspace_names_items,
display_info->xfilter, screen_info);
@@ -2531,7 +2531,7 @@
set_reload (GObject * obj, GdkEvent * ev, gpointer data)
{
DisplayInfo *display_info;
-
+
TRACE ("setting reload flag so all prefs will be reread at next event loop");
display_info = (DisplayInfo *) data;
@@ -2580,7 +2580,7 @@
{
GtkSettings *settings;
- screen_info->button_handler_id =
+ screen_info->button_handler_id =
g_signal_connect (GTK_OBJECT (myScreenGetGtkWidget (screen_info)),
"button_press_event", GTK_SIGNAL_FUNC (show_popup_cb), (gpointer) NULL);
g_signal_connect (GTK_OBJECT (myScreenGetGtkWidget (screen_info)), "client_event",
Modified: xfwm4/trunk/src/events.h
===================================================================
--- xfwm4/trunk/src/events.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/events.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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-2006 Olivier Fourdan
-
+
*/
#ifndef INC_EVENTS_H
Modified: xfwm4/trunk/src/focus.c
===================================================================
--- xfwm4/trunk/src/focus.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/focus.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -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-2006 Olivier Fourdan
-
+
*/
-
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -32,7 +32,7 @@
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
-#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util.h>
#include "screen.h"
#include "focus.h"
@@ -76,7 +76,7 @@
{
continue;
}
-
+
if (!exclude || (c != exclude))
{
if ((c->win_layer <= layer) && FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
@@ -107,14 +107,14 @@
top_client = clientGetTopMostFocusable (screen_info, layer, NULL);
if (top_client.prefered)
{
- clientSetFocus (screen_info, top_client.prefered,
- myDisplayGetCurrentTime (screen_info->display_info),
+ clientSetFocus (screen_info, top_client.prefered,
+ myDisplayGetCurrentTime (screen_info->display_info),
NO_FOCUS_FLAG);
}
else
{
- clientSetFocus (screen_info, top_client.highest,
- myDisplayGetCurrentTime (screen_info->display_info),
+ clientSetFocus (screen_info, top_client.highest,
+ myDisplayGetCurrentTime (screen_info->display_info),
NO_FOCUS_FLAG);
}
}
@@ -129,13 +129,13 @@
gboolean prevented;
g_return_val_if_fail (c != NULL, FALSE);
-
+
screen_info = c->screen_info;
display_info = screen_info->display_info;
give_focus = (c-> type & WINDOW_REGULAR_FOCUSABLE) && (screen_info->params->focus_new);
prevent_focus_stealing = screen_info->params->prevent_focus_stealing;
prevented = FALSE;
-
+
/* Try to avoid focus stealing */
if (!clientAcceptFocus (c) || (c->type & WINDOW_TYPE_DONT_FOCUS))
{
@@ -169,11 +169,11 @@
}
clientRaise (c, None);
clientShow (c, TRUE);
- clientSetFocus (screen_info, c,
+ clientSetFocus (screen_info, c,
#if 0
- myDisplayGetCurrentTime (display_info),
+ myDisplayGetCurrentTime (display_info),
#else
- CurrentTime,
+ CurrentTime,
#endif
FOCUS_IGNORE_MODAL);
}
@@ -206,10 +206,9 @@
gboolean
clientSelectMask (Client * c, int mask, int type)
{
+ g_return_val_if_fail (c != NULL, FALSE);
TRACE ("entering clientSelectMask");
- g_return_val_if_fail (c != NULL, FALSE);
-
if ((!clientAcceptFocus (c)) && !(mask & INCLUDE_SKIP_FOCUS))
{
return FALSE;
@@ -331,7 +330,7 @@
{
/* 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
+ for group, so it safe to use clientGetTransient because
it's really what we want...
*/
c2 = clientGetTransient (c);
@@ -362,11 +361,11 @@
{
new_focus = top_most.prefered ? top_most.prefered : top_most.highest;
}
- clientSetFocus (screen_info, new_focus,
+ clientSetFocus (screen_info, new_focus,
#if 0
- myDisplayGetCurrentTime (screen_info->display_info),
+ myDisplayGetCurrentTime (screen_info->display_info),
#else
- CurrentTime,
+ CurrentTime,
#endif
FOCUS_IGNORE_MODAL | FOCUS_FORCE);
}
@@ -375,20 +374,19 @@
clientAcceptFocus (Client * c)
{
g_return_val_if_fail (c != NULL, FALSE);
-
TRACE ("entering clientAcceptFocus");
/* Modal dialogs *always* accept focus */
if (FLAG_TEST(c->flags, CLIENT_FLAG_STATE_MODAL))
{
- return TRUE;
+ return TRUE;
}
/* First check GNOME protocol */
if (c->win_hints & WIN_HINTS_SKIP_FOCUS)
{
return FALSE;
}
- if ((c->screen_info->params->focus_hint)
+ if ((c->screen_info->params->focus_hint)
&& !FLAG_TEST (c->wm_flags, WM_FLAG_INPUT | WM_FLAG_TAKEFOCUS))
{
return FALSE;
@@ -401,12 +399,12 @@
clientSortRing(Client *c)
{
ScreenInfo *screen_info;
-
+
g_return_if_fail (c != NULL);
+ TRACE ("Sorting...");
- TRACE ("Sorting...");
screen_info = c->screen_info;
- if ((screen_info->client_count > 2) && (c != screen_info->clients))
+ if ((screen_info->client_count > 2) && (c != screen_info->clients))
{
c->prev->next = c->next;
c->next->prev = c->prev;
@@ -443,7 +441,7 @@
return;
}
- /*
+ /*
We can release the button mouse grab if we don't raise on click or if the focused window
is the one that has been raised at last.
*/
@@ -478,7 +476,7 @@
frameDraw (c2, FALSE);
}
data[1] = None;
- XChangeProperty (display_info->dpy, screen_info->xroot,
+ XChangeProperty (display_info->dpy, screen_info->xroot,
display_info->atoms[NET_ACTIVE_WINDOW], XA_WINDOW, 32,
PropModeReplace, (unsigned char *) data, 2);
@@ -492,7 +490,7 @@
Client *c2;
TRACE ("entering clientSetFocus");
-
+
display_info = screen_info->display_info;
c2 = NULL;
if ((c) && !(flags & FOCUS_IGNORE_MODAL))
@@ -518,7 +516,7 @@
TRACE ("client \"%s\" (0x%lx) is already focused, ignoring request",
c->name, c->window);
return;
- }
+ }
if (!clientAcceptFocus (c))
{
TRACE ("SKIP_FOCUS set for client \"%s\" (0x%lx)", c->name, c->window);
@@ -527,7 +525,7 @@
if (FLAG_TEST (c->wm_flags, WM_FLAG_INPUT) || !(screen_info->params->focus_hint))
{
pending_focus = c;
- /*
+ /*
* When shaded, the client window is unmapped, so it can not be focused.
* Instead, we focus the frame that is still mapped.
*/
@@ -549,9 +547,9 @@
else
{
unsigned long data[2];
-
+
TRACE ("setting focus to none");
-
+
data[0] = data[1] = None;
client_focus = NULL;
if (c2)
@@ -567,6 +565,35 @@
}
}
+void
+clientInitFocusFlag (Client * c)
+{
+ ScreenInfo *screen_info;
+ Client *c2;
+ GList *index;
+ int workspace;
+
+ g_return_if_fail (c != NULL);
+ TRACE ("entering clientSetFocus");
+
+ if (!clientAcceptFocus (c) || (c->type & WINDOW_TYPE_DONT_FOCUS))
+ {
+ return;
+ }
+
+ screen_info = c->screen_info;
+ workspace = c->win_workspace;
+ for (index = screen_info->windows_stack; index; index = g_list_next (index))
+ {
+ c2 = (Client *) index->data;
+ if ((c2->win_workspace == workspace) && FLAG_TEST (c2->xfwm_flags, XFWM_FLAG_FOCUS))
+ {
+ FLAG_UNSET (c2->xfwm_flags, XFWM_FLAG_FOCUS);
+ }
+ }
+ FLAG_SET (c->xfwm_flags, XFWM_FLAG_FOCUS);
+}
+
Client *
clientGetFocus (void)
{
@@ -583,7 +610,7 @@
clientGrabMouseButton (Client * c)
{
ScreenInfo *screen_info;
-
+
g_return_if_fail (c != NULL);
TRACE ("entering clientGrabMouseButton");
TRACE ("grabbing buttons for client \"%s\" (0x%lx)", c->name, c->window);
@@ -603,7 +630,7 @@
clientUngrabMouseButton (Client * c)
{
ScreenInfo *screen_info;
-
+
g_return_if_fail (c != NULL);
TRACE ("entering clientUngrabMouseButton");
TRACE ("ungrabing buttons for client \"%s\" (0x%lx)", c->name, c->window);
@@ -619,7 +646,7 @@
{
Client *c;
int i;
-
+
g_return_if_fail (screen_info != NULL);
TRACE ("entering clientGrabMouseButtonForAll");
@@ -635,7 +662,7 @@
{
Client *c;
int i;
-
+
g_return_if_fail (screen_info != NULL);
TRACE ("entering clientUngrabMouseButtonForAll");
Modified: xfwm4/trunk/src/focus.h
===================================================================
--- xfwm4/trunk/src/focus.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/focus.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,21 +1,21 @@
/* $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.
-
+
xfwm4 - (c) 2002-2006 Olivier Fourdan
-
+
*/
#ifndef INC_FOCUS_H
@@ -45,6 +45,7 @@
void clientSortRing(Client *);
void clientUpdateFocus (ScreenInfo *, Client *, unsigned short);
void clientSetFocus (ScreenInfo *, Client *, Time, unsigned short);
+void clientInitFocusFlag (Client *);
void clientClearFocus (void);
Client *clientGetFocus (void);
void clientGrabMouseButton (Client *);
Modified: xfwm4/trunk/src/frame.c
===================================================================
--- xfwm4/trunk/src/frame.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/frame.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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-2006 Olivier Fourdan
-
+
*/
#ifdef HAVE_CONFIG_H
@@ -27,7 +27,7 @@
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <pango/pango.h>
-#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util.h>
#include "screen.h"
#include "client.h"
@@ -187,7 +187,7 @@
TRACE ("entering frameHeight");
g_return_val_if_fail (c != NULL, 0);
- if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER)
+ if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER)
&& FLAG_TEST (c->flags, CLIENT_FLAG_SHADED)
&& !FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
{
@@ -372,11 +372,11 @@
if (w1 > 0)
{
- xfwmPixmapFill (&screen_info->title[TITLE_1][state], pm, 0, 0, w1, frameTop (c));
+ xfwmPixmapFill (&screen_info->title[TITLE_1][state], pm, 0, 0, w1, frameTop (c));
x = x + w1;
}
- xfwmPixmapFill (&screen_info->title[TITLE_2][state], pm, x, 0, w2, frameTop (c));
+ xfwmPixmapFill (&screen_info->title[TITLE_2][state], pm, x, 0, w2, frameTop (c));
x = x + w2;
if (w3 > 0)
@@ -389,7 +389,7 @@
{
voffset = screen_info->params->title_vertical_offset_inactive;
}
- xfwmPixmapFill (&screen_info->title[TITLE_3][state], pm, x, 0, w3, frameTop (c));
+ xfwmPixmapFill (&screen_info->title[TITLE_3][state], pm, x, 0, w3, frameTop (c));
title_x = hoffset + x;
title_y = voffset + (frameTop (c) - logical_rect.height) / 2;
if (title_y + logical_rect.height > frameTop (c))
@@ -404,7 +404,7 @@
{
gdk_draw_layout (gpixmap, gc, title_x + 1, title_y + 1, layout);
}
- else
+ else
{
gdk_draw_layout (gpixmap, gc, title_x - 1, title_y, layout);
gdk_draw_layout (gpixmap, gc, title_x, title_y - 1, layout);
@@ -422,12 +422,12 @@
{
x = right - w4;
}
- xfwmPixmapFill (&screen_info->title[TITLE_4][state], pm, x, 0, w4, frameTop (c));
+ xfwmPixmapFill (&screen_info->title[TITLE_4][state], pm, x, 0, w4, frameTop (c));
x = x + w4;
if (w5 > 0)
{
- xfwmPixmapFill (&screen_info->title[TITLE_5][state], pm, x, 0, w5, frameTop (c));
+ xfwmPixmapFill (&screen_info->title[TITLE_5][state], pm, x, 0, w5, frameTop (c));
}
g_object_unref (G_OBJECT (gc));
g_object_unref (G_OBJECT (gpixmap));
@@ -644,7 +644,7 @@
if (xfwmWindowVisible (&c->corners[CORNER_BOTTOM_LEFT]))
{
- XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_BOTTOM_LEFT]),
+ XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_BOTTOM_LEFT]),
ShapeBounding, 0, 0, screen_info->corners[CORNER_BOTTOM_LEFT][state].mask, ShapeSet);
}
@@ -656,13 +656,13 @@
if (xfwmWindowVisible (&c->corners[CORNER_TOP_LEFT]))
{
- XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_TOP_LEFT]),
+ XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_TOP_LEFT]),
ShapeBounding, 0, 0, screen_info->corners[CORNER_TOP_LEFT][state].mask, ShapeSet);
}
if (xfwmWindowVisible (&c->corners[CORNER_TOP_RIGHT]))
{
- XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_TOP_RIGHT]),
+ XShapeCombineMask (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_TOP_RIGHT]),
ShapeBounding, 0, 0, screen_info->corners[CORNER_TOP_RIGHT][state].mask, ShapeSet);
}
@@ -684,7 +684,7 @@
rect.width = frameTopLeftWidth (c, state);
rect.height = screen_info->corners[CORNER_TOP_LEFT][state].height
- (frameHeight (c) - frameBottom (c) + 1);
- XShapeCombineRectangles (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_TOP_LEFT]),
+ XShapeCombineRectangles (display_info->dpy, MYWINDOW_XWINDOW (c->corners[CORNER_TOP_LEFT]),
ShapeBounding, 0, 0, &rect, 1, ShapeSubtract, 0);
}
@@ -782,7 +782,7 @@
frameWidth (c) - frameTopRightWidth (c, state),
0, MYWINDOW_XWINDOW (c->corners[CORNER_TOP_RIGHT]), ShapeBounding, ShapeUnion);
}
-
+
for (i = 0; i < BUTTON_COUNT; i++)
{
if (xfwmWindowVisible (&c->buttons[i]))
@@ -848,7 +848,7 @@
}
}
- if ((state == INACTIVE)
+ if ((state == INACTIVE)
&& FLAG_TEST(c->xfwm_flags, XFWM_FLAG_DRAW_ACTIVE | XFWM_FLAG_FIRST_MAP))
{
requires_clearing = TRUE;
@@ -997,13 +997,13 @@
/* Corners are never resized, we need to update them separately */
if (requires_clearing)
{
- xfwmWindowSetBG (&c->corners[CORNER_TOP_LEFT],
+ xfwmWindowSetBG (&c->corners[CORNER_TOP_LEFT],
&screen_info->corners[CORNER_TOP_LEFT][state]);
- xfwmWindowSetBG (&c->corners[CORNER_TOP_RIGHT],
+ xfwmWindowSetBG (&c->corners[CORNER_TOP_RIGHT],
&screen_info->corners[CORNER_TOP_RIGHT][state]);
- xfwmWindowSetBG (&c->corners[CORNER_BOTTOM_LEFT],
+ xfwmWindowSetBG (&c->corners[CORNER_BOTTOM_LEFT],
&screen_info->corners[CORNER_BOTTOM_LEFT][state]);
- xfwmWindowSetBG (&c->corners[CORNER_BOTTOM_RIGHT],
+ xfwmWindowSetBG (&c->corners[CORNER_BOTTOM_RIGHT],
&screen_info->corners[CORNER_BOTTOM_RIGHT][state]);
}
@@ -1029,20 +1029,20 @@
{
xfwmPixmapCreate (screen_info, &frame_pix.pm_sides[SIDE_LEFT],
frameLeft (c), left_height);
- xfwmPixmapFill (&screen_info->sides[SIDE_LEFT][state],
+ xfwmPixmapFill (&screen_info->sides[SIDE_LEFT][state],
&frame_pix.pm_sides[SIDE_LEFT],
- 0, 0, frameLeft (c), left_height);
- xfwmWindowSetBG (&c->sides[SIDE_LEFT],
+ 0, 0, frameLeft (c), left_height);
+ xfwmWindowSetBG (&c->sides[SIDE_LEFT],
&frame_pix.pm_sides[SIDE_LEFT]);
xfwmWindowShow (&c->sides[SIDE_LEFT], 0, frameTop (c),
frameLeft (c), left_height, (requires_clearing | height_changed));
xfwmPixmapCreate (screen_info, &frame_pix.pm_sides[SIDE_RIGHT],
frameRight (c), right_height);
- xfwmPixmapFill (&screen_info->sides[SIDE_RIGHT][state],
- &frame_pix.pm_sides[SIDE_RIGHT],
- 0, 0, frameRight (c), right_height);
- xfwmWindowSetBG (&c->sides[SIDE_RIGHT],
+ xfwmPixmapFill (&screen_info->sides[SIDE_RIGHT][state],
+ &frame_pix.pm_sides[SIDE_RIGHT],
+ 0, 0, frameRight (c), right_height);
+ xfwmWindowSetBG (&c->sides[SIDE_RIGHT],
&frame_pix.pm_sides[SIDE_RIGHT]);
xfwmWindowShow (&c->sides[SIDE_RIGHT],
frameWidth (c) - frameRight (c), frameTop (c), frameRight (c),
@@ -1051,10 +1051,10 @@
xfwmPixmapCreate (screen_info, &frame_pix.pm_sides[SIDE_BOTTOM],
bottom_width, frameBottom (c));
- xfwmPixmapFill (&screen_info->sides[SIDE_BOTTOM][state],
- &frame_pix.pm_sides[SIDE_BOTTOM],
+ xfwmPixmapFill (&screen_info->sides[SIDE_BOTTOM][state],
+ &frame_pix.pm_sides[SIDE_BOTTOM],
0, 0, bottom_width, frameBottom (c));
- xfwmWindowSetBG (&c->sides[SIDE_BOTTOM],
+ xfwmWindowSetBG (&c->sides[SIDE_BOTTOM],
&frame_pix.pm_sides[SIDE_BOTTOM]);
xfwmWindowShow (&c->sides[SIDE_BOTTOM],
screen_info->corners[CORNER_BOTTOM_LEFT][state].width,
Modified: xfwm4/trunk/src/frame.h
===================================================================
--- xfwm4/trunk/src/frame.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/frame.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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-2006 Olivier Fourdan
-
+
*/
#ifndef INC_FRAME_H
Modified: xfwm4/trunk/src/hints.c
===================================================================
--- xfwm4/trunk/src/hints.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/hints.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,23 +1,23 @@
/* $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
Metacity - (c) 2001 Havoc Pennington
xfwm4 - (c) 2002-2006 Olivier Fourdan
-
+
*/
#ifdef HAVE_CONFIG_H
@@ -35,7 +35,7 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util.h>
#include "display.h"
#include "hints.h"
@@ -73,7 +73,7 @@
create_name_with_host (DisplayInfo *display_info, const gchar *name, const gchar *hostname)
{
gchar *title;
-
+
if (strlen (hostname) && (display_info->hostname) && (g_strcasecmp (display_info->hostname, hostname)))
{
/* TRANSLATORS: "(on %s)" is like "running on" the name of the other host */
@@ -81,7 +81,7 @@
}
else
{
- title = g_strdup (name);
+ title = g_strdup (name);
}
return title;
@@ -100,7 +100,7 @@
data = NULL;
state = WithdrawnState;
- if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[WM_STATE],
+ if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[WM_STATE],
0, 3L, FALSE, display_info->atoms[WM_STATE],
&real_type, &real_format, &items_read, &items_left,
(unsigned char **) &data) == Success) && (items_read))
@@ -124,7 +124,7 @@
data[0] = state;
data[1] = None;
- XChangeProperty (display_info->dpy, w, display_info->atoms[WM_STATE],
+ XChangeProperty (display_info->dpy, w, display_info->atoms[WM_STATE],
display_info->atoms[WM_STATE], 32, PropModeReplace,
(unsigned char *) data, 2);
}
@@ -142,16 +142,16 @@
data = NULL;
result = NULL;
- if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[MOTIF_WM_HINTS], 0L, MWM_HINTS_ELEMENTS,
+ if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[MOTIF_WM_HINTS], 0L, MWM_HINTS_ELEMENTS,
FALSE, display_info->atoms[MOTIF_WM_HINTS], &real_type, &real_format, &items_read,
&items_left, (unsigned char **) &data) == Success))
{
if (items_read >= MWM_HINTS_ELEMENTS)
- {
+ {
result = g_new0(PropMwmHints, 1);
memcpy (result, data, sizeof (PropMwmHints));
}
- if (data)
+ if (data)
{
XFree (data);
}
@@ -245,12 +245,12 @@
*value = 0;
data = NULL;
- if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[atom_id], 0L, 1L,
+ if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[atom_id], 0L, 1L,
FALSE, XA_CARDINAL, &real_type, &real_format, &items_read, &items_left,
(unsigned char **) &data) == Success) && (items_read))
{
*value = *((long *) data);
- if (data)
+ if (data)
{
XFree (data);
}
@@ -265,7 +265,7 @@
g_return_if_fail ((atom_id >= 0) && (atom_id < NB_ATOMS));
TRACE ("entering setHint");
- XChangeProperty (display_info->dpy, w, display_info->atoms[atom_id], XA_CARDINAL,
+ XChangeProperty (display_info->dpy, w, display_info->atoms[atom_id], XA_CARDINAL,
32, PropModeReplace, (unsigned char *) &value, 1);
}
@@ -299,16 +299,16 @@
rows = (unsigned long) *ptr++;
start = (items_read >= 4) ? (unsigned long) *ptr++ : NET_WM_TOPLEFT;
- if (orientation > NET_WM_ORIENTATION_VERT)
+ if (orientation > NET_WM_ORIENTATION_VERT)
{
break;
}
-
+
if (start > NET_WM_BOTTOMLEFT)
{
break;
}
-
+
if ((rows == 0) && (cols == 0))
{
break;
@@ -458,9 +458,9 @@
#endif
data[0] = check_win;
- XChangeProperty (display_info->dpy, root, display_info->atoms[NET_SUPPORTED],
+ XChangeProperty (display_info->dpy, root, display_info->atoms[NET_SUPPORTED],
XA_ATOM, 32, PropModeReplace, (unsigned char *) atoms, i);
- XChangeProperty (display_info->dpy, check_win, display_info->atoms[NET_SUPPORTING_WM_CHECK],
+ XChangeProperty (display_info->dpy, check_win, display_info->atoms[NET_SUPPORTING_WM_CHECK],
XA_WINDOW, 32, PropModeReplace, (unsigned char *) data, 1);
XChangeProperty (display_info->dpy, root, display_info->atoms[NET_SUPPORTING_WM_CHECK],
XA_WINDOW, 32, PropModeReplace, (unsigned char *) data, 1);
@@ -482,8 +482,8 @@
g_return_val_if_fail (((atom_id >= 0) && (atom_id < NB_ATOMS)), FALSE);
TRACE ("entering getAtomList()");
- if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[atom_id],
- 0, G_MAXLONG, FALSE, XA_ATOM, &type, &format, &n_atoms,
+ if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[atom_id],
+ 0, G_MAXLONG, FALSE, XA_ATOM, &type, &format, &n_atoms,
&bytes_after, (unsigned char **) &data) != Success) || (type == None))
{
return FALSE;
@@ -522,7 +522,7 @@
g_return_val_if_fail (((atom_id >= 0) && (atom_id < NB_ATOMS)), FALSE);
TRACE ("entering getCardinalList()");
- if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[atom_id],
+ if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[atom_id],
0, G_MAXLONG, FALSE, XA_CARDINAL,
&type, &format, &n_cardinals, &bytes_after,
(unsigned char **) &data) != Success) || (type == None))
@@ -559,7 +559,7 @@
*ptr++ = (unsigned long) (width - (m[LEFT] + m[RIGHT]));
*ptr++ = (unsigned long) (height - (m[TOP] + m[BOTTOM]));
}
- XChangeProperty (display_info->dpy, root, display_info->atoms[NET_WORKAREA],
+ XChangeProperty (display_info->dpy, root, display_info->atoms[NET_WORKAREA],
XA_CARDINAL, 32, PropModeReplace, (unsigned char *) data, j * 4);
g_free (data);
}
@@ -574,7 +574,7 @@
data[1] = (unsigned long) right;
data[2] = (unsigned long) top;
data[3] = (unsigned long) bottom;
- XChangeProperty (display_info->dpy, w, display_info->atoms[NET_FRAME_EXTENTS],
+ XChangeProperty (display_info->dpy, w, display_info->atoms[NET_FRAME_EXTENTS],
XA_CARDINAL, 32, PropModeReplace, (unsigned char *) data, 4);
}
@@ -602,7 +602,7 @@
g_return_if_fail ((atom_id >= 0) && (atom_id < NB_ATOMS));
TRACE ("entering setUTF8StringHint");
- XChangeProperty (display_info->dpy, w, display_info->atoms[atom_id],
+ XChangeProperty (display_info->dpy, w, display_info->atoms[atom_id],
display_info->atoms[UTF8_STRING], 8, PropModeReplace,
(unsigned char *) val, strlen (val) + 1);
}
@@ -643,7 +643,7 @@
TRACE ("entering text_property_to_utf8");
list = NULL;
- count = gdk_text_property_to_utf8_list (gdk_x11_xatom_to_atom (prop->encoding),
+ count = gdk_text_property_to_utf8_list (gdk_x11_xatom_to_atom (prop->encoding),
prop->format, prop->value, prop->nitems, &list);
if (count == 0)
{
@@ -699,8 +699,8 @@
TRACE ("entering getUTF8StringData");
*str_p = NULL;
- if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[atom_id],
- 0, G_MAXLONG, FALSE, display_info->atoms[UTF8_STRING], &type,
+ if ((XGetWindowProperty (display_info->dpy, w, display_info->atoms[atom_id],
+ 0, G_MAXLONG, FALSE, display_info->atoms[UTF8_STRING], &type,
&format, &n_items, &bytes_after, (unsigned char **) &str) != Success) || (type == None))
{
TRACE ("no UTF8_STRING property found");
@@ -727,7 +727,7 @@
getUTF8String (DisplayInfo *display_info, Window w, int atom_id, gchar **str_p, int *length)
{
char *xstr;
-
+
g_return_val_if_fail (((atom_id >= 0) && (atom_id < NB_ATOMS)), FALSE);
TRACE ("entering getUTF8String");
@@ -742,7 +742,7 @@
/* gmalloc the returned string */
*str_p = internal_utf8_strndup (xstr, MAX_STR_LENGTH);
XFree (xstr);
-
+
if (!g_utf8_validate (*str_p, -1, NULL))
{
TRACE ("getUTF8String() returned invalid UTF-8 characters");
@@ -757,7 +757,7 @@
{
xfce_utf8_remove_controls((gchar *) *str_p, -1, NULL);
}
-
+
return TRUE;
}
@@ -780,7 +780,7 @@
{
return FALSE;
}
-
+
i = 0;
while (i < length)
{
@@ -794,10 +794,10 @@
{
*n_items = *n_items + 1;
}
-
+
retval = g_new0 (gchar *, *n_items + 1);
ptr = xstr;
-
+
for (i = 0; i < *n_items; i++)
{
if (g_utf8_validate (ptr, -1, NULL))
@@ -812,7 +812,7 @@
ptr += strlen (ptr) + 1;
}
XFree (xstr);
- *str_p = retval;
+ *str_p = retval;
return TRUE;
}
@@ -852,7 +852,7 @@
gchar *machine;
gchar *name;
gboolean status;
-
+
TRACE ("entering getWindowName");
g_return_val_if_fail (title != NULL, FALSE);
@@ -921,7 +921,7 @@
g_return_val_if_fail (window != None, None);
client_leader = None;
- if (XGetWindowProperty (display_info->dpy, window, display_info->atoms[WM_CLIENT_LEADER],
+ if (XGetWindowProperty (display_info->dpy, window, display_info->atoms[WM_CLIENT_LEADER],
0L, 1L, FALSE, AnyPropertyType, &actual_type, &actual_format, &nitems,
&bytes_after, (unsigned char **) &prop) == Success)
{
@@ -951,7 +951,7 @@
g_return_val_if_fail (window != None, None);
- if (XGetWindowProperty (display_info->dpy, window, display_info->atoms[NET_WM_USER_TIME],
+ if (XGetWindowProperty (display_info->dpy, window, display_info->atoms[NET_WM_USER_TIME],
0L, 1L, FALSE, XA_CARDINAL, &actual_type, &actual_format, &nitems,
&bytes_after, (unsigned char **) &data) == Success)
{
@@ -1031,8 +1031,8 @@
*mask = None;
icons = NULL;
- if (XGetWindowProperty (display_info->dpy, window, display_info->atoms[KWM_WIN_ICON],
- 0L, G_MAXLONG, FALSE, display_info->atoms[KWM_WIN_ICON], &type,
+ if (XGetWindowProperty (display_info->dpy, window, display_info->atoms[KWM_WIN_ICON],
+ 0L, G_MAXLONG, FALSE, display_info->atoms[KWM_WIN_ICON], &type,
&format, &nitems, &bytes_after, (unsigned char **)&data) != Success)
{
return FALSE;
@@ -1062,14 +1062,14 @@
int format;
unsigned long bytes_after;
- if (XGetWindowProperty (display_info->dpy, window, display_info->atoms[NET_WM_ICON],
+ if (XGetWindowProperty (display_info->dpy, window, display_info->atoms[NET_WM_ICON],
0L, G_MAXLONG, FALSE, XA_CARDINAL, &type, &format, nitems,
&bytes_after, (unsigned char **) data) != Success)
{
*data = NULL;
return FALSE;
}
-
+
if (type != XA_CARDINAL)
{
if (*data)
@@ -1087,10 +1087,10 @@
getOpacity (DisplayInfo *display_info, Window window, guint *opacity)
{
long val;
-
+
g_return_val_if_fail (window != None, FALSE);
g_return_val_if_fail (opacity != NULL, FALSE);
- TRACE ("entering getOpacity");
+ TRACE ("entering getOpacity");
val = 0;
if (getHint (display_info, window, NET_WM_WINDOW_OPACITY, &val))
@@ -1171,13 +1171,13 @@
TRACE ("entering GetWindowRole");
g_return_val_if_fail (window != None, FALSE);
-
- XGetWindowProperty(display_info->dpy, window, display_info->atoms[KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR],
- 0L, sizeof(Window), FALSE, XA_WINDOW, &actual_type, &actual_format,
+
+ XGetWindowProperty(display_info->dpy, window, display_info->atoms[KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR],
+ 0L, sizeof(Window), FALSE, XA_WINDOW, &actual_type, &actual_format,
&nitems, &bytes_after, (unsigned char **) &trayIconForWindow);
- if ((actual_format == None) ||
- (actual_type != XA_WINDOW) ||
+ if ((actual_format == None) ||
+ (actual_type != XA_WINDOW) ||
(trayIconForWindow == None))
{
return FALSE;
Modified: xfwm4/trunk/src/hints.h
===================================================================
--- xfwm4/trunk/src/hints.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/hints.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,23 +1,23 @@
/* $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
Metacity - (c) 2001 Havoc Pennington
xfwm4 - (c) 2002-2006 Olivier Fourdan
-
+
*/
#ifndef INC_HINTS_H
Modified: xfwm4/trunk/src/icons.c
===================================================================
--- xfwm4/trunk/src/icons.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/icons.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,19 +1,19 @@
/* $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.
-
+
Metacity - (c) 2001 Havoc Pennington
libwnck - (c) 2001 Havoc Pennington
xfwm4 - (c) 2002-2006 Olivier Fourdan
@@ -29,7 +29,7 @@
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util.h>
#include <libxfcegui4/libxfcegui4.h>
#include "inline-default-icon.h"
@@ -59,7 +59,7 @@
{
return FALSE; /* not enough data */
}
-
+
*width = MAX (w, *width);
*height = MAX (h, *height);
@@ -206,7 +206,7 @@
int w, h;
data = NULL;
-
+
if (!getRGBIconData (display_info, window, &data, &nitems))
{
return FALSE;
@@ -293,7 +293,7 @@
GdkColormap *cmap;
g_return_val_if_fail (pixmap != NULL, NULL);
-
+
cmap = gdk_drawable_get_colormap (pixmap);
if (cmap)
{
@@ -345,7 +345,7 @@
{
drawable = gdk_pixmap_foreign_new (xpixmap);
}
-
+
if (G_UNLIKELY(!drawable))
{
/* Pixmap is gone ?? */
Modified: xfwm4/trunk/src/icons.h
===================================================================
--- xfwm4/trunk/src/icons.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/icons.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,19 +1,19 @@
/* $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.
-
+
Metacity - (c) 2001 Havoc Pennington
libwnck - (c) 2001 Havoc Pennington
xfwm4 - (c) 2002-2006 Olivier Fourdan
@@ -32,9 +32,9 @@
#include "display.h"
-GdkPixbuf * getAppIcon (DisplayInfo *,
- Window,
- int,
+GdkPixbuf * getAppIcon (DisplayInfo *,
+ Window,
+ int,
int);
#endif /* INC_ICONS_H */
Modified: xfwm4/trunk/src/inline-default-icon.h
===================================================================
--- xfwm4/trunk/src/inline-default-icon.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/inline-default-icon.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -4,9 +4,9 @@
#pragma align 4 (default_icon_data)
#endif
#ifdef __GNUC__
-static const guint8 default_icon_data[] __attribute__ ((__aligned__ (4))) =
+static const guint8 default_icon_data[] __attribute__ ((__aligned__ (4))) =
#else
-static const guint8 default_icon_data[] =
+static const guint8 default_icon_data[] =
#endif
{ ""
/* Pixbuf magic (0x47646b50) */
Modified: xfwm4/trunk/src/inline-tabwin-icon.h
===================================================================
--- xfwm4/trunk/src/inline-tabwin-icon.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/inline-tabwin-icon.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -4,9 +4,9 @@
#pragma align 4 (tabwin_icon_data)
#endif
#ifdef __GNUC__
-static const guint8 tabwin_icon_data[] __attribute__ ((__aligned__ (4))) =
+static const guint8 tabwin_icon_data[] __attribute__ ((__aligned__ (4))) =
#else
-static const guint8 tabwin_icon_data[] =
+static const guint8 tabwin_icon_data[] =
#endif
{ ""
/* Pixbuf magic (0x47646b50) */
Modified: xfwm4/trunk/src/keyboard.c
===================================================================
--- xfwm4/trunk/src/keyboard.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/keyboard.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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-2006 Olivier Fourdan
-
+
*/
#ifdef HAVE_CONFIG_H
@@ -28,7 +28,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <libxfce4util/libxfce4util.h>
+#include <libxfce4util/libxfce4util.h>
#include "keyboard.h"
unsigned int AltMask;
@@ -145,16 +145,16 @@
else
{
/* Here we grab all combinations of well known modifiers */
- XGrabKey (dpy, key->keycode,
+ XGrabKey (dpy, key->keycode,
key->modifier, w, FALSE,
GrabModeAsync, GrabModeSync);
- XGrabKey (dpy, key->keycode,
+ XGrabKey (dpy, key->keycode,
key->modifier | ScrollLockMask, w,
FALSE, GrabModeAsync, GrabModeSync);
- XGrabKey (dpy, key->keycode,
+ XGrabKey (dpy, key->keycode,
key->modifier | NumLockMask, w,
FALSE, GrabModeAsync, GrabModeSync);
- XGrabKey (dpy, key->keycode,
+ XGrabKey (dpy, key->keycode,
key->modifier | LockMask, w,
FALSE, GrabModeAsync, GrabModeSync);
XGrabKey (dpy, key->keycode,
@@ -189,43 +189,43 @@
if (modifier == AnyModifier)
{
XGrabButton (dpy, button, AnyModifier, w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
}
else
{
/* Here we grab all combinations of well known modifiers */
- XGrabButton (dpy, button, modifier,
+ XGrabButton (dpy, button, modifier,
w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
- XGrabButton (dpy, button, modifier | ScrollLockMask,
+ XGrabButton (dpy, button, modifier | ScrollLockMask,
w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
- XGrabButton (dpy, button, modifier | NumLockMask,
+ XGrabButton (dpy, button, modifier | NumLockMask,
w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
XGrabButton (dpy, button, modifier | LockMask, w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
- XGrabButton (dpy, button, modifier | ScrollLockMask | NumLockMask,
+ XGrabButton (dpy, button, modifier | ScrollLockMask | NumLockMask,
w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
- XGrabButton (dpy, button, modifier | ScrollLockMask | LockMask,
+ XGrabButton (dpy, button, modifier | ScrollLockMask | LockMask,
w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
- XGrabButton (dpy, button, modifier | LockMask | NumLockMask,
+ XGrabButton (dpy, button, modifier | LockMask | NumLockMask,
w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
- XGrabButton (dpy, button,
- modifier | ScrollLockMask | LockMask | NumLockMask,
+ XGrabButton (dpy, button,
+ modifier | ScrollLockMask | LockMask | NumLockMask,
w, FALSE,
- ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
+ ButtonPressMask|ButtonReleaseMask, GrabModeSync, GrabModeAsync,
None, None);
}
}
@@ -278,7 +278,7 @@
XDisplayKeycodes (dpy, &min_keycode, &max_keycode);
modmap = XGetModifierMapping (dpy);
- keymap = XGetKeyboardMapping (dpy, min_keycode, max_keycode - min_keycode + 1, &keysyms_per_keycode);
+ keymap = XGetKeyboardMapping (dpy, min_keycode, max_keycode - min_keycode + 1, &keysyms_per_keycode);
for (i = 3 * modmap->max_keypermod; i < 8 * modmap->max_keypermod; i++)
{
@@ -305,7 +305,7 @@
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));
Modified: xfwm4/trunk/src/keyboard.h
===================================================================
--- xfwm4/trunk/src/keyboard.h 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/keyboard.h 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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-2006 Olivier Fourdan
-
+
*/
#ifndef INC_KEYBOARD_H
Modified: xfwm4/trunk/src/main.c
===================================================================
--- xfwm4/trunk/src/main.c 2006-09-11 19:49:08 UTC (rev 23127)
+++ xfwm4/trunk/src/main.c 2006-09-11 20:39:40 UTC (rev 23128)
@@ -1,22 +1,22 @@
/* $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
th