Commit 130f3686 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

remove trailing whitespace

parent e132e2a7
This diff is collapsed.
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
/*
* Copyright (C) 2007 Iain Holmes
* Based on xcompmgr - (c) 2003 Keith Packard
* xfwm4 - (c) 2005-2007 Olivier Fourdan
*
*
* 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 of the
......@@ -14,7 +14,7 @@
* 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, see <http://www.gnu.org/licenses/>.
*/
......
......@@ -112,7 +112,7 @@ meta_compositor_get_window_pixmap (MetaCompositor *compositor,
#ifdef HAVE_COMPOSITE_EXTENSIONS
if (compositor && compositor->get_window_pixmap)
return compositor->get_window_pixmap (compositor, window);
else
else
return None;
#else
return None;
......@@ -125,7 +125,7 @@ meta_compositor_set_active_window (MetaCompositor *compositor,
MetaWindow *window)
{
#ifdef HAVE_COMPOSITE_EXTENSIONS
if (compositor && compositor->set_active_window)
if (compositor && compositor->set_active_window)
compositor->set_active_window (compositor, screen, window);
#endif
}
......@@ -134,14 +134,14 @@ meta_compositor_set_active_window (MetaCompositor *compositor,
void meta_compositor_begin_move (MetaCompositor *compositor,
MetaWindow *window,
MetaRectangle *initial,
int grab_x,
int grab_x,
int grab_y)
{
}
void meta_compositor_update_move (MetaCompositor *compositor,
MetaWindow *window,
int x,
int x,
int y)
{
}
......
......@@ -55,7 +55,7 @@ struct _ListNode
struct _AgGetPropertyTask
{
ListNode node;
AgPerDisplayData *dd;
Window window;
Atom property;
......@@ -77,7 +77,7 @@ struct _AgPerDisplayData
{
ListNode node;
_XAsyncHandler async;
Display *display;
ListNode *pending_tasks;
ListNode *pending_tasks_tail;
......@@ -96,7 +96,7 @@ append_to_list (ListNode **head,
ListNode *task)
{
task->next = NULL;
if (*tail == NULL)
{
assert (*head == NULL);
......@@ -131,10 +131,10 @@ remove_from_list (ListNode **head,
if (node == *tail)
*tail = prev;
break;
}
prev = node;
node = node->next;
}
......@@ -152,7 +152,7 @@ move_to_completed (AgPerDisplayData *dd,
remove_from_list (&dd->pending_tasks,
&dd->pending_tasks_tail,
&task->node);
append_to_list (&dd->completed_tasks,
&dd->completed_tasks_tail,
&task->node);
......@@ -187,18 +187,18 @@ find_pending_by_request_sequence (AgPerDisplayData *dd,
* I'm not sure this is 100% guaranteed, if it is,
* it would be a big speedup.
*/
node = dd->pending_tasks;
while (node != NULL)
{
AgGetPropertyTask *task = (AgGetPropertyTask*) node;
if (task->request_seq == request_seq)
return task;
node = node->next;
}
return NULL;
}
......@@ -216,12 +216,12 @@ async_get_property_handler (Display *dpy,
int bytes_read;
dd = (void*) data;
#if 0
printf ("%s: seeing request seq %ld buflen %d\n", __FUNCTION__,
dpy->last_request_read, len);
#endif
task = find_pending_by_request_sequence (dd, dpy->last_request_read);
if (task == NULL)
......@@ -231,7 +231,7 @@ async_get_property_handler (Display *dpy,
task->have_reply = True;
move_to_completed (dd, task);
/* read bytes so far */
bytes_read = SIZEOF (xReply);
......@@ -240,7 +240,7 @@ async_get_property_handler (Display *dpy,
xError errbuf;
task->error = rep->error.errorCode;
#ifdef DEBUG_SPEW
printf ("%s: error code = %d (ignoring error, eating %d bytes, generic.length = %ld)\n",
__FUNCTION__, task->error, (SIZEOF (xError) - bytes_read),
......@@ -263,7 +263,7 @@ async_get_property_handler (Display *dpy,
_XGetAsyncReply (dpy, (char *)&errbuf, rep, buf, len,
(SIZEOF (xError) - bytes_read) >> 2, /* in 32-bit words */
False); /* really seems like it should be True */
return True;
}
......@@ -368,7 +368,7 @@ async_get_property_handler (Display *dpy,
char *netdata;
char *lptr;
char *end_lptr;
/* Store the 32-bit values in the end of the array */
netdata = task->data + nbytes / 2;
......@@ -377,7 +377,7 @@ async_get_property_handler (Display *dpy,
netbytes);
/* Now move the 32-bit values to the front */
lptr = task->data;
end_lptr = task->data + nbytes;
while (lptr != end_lptr)
......@@ -411,7 +411,7 @@ async_get_property_handler (Display *dpy,
#if 0
xError error;
#endif
task->error = BadImplementation;
#if 0
......@@ -468,21 +468,21 @@ get_display_data (Display *display,
{
ListNode *node;
AgPerDisplayData *dd;
node = display_datas;
while (node != NULL)
{
dd = (AgPerDisplayData*) node;
if (dd->display == display)
return dd;
node = node->next;
}
if (!create)
return NULL;
dd = Xcalloc (1, sizeof (AgPerDisplayData));
if (dd == NULL)
return NULL;
......@@ -496,7 +496,7 @@ get_display_data (Display *display,
append_to_list (&display_datas,
&display_datas_tail,
&dd->node);
return dd;
}
......@@ -524,8 +524,8 @@ ag_task_create (Display *dpy,
{
AgGetPropertyTask *task;
xGetPropertyReq *req;
AgPerDisplayData *dd;
AgPerDisplayData *dd;
/* Fire up our request */
LockDisplay (dpy);
......@@ -535,7 +535,7 @@ ag_task_create (Display *dpy,
UnlockDisplay (dpy);
return NULL;
}
GetReq (GetProperty, req);
req->window = window;
req->property = property;
......@@ -561,7 +561,7 @@ ag_task_create (Display *dpy,
&dd->pending_tasks_tail,
&task->node);
dd->n_tasks_pending += 1;
UnlockDisplay (dpy);
SyncHandle ();
......@@ -593,13 +593,13 @@ ag_task_get_reply_and_free (AgGetPropertyTask *task,
*prop = NULL;
dpy = task->dd->display; /* Xlib macros require a variable named "dpy" */
if (task->error != Success)
{
Status s = task->error;
free_task (task);
return s;
}
......@@ -620,7 +620,7 @@ ag_task_get_reply_and_free (AgGetPropertyTask *task,
SyncHandle ();
free_task (task);
return Success;
}
......@@ -657,7 +657,7 @@ ag_get_next_completed_task (Display *display)
if (dd == NULL)
return NULL;
#ifdef DEBUG_SPEW
printf ("%d pending %d completed\n",
dd->n_tasks_pending,
......
......@@ -4,16 +4,16 @@
/*
* Copyright (C) 2002 Havoc Pennington
*
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation.
*
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
......
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2002, 2003, 2004 Red Hat, Inc.
* Copyright (C) 2003, 2004 Rob Adams
* Copyright (C) 2004-2006 Elijah Newren
* Copyright (C) 2008 Thomas Thurman
*
*
* 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 of the
......@@ -16,7 +16,7 @@
* 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, see <http://www.gnu.org/licenses/>.
*/
......@@ -52,7 +52,7 @@ item(WM_WINDOW_ROLE)
item(UTF8_STRING)
item(WM_ICON_SIZE)
item(_KWM_WIN_ICON)
item(_METACITY_RESTART_MESSAGE)
item(_METACITY_RESTART_MESSAGE)
item(_METACITY_RELOAD_THEME_MESSAGE)
item(_METACITY_SET_KEYBINDINGS_MESSAGE)
item(_METACITY_SET_MOUSEMODS_MESSAGE)
......
......@@ -2,10 +2,10 @@
/* Metacity visual bell */
/*
/*
* Copyright (C) 2002 Sun Microsystems Inc.
* Copyright (C) 2005, 2006 Elijah Newren
*
*
* 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 of the
......@@ -15,7 +15,7 @@
* 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, see <http://www.gnu.org/licenses/>.
*/
......@@ -74,13 +74,13 @@
* \bug This appears to destroy our current XSync status.
*/
static void
bell_flash_screen (MetaDisplay *display,
bell_flash_screen (MetaDisplay *display,
MetaScreen *screen)
{
Window root = screen->xroot;
int width = screen->rect.width;
int height = screen->rect.height;
if (screen->flash_window == None)
{
Visual *visual = (Visual *)CopyFromParent;
......@@ -88,11 +88,11 @@ bell_flash_screen (MetaDisplay *display,
int depth = CopyFromParent;
xswa.save_under = True;
xswa.override_redirect = True;
/*
/*
* TODO: use XGetVisualInfo and determine which is an
* overlay, if one is present, and use the Overlay visual
* for this window (for performance reasons).
* Not sure how to tell this yet...
* for this window (for performance reasons).
* Not sure how to tell this yet...
*/
screen->flash_window = XCreateWindow (display->xdisplay, root,
0, 0, width, height,
......@@ -114,12 +114,12 @@ bell_flash_screen (MetaDisplay *display,
GC gc = XCreateGC (display->xdisplay, screen->flash_window, 0, NULL);
XMapWindow (display->xdisplay, screen->flash_window);
XSetForeground (display->xdisplay, gc,
WhitePixel (display->xdisplay,
WhitePixel (display->xdisplay,
XScreenNumberOfScreen (screen->xscreen)));
XFillRectangle (display->xdisplay, screen->flash_window, gc,
0, 0, width, height);
XSetForeground (display->xdisplay, gc,
BlackPixel (display->xdisplay,
BlackPixel (display->xdisplay,
XScreenNumberOfScreen (screen->xscreen)));
XFillRectangle (display->xdisplay, screen->flash_window, gc,
0, 0, width, height);
......@@ -147,7 +147,7 @@ bell_flash_screen (MetaDisplay *display,
*/
#ifdef HAVE_XKB
static void
bell_flash_fullscreen (MetaDisplay *display,
bell_flash_fullscreen (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
XkbBellNotifyEvent *xkb_bell_ev = (XkbBellNotifyEvent *) xkb_ev;
......@@ -160,10 +160,10 @@ bell_flash_fullscreen (MetaDisplay *display,
if (screen)
bell_flash_screen (display, screen);
}
else
else
{
GSList *screen_list = display->screens;
while (screen_list)
while (screen_list)
{
screen = (MetaScreen *) screen_list->data;
bell_flash_screen (display, screen);
......@@ -186,7 +186,7 @@ bell_flash_fullscreen (MetaDisplay *display,
* \bug This is the parallel to bell_flash_window_frame(), so it should
* really be called meta_bell_unflash_window_frame().
*/
static gboolean
static gboolean
bell_unflash_frame (gpointer data)
{
MetaFrame *frame = (MetaFrame *) data;
......@@ -212,7 +212,7 @@ bell_flash_window_frame (MetaWindow *window)
g_assert (window->frame != NULL);
window->frame->is_flashing = 1;
meta_frame_queue_draw (window->frame);
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 100,
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 100,
bell_unflash_frame, window->frame, NULL);
}
......@@ -224,12 +224,12 @@ bell_flash_window_frame (MetaWindow *window)
* \param xkb_ev The bell event we just received
*/
static void
bell_flash_frame (MetaDisplay *display,
bell_flash_frame (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
XkbBellNotifyEvent *xkb_bell_event = (XkbBellNotifyEvent *) xkb_ev;
MetaWindow *window;
g_assert (xkb_ev->xkb_type == XkbBellNotify);
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
if (!window && (display->focus_window))
......@@ -258,10 +258,10 @@ bell_flash_frame (MetaDisplay *display,
* \bug This should be merged with meta_bell_notify().
*/
static void
bell_visual_notify (MetaDisplay *display,
bell_visual_notify (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
switch (meta_prefs_get_visual_bell_type ())
switch (meta_prefs_get_visual_bell_type ())
{
case G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH:
bell_flash_fullscreen (display, xkb_ev);
......@@ -273,14 +273,14 @@ bell_visual_notify (MetaDisplay *display,
}
void
meta_bell_notify (MetaDisplay *display,
meta_bell_notify (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
/* flash something */
if (meta_prefs_get_visual_bell ())
bell_visual_notify (display, xkb_ev);
if (meta_prefs_bell_is_audible ())
if (meta_prefs_bell_is_audible ())
{
XkbBellNotifyEvent *xkb_bell_event = (XkbBellNotifyEvent*) xkb_ev;
......@@ -299,7 +299,7 @@ meta_bell_notify (MetaDisplay *display,
window = display->focus_window;
if (window)
{
{
ca_proplist_sets (p, CA_PROP_WINDOW_NAME, window->title);
ca_proplist_setf (p, CA_PROP_WINDOW_X11_XID, "%lu", (unsigned long)window->xwindow);
ca_proplist_sets (p, CA_PROP_APPLICATION_NAME, window->res_name);
......@@ -315,12 +315,12 @@ meta_bell_notify (MetaDisplay *display,
#else
if (1)
#endif /* HAVE_CANBERRA */
{
{
/* ...and in case that failed we use the classic X11 bell. */
XkbForceDeviceBell (display->xdisplay,
xkb_bell_event->device,
xkb_bell_event->bell_class,
xkb_bell_event->bell_id,
XkbForceDeviceBell (display->xdisplay,
xkb_bell_event->device,
xkb_bell_event->bell_class,
xkb_bell_event->bell_id,
xkb_bell_event->percent);
}
}
......@@ -338,19 +338,19 @@ meta_bell_init (MetaDisplay *display)
#ifdef HAVE_XKB
int xkb_base_error_type, xkb_opcode;
if (!XkbQueryExtension (display->xdisplay, &xkb_opcode,
&display->xkb_base_event_type,
&xkb_base_error_type,
if (!XkbQueryExtension (display->xdisplay, &xkb_opcode,
&display->xkb_base_event_type,
&xkb_base_error_type,
NULL, NULL))
{
display->xkb_base_event_type = -1;
g_message ("could not find XKB extension.");
return FALSE;
}
else
else
{
unsigned int mask = XkbBellNotifyMask;
gboolean visual_bell_auto_reset = FALSE;
gboolean visual_bell_auto_reset = FALSE;
/* TRUE if and when non-broken version is available */
XkbSelectEvents (display->xdisplay,
XkbUseCoreKbd,
......@@ -395,6 +395,6 @@ meta_bell_shutdown (MetaDisplay *display)
void
meta_bell_notify_frame_destroy (MetaFrame *frame)
{
if (frame->is_flashing)
if (frame->is_flashing)
g_source_remove_by_funcs_user_data (&g_timeout_funcs, frame);
}
......@@ -12,9 +12,9 @@
* <http://bugzilla.gnome.org/show_bug.cgi?id=99886>.
*/
/*
/*
* Copyright (C) 2002 Sun Microsystems Inc.
*
*
* 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 of the
......@@ -24,7 +24,7 @@
* 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, see <http://www.gnu.org/licenses/>.
*/
......
......@@ -2,14 +2,14 @@
/* Simple box operations */
/*
/*
* Copyright (C) 2005, 2006 Elijah Newren
* [meta_rectangle_intersect() is copyright the GTK+ Team according to Havoc,
* see gdkrectangle.c. As far as Havoc knows, he probably wrote
* meta_rectangle_equal(), and I'm guessing it's (C) Red Hat. So...]
* Copyright (C) 1995-2000 GTK+ Team
* Copyright (C) 2002 Red Hat, Inc.
*
*
* 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 of the
......@@ -19,7 +19,7 @@
* 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, see <http://www.gnu.org/licenses/>.
*/
......@@ -36,7 +36,7 @@ meta_rectangle_to_string (const MetaRectangle *rect,
* Should be more than enough space. Note that of this space, the
* trailing \0 will be overwritten for all but the last rectangle.
*/
g_snprintf (output, RECT_LENGTH, "%d,%d +%d,%d",
g_snprintf (output, RECT_LENGTH, "%d,%d +%d,%d",
rect->x, rect->y, rect->width, rect->height);
return output;
......@@ -63,7 +63,7 @@ meta_rectangle_region_to_string (GList *region,
while (tmp)
{
MetaRectangle *rect = tmp->data;
g_snprintf (rect_string, RECT_LENGTH, "[%d,%d +%d,%d]",
g_snprintf (rect_string, RECT_LENGTH, "[%d,%d +%d,%d]",
rect->x, rect->y, rect->width, rect->height);
cur = g_stpcpy (cur, rect_string);
tmp = tmp->next;
......@@ -85,7 +85,7 @@ meta_rectangle_edge_to_string (const MetaEdge *edge,
* Plus 2 for parenthesis, 4 for 2 more numbers, 2 more commas, and
* 2 more spaces, for a total of 10 more.
*/
g_snprintf (output, EDGE_LENGTH, "[%d,%d +%d,%d], %2d, %2d",
g_snprintf (output, EDGE_LENGTH, "[%d,%d +%d,%d], %2d, %2d",
edge->rect.x, edge->rect.y, edge->rect.width, edge->rect.height,
edge->side_type, edge->edge_type);
......@@ -117,7 +117,7 @@ meta_rectangle_edge_list_to_string (GList *edge_list,
{
MetaEdge *edge = tmp->data;
MetaRectangle *rect = &edge->rect;
g_snprintf (rect_string, EDGE_LENGTH, "([%d,%d +%d,%d], %2d, %2d)",