Remove trailing whitespace

This commit is contained in:
Jasper St. Pierre
2014-05-02 09:34:02 -04:00
parent 730ed6f75f
commit 25a16c3379
87 changed files with 2061 additions and 2061 deletions

View File

@@ -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 = (AgPerDisplayData*) 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,

View File

@@ -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

View File

@@ -2,9 +2,9 @@
/* Mutter window group private header */
/*
/*
* 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
@@ -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/>.
*/

View File

@@ -2,9 +2,9 @@
/* MetaGroup property handling */
/*
/*
* 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
@@ -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/>.
*/
@@ -65,16 +65,16 @@ meta_group_reload_properties (MetaGroup *group,
g_return_if_fail (properties != NULL);
g_return_if_fail (n_properties > 0);
values = g_new0 (MetaPropValue, n_properties);
i = 0;
while (i < n_properties)
{
init_prop_value (group->display, properties[i], &values[i]);
++i;
}
meta_prop_get_values (group->display, group->group_leader,
values, n_properties);
@@ -82,12 +82,12 @@ meta_group_reload_properties (MetaGroup *group,
while (i < n_properties)
{
reload_prop_value (group, &values[i]);
++i;
}
meta_prop_free_values (values, n_properties);
g_free (values);
}
@@ -97,11 +97,11 @@ init_prop_value (MetaDisplay *display,
Atom property,
MetaPropValue *value)
{
MetaGroupPropHooks *hooks;
MetaGroupPropHooks *hooks;
value->type = META_PROP_VALUE_INVALID;
value->atom = None;
hooks = find_hooks (display, property);
if (hooks && hooks->init_func != NULL)
(* hooks->init_func) (display, property, value);
@@ -111,8 +111,8 @@ static void
reload_prop_value (MetaGroup *group,
MetaPropValue *value)
{
MetaGroupPropHooks *hooks;
MetaGroupPropHooks *hooks;
hooks = find_hooks (group->display, value->atom);
if (hooks && hooks->reload_func != NULL)
(* hooks->reload_func) (group, value);
@@ -133,7 +133,7 @@ reload_wm_client_machine (MetaGroup *group,
{
g_free (group->wm_client_machine);
group->wm_client_machine = NULL;
if (value->type != META_PROP_VALUE_INVALID)
group->wm_client_machine = g_strdup (value->v.str);
@@ -156,10 +156,10 @@ reload_net_startup_id (MetaGroup *group,
{
g_free (group->startup_id);
group->startup_id = NULL;
if (value->type != META_PROP_VALUE_INVALID)
group->startup_id = g_strdup (value->v.str);
meta_verbose ("Group has startup id \"%s\"\n",
group->startup_id ? group->startup_id : "unset");
}
@@ -171,12 +171,12 @@ meta_display_init_group_prop_hooks (MetaDisplay *display)
{
int i;
MetaGroupPropHooks *hooks;
g_assert (display->group_prop_hooks == NULL);
display->group_prop_hooks = g_new0 (MetaGroupPropHooks, N_HOOKS);
display->group_prop_hooks = g_new0 (MetaGroupPropHooks, N_HOOKS);
hooks = display->group_prop_hooks;
i = 0;
hooks[i].property = display->atom_WM_CLIENT_MACHINE;
@@ -193,7 +193,7 @@ meta_display_init_group_prop_hooks (MetaDisplay *display)
hooks[i].init_func = init_net_startup_id;
hooks[i].reload_func = reload_net_startup_id;
++i;
if (i != N_HOOKS)
{
g_error ("Initialized %d group hooks should have been %d\n", i, N_HOOKS);
@@ -204,7 +204,7 @@ void
meta_display_free_group_prop_hooks (MetaDisplay *display)
{
g_assert (display->group_prop_hooks != NULL);
g_free (display->group_prop_hooks);
display->group_prop_hooks = NULL;
}
@@ -218,13 +218,13 @@ find_hooks (MetaDisplay *display,
/* FIXME we could sort the array and do binary search or
* something
*/
i = 0;
while (i < N_HOOKS)
{
if (display->group_prop_hooks[i].property == property)
return &display->group_prop_hooks[i];
++i;
}

View File

@@ -2,9 +2,9 @@
/* MetaGroup property handling */
/*
/*
* 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
@@ -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/>.
*/

View File

@@ -1,9 +1,9 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
/*
* Copyright (C) 2002 Red Hat Inc.
* Copyright (C) 2003 Rob Adams
*
*
* 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
@@ -13,7 +13,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/>.
*/
@@ -40,16 +40,16 @@ meta_group_new (MetaDisplay *display,
#define N_INITIAL_PROPS 3
Atom initial_props[N_INITIAL_PROPS];
int i;
g_assert (N_INITIAL_PROPS == (int) G_N_ELEMENTS (initial_props));
group = g_new0 (MetaGroup, 1);
group->display = display;
group->windows = NULL;
group->group_leader = group_leader;
group->refcount = 1; /* owned by caller, hash table has only weak ref */
if (display->groups_by_leader == NULL)
display->groups_by_leader = g_hash_table_new (meta_unsigned_long_hash,
meta_unsigned_long_equal);
@@ -66,13 +66,13 @@ meta_group_new (MetaDisplay *display,
initial_props[i++] = display->atom__NET_WM_PID;
initial_props[i++] = display->atom__NET_STARTUP_ID;
g_assert (N_INITIAL_PROPS == i);
meta_group_reload_properties (group, initial_props, N_INITIAL_PROPS);
meta_topic (META_DEBUG_GROUPS,
"Created new group with leader 0x%lx\n",
group->group_leader);
return group;
}
@@ -86,10 +86,10 @@ meta_group_unref (MetaGroup *group)
{
meta_topic (META_DEBUG_GROUPS,
"Destroying group with leader 0x%lx\n",
group->group_leader);
group->group_leader);
g_assert (group->display->groups_by_leader != NULL);
g_hash_table_remove (group->display->groups_by_leader,
&group->group_leader);
@@ -102,7 +102,7 @@ meta_group_unref (MetaGroup *group)
g_free (group->wm_client_machine);
g_free (group->startup_id);
g_free (group);
}
}
@@ -128,9 +128,9 @@ meta_window_compute_group (MetaWindow* window)
MetaWindow *ancestor;
/* use window->xwindow if no window->xgroup_leader */
group = NULL;
/* Determine the ancestor of the window; its group setting will override the
* normal grouping rules; see bug 328211.
*/
@@ -147,7 +147,7 @@ meta_window_compute_group (MetaWindow* window)
group = g_hash_table_lookup (window->display->groups_by_leader,
&window->xwindow);
}
if (group != NULL)
{
window->group = group;
@@ -164,7 +164,7 @@ meta_window_compute_group (MetaWindow* window)
else
group = meta_group_new (window->display,
window->xwindow);
window->group = group;
}
@@ -184,7 +184,7 @@ remove_window_from_group (MetaWindow *window)
meta_topic (META_DEBUG_GROUPS,
"Removing %s from group with leader 0x%lx\n",
window->desc, window->group->group_leader);
window->group->windows =
g_slist_remove (window->group->windows,
window);
@@ -217,9 +217,9 @@ meta_display_lookup_group (MetaDisplay *display,
Window group_leader)
{
MetaGroup *group;
group = NULL;
if (display->groups_by_leader)
group = g_hash_table_lookup (display->groups_by_leader,
&group_leader);
@@ -244,7 +244,7 @@ meta_group_update_layers (MetaGroup *group)
{
GSList *tmp;
GSList *frozen_stacks;
if (group->windows == NULL)
return;
@@ -263,7 +263,7 @@ meta_group_update_layers (MetaGroup *group)
meta_stack_update_layer (window->screen->stack,
window);
tmp = tmp->next;
}

View File

@@ -471,7 +471,7 @@ try_pixmap_and_mask (MetaDisplay *display,
GDK_INTERP_BILINEAR);
g_object_unref (G_OBJECT (unscaled));
if (*iconp && *mini_iconp)
return TRUE;
else
@@ -569,7 +569,7 @@ clear_icon_cache (MetaIconCache *icon_cache,
g_object_unref (G_OBJECT (icon_cache->mini_icon));
icon_cache->mini_icon = NULL;
#endif
icon_cache->origin = USING_NO_ICON;
if (dirty_all)
@@ -655,13 +655,13 @@ scaled_from_pixdata (guchar *pixdata,
{
GdkPixbuf *src;
GdkPixbuf *dest;
src = gdk_pixbuf_new_from_data (pixdata,
GDK_COLORSPACE_RGB,
TRUE,
8,
w, h, w * 4,
free_pixels,
free_pixels,
NULL);
if (src == NULL)
@@ -673,7 +673,7 @@ scaled_from_pixdata (guchar *pixdata,
int size;
size = MAX (w, h);
tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, size, size);
if (tmp)
@@ -682,16 +682,16 @@ scaled_from_pixdata (guchar *pixdata,
gdk_pixbuf_copy_area (src, 0, 0, w, h,
tmp,
(size - w) / 2, (size - h) / 2);
g_object_unref (src);
src = tmp;
}
}
if (w != new_w || h != new_h)
{
dest = gdk_pixbuf_scale_simple (src, new_w, new_h, GDK_INTERP_BILINEAR);
g_object_unref (G_OBJECT (src));
}
else
@@ -741,7 +741,7 @@ meta_read_icons (MetaScreen *screen,
icon_cache->ideal_mini_width = ideal_mini_width;
icon_cache->ideal_mini_height = ideal_mini_height;
#endif
if (!meta_icon_cache_get_icon_invalidated (icon_cache))
return FALSE; /* we have no new info to use */
@@ -778,7 +778,7 @@ meta_read_icons (MetaScreen *screen,
{
replace_cache (icon_cache, USING_NET_WM_ICON,
*iconp, *mini_iconp);
return TRUE;
}
else
@@ -862,7 +862,7 @@ meta_read_icons (MetaScreen *screen,
replace_cache (icon_cache, USING_FALLBACK_ICON,
*iconp, *mini_iconp);
return TRUE;
}

View File

@@ -2,9 +2,9 @@
/* Mutter window icons */
/*
/*
* Copyright (C) 2002 Havoc Pennington
*
*
* 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/>.
*/

View File

@@ -39,13 +39,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL

View File

@@ -2,11 +2,11 @@
/* Mutter Session Management */
/*
/*
* Copyright (C) 2001 Havoc Pennington (some code in here from
* libgnomeui, (C) Tom Tromey, Carsten Schaar)
* Copyright (C) 2004, 2005 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
@@ -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/>.
*/
@@ -70,7 +70,7 @@ meta_window_release_saved_state (const MetaWindowSessionInfo *info)
static void ice_io_error_handler (IceConn connection);
static void new_ice_connection (IceConn connection, IcePointer client_data,
static void new_ice_connection (IceConn connection, IcePointer client_data,
Bool opening, IcePointer *watch_data);
static void save_state (void);
@@ -100,7 +100,7 @@ process_ice_messages (GIOChannel *channel,
#if 0
IcePointer context = IceGetConnectionContext (connection);
#endif
/* We were disconnected; close our connection to the
* session manager, this will result in the ICE connection
* being cleaned up, since it is owned by libSM.
@@ -110,7 +110,7 @@ process_ice_messages (GIOChannel *channel,
return FALSE;
}
return TRUE;
}
@@ -128,22 +128,22 @@ new_ice_connection (IceConn connection, IcePointer client_data, Bool opening,
* exec'ed children
*/
GIOChannel *channel;
fcntl (IceConnectionNumber (connection), F_SETFD,
fcntl (IceConnectionNumber (connection), F_GETFD, 0) | FD_CLOEXEC);
channel = g_io_channel_unix_new (IceConnectionNumber (connection));
input_id = g_io_add_watch (channel,
G_IO_IN | G_IO_ERR,
process_ice_messages,
connection);
g_io_channel_unref (channel);
*watch_data = (IcePointer) GUINT_TO_POINTER (input_id);
}
else
else
{
input_id = GPOINTER_TO_UINT ((gpointer) *watch_data);
@@ -153,14 +153,14 @@ new_ice_connection (IceConn connection, IcePointer client_data, Bool opening,
static IceIOErrorHandler ice_installed_handler;
/* We call any handler installed before (or after) gnome_ice_init but
/* We call any handler installed before (or after) gnome_ice_init but
avoid calling the default libICE handler which does an exit() */
static void
ice_io_error_handler (IceConn connection)
{
if (ice_installed_handler)
(*ice_installed_handler) (connection);
}
}
static void
ice_init (void)
@@ -229,7 +229,7 @@ meta_session_init (const char *previous_client_id,
unsigned long mask;
SmcCallbacks callbacks;
char *saved_client_id;
meta_topic (META_DEBUG_SM, "Initializing session with save file '%s'\n",
previous_save_file ? previous_save_file : "(none)");
@@ -248,24 +248,24 @@ meta_session_init (const char *previous_client_id,
{
saved_client_id = NULL;
}
ice_init ();
mask = SmcSaveYourselfProcMask | SmcDieProcMask |
SmcSaveCompleteProcMask | SmcShutdownCancelledProcMask;
callbacks.save_yourself.callback = save_yourself_callback;
callbacks.save_yourself.client_data = NULL;
callbacks.die.callback = die_callback;
callbacks.die.client_data = NULL;
callbacks.save_complete.callback = save_complete_callback;
callbacks.save_complete.client_data = NULL;
callbacks.shutdown_cancelled.callback = shutdown_cancelled_callback;
callbacks.shutdown_cancelled.client_data = NULL;
session_connection =
SmcOpenConnection (NULL, /* use SESSION_MANAGER env */
NULL, /* means use existing ICE connection */
@@ -276,10 +276,10 @@ meta_session_init (const char *previous_client_id,
(char*) previous_client_id,
&client_id,
255, buf);
if (session_connection == NULL)
{
meta_topic (META_DEBUG_SM,
meta_topic (META_DEBUG_SM,
"Failed to a open connection to a session manager, so window positions will not be saved: %s\n",
buf);
@@ -296,7 +296,7 @@ meta_session_init (const char *previous_client_id,
current_state = STATE_IDLE;
else
current_state = STATE_REGISTERING;
{
SmProp prop1, prop2, prop3, prop4, prop5, prop6, *props[6];
SmPropValue prop1val, prop2val, prop3val, prop4val, prop5val, prop6val;
@@ -328,7 +328,7 @@ meta_session_init (const char *previous_client_id,
prop2.vals = &prop2val;
prop2val.value = (char*) g_get_user_name ();
prop2val.length = strlen (prop2val.value);
prop3.name = SmRestartStyleHint;
prop3.type = SmCARD8;
prop3.num_vals = 1;
@@ -342,7 +342,7 @@ meta_session_init (const char *previous_client_id,
prop4.num_vals = 1;
prop4.vals = &prop4val;
prop4val.value = pid;
prop4val.length = strlen (prop4val.value);
prop4val.length = strlen (prop4val.value);
/* Always start in home directory */
prop5.name = SmCurrentDirectory;
@@ -358,14 +358,14 @@ meta_session_init (const char *previous_client_id,
prop6.vals = &prop6val;
prop6val.value = &priority;
prop6val.length = 1;
props[0] = &prop1;
props[1] = &prop2;
props[2] = &prop3;
props[3] = &prop4;
props[4] = &prop5;
props[5] = &prop6;
SmcSetProperties (session_connection, 6, props);
}
@@ -388,11 +388,11 @@ save_yourself_possibly_done (gboolean shutdown,
meta_topic (META_DEBUG_SM,
"save possibly done shutdown = %d success = %d\n",
shutdown, successful);
if (current_state == STATE_SAVING_PHASE_1)
{
Status status;
status = SmcRequestSaveYourselfPhase2 (session_connection,
save_phase_2_callback,
GINT_TO_POINTER (shutdown));
@@ -423,17 +423,17 @@ save_yourself_possibly_done (gboolean shutdown,
meta_topic (META_DEBUG_SM,
"Requested interact, status = %d\n", status);
}
if (current_state == STATE_SAVING_PHASE_1 ||
current_state == STATE_SAVING_PHASE_2 ||
current_state == STATE_DONE_WITH_INTERACT ||
current_state == STATE_SKIPPING_GLOBAL_SAVE)
{
meta_topic (META_DEBUG_SM, "Sending SaveYourselfDone\n");
SmcSaveYourselfDone (session_connection,
successful);
if (shutdown)
current_state = STATE_FROZEN;
else
@@ -441,19 +441,19 @@ save_yourself_possibly_done (gboolean shutdown,
}
}
static void
static void
save_phase_2_callback (SmcConn smc_conn, SmPointer client_data)
{
gboolean shutdown;
meta_topic (META_DEBUG_SM, "Phase 2 save");
shutdown = GPOINTER_TO_INT (client_data);
current_state = STATE_SAVING_PHASE_2;
save_state ();
save_yourself_possibly_done (shutdown, TRUE);
}
@@ -468,9 +468,9 @@ save_yourself_callback (SmcConn smc_conn,
gboolean successful;
meta_topic (META_DEBUG_SM, "SaveYourself received");
successful = TRUE;
/* The first SaveYourself after registering for the first time
* is a special case (SM specs 7.2).
*/
@@ -480,8 +480,8 @@ save_yourself_callback (SmcConn smc_conn,
{
current_state = STATE_IDLE;
/* Double check that this is a section 7.2 SaveYourself: */
if (save_style == SmSaveLocal &&
if (save_style == SmSaveLocal &&
interact_style == SmInteractStyleNone &&
!shutdown && !fast)
{
@@ -493,7 +493,7 @@ save_yourself_callback (SmcConn smc_conn,
#endif
/* ignore Global style saves
*
*
* This interpretaion of the Local/Global/Both styles
* was discussed extensively on the xdg-list. See:
*
@@ -507,11 +507,11 @@ save_yourself_callback (SmcConn smc_conn,
}
interaction_allowed = interact_style != SmInteractStyleNone;
current_state = STATE_SAVING_PHASE_1;
regenerate_save_file ();
set_clone_restart_commands ();
save_yourself_possibly_done (shutdown, successful);
@@ -550,7 +550,7 @@ static void
shutdown_cancelled_callback (SmcConn smc_conn, SmPointer client_data)
{
meta_topic (META_DEBUG_SM, "Shutdown cancelled received\n");
if (session_connection != NULL &&
(current_state != STATE_IDLE && current_state != STATE_FROZEN))
{
@@ -559,14 +559,14 @@ shutdown_cancelled_callback (SmcConn smc_conn, SmPointer client_data)
}
}
static void
static void
interact_callback (SmcConn smc_conn, SmPointer client_data)
{
/* nothing */
gboolean shutdown;
meta_topic (META_DEBUG_SM, "Interaction permission received\n");
shutdown = GPOINTER_TO_INT (client_data);
current_state = STATE_DONE_WITH_INTERACT;
@@ -585,14 +585,14 @@ set_clone_restart_commands (void)
const char *prgname;
prgname = g_get_prgname ();
/* Restart (use same client ID) */
prop1.name = SmRestartCommand;
prop1.type = SmLISTofARRAY8;
g_return_if_fail (client_id);
i = 0;
restartv[i] = (char *)prgname;
++i;
@@ -613,7 +613,7 @@ set_clone_restart_commands (void)
prop1.num_vals = i;
/* Clone (no client ID) */
i = 0;
clonev[i] = (char *)prgname;
++i;
@@ -621,7 +621,7 @@ set_clone_restart_commands (void)
prop2.name = SmCloneCommand;
prop2.type = SmLISTofARRAY8;
prop2.vals = g_new (SmPropValue, i);
i = 0;
while (clonev[i])
@@ -633,7 +633,7 @@ set_clone_restart_commands (void)
prop2.num_vals = i;
/* Discard */
i = 0;
discardv[i] = "rm";
++i;
@@ -642,10 +642,10 @@ set_clone_restart_commands (void)
discardv[i] = (char*) full_save_file ();
++i;
discardv[i] = NULL;
prop3.name = SmDiscardCommand;
prop3.type = SmLISTofARRAY8;
prop3.vals = g_new (SmPropValue, i);
i = 0;
while (discardv[i])
@@ -656,11 +656,11 @@ set_clone_restart_commands (void)
}
prop3.num_vals = i;
props[0] = &prop1;
props[1] = &prop2;
props[2] = &prop3;
SmcSetProperties (session_connection, 3, props);
g_free (prop1.vals);
@@ -713,7 +713,7 @@ window_type_to_string (MetaWindowType type)
}
return "";
}
}
static MetaWindowType
window_type_from_string (const char *str)
@@ -776,7 +776,7 @@ encode_text_as_utf8_markup (const char *text)
GString *str;
const char *p;
char *escaped;
str = g_string_new ("");
p = text;
@@ -788,7 +788,7 @@ encode_text_as_utf8_markup (const char *text)
escaped = g_markup_escape_text (str->str, str->len);
g_string_free (str, TRUE);
return escaped;
}
@@ -800,7 +800,7 @@ decode_text_from_utf8 (const char *text)
const char *p;
str = g_string_new ("");
p = text;
while (*p)
{
@@ -822,11 +822,11 @@ save_state (void)
GSList *windows;
GSList *tmp;
int stack_position;
g_assert (client_id);
outfile = NULL;
/*
* g_get_user_config_dir() is guaranteed to return an existing directory.
* Eventually, if SM stays with the WM, I'd like to make this
@@ -838,7 +838,7 @@ save_state (void)
mutter_dir = g_strconcat (g_get_user_config_dir (),
G_DIR_SEPARATOR_S "mutter",
NULL);
session_dir = g_strconcat (mutter_dir,
G_DIR_SEPARATOR_S "sessions",
NULL);
@@ -858,7 +858,7 @@ save_state (void)
}
meta_topic (META_DEBUG_SM, "Saving session to '%s'\n", full_save_file ());
outfile = fopen (full_save_file (), "w");
if (outfile == NULL)
@@ -881,9 +881,9 @@ save_state (void)
* Note that attributes on <window> are the match info we use to
* see if the saved state applies to a restored window, and
* child elements are the saved state to be applied.
*
*
*/
fprintf (outfile, "<mutter_session id=\"%s\">\n",
client_id);
@@ -912,7 +912,7 @@ save_state (void)
* in UTF-8 (I think they are in XPCS which is Latin-1?
* in practice they are always ascii though.)
*/
sm_client_id = encode_text_as_utf8_markup (window->sm_client_id);
res_class = window->res_class ?
encode_text_as_utf8_markup (window->res_class) : NULL;
@@ -924,7 +924,7 @@ save_state (void)
title = g_markup_escape_text (window->title, -1);
else
title = NULL;
meta_topic (META_DEBUG_SM, "Saving session managed window %s, client ID '%s'\n",
window->desc, window->sm_client_id);
@@ -943,7 +943,7 @@ save_state (void)
g_free (res_name);
g_free (role);
g_free (title);
/* Sticky */
if (window->on_all_workspaces_requested)
fputs (" <sticky/>\n", outfile);
@@ -956,13 +956,13 @@ save_state (void)
if (META_WINDOW_MAXIMIZED (window))
{
fprintf (outfile,
" <maximized saved_x=\"%d\" saved_y=\"%d\" saved_width=\"%d\" saved_height=\"%d\"/>\n",
" <maximized saved_x=\"%d\" saved_y=\"%d\" saved_width=\"%d\" saved_height=\"%d\"/>\n",
window->saved_rect.x,
window->saved_rect.y,
window->saved_rect.width,
window->saved_rect.height);
}
/* Workspaces we're on */
{
int n;
@@ -975,13 +975,13 @@ save_state (void)
{
int x, y, w, h;
meta_window_get_geometry (window, &x, &y, &w, &h);
fprintf (outfile,
" <geometry x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" gravity=\"%s\"/>\n",
x, y, w, h,
meta_gravity_to_string (window->size_hints.win_gravity));
}
fputs (" </window>\n", outfile);
}
else
@@ -989,15 +989,15 @@ save_state (void)
meta_topic (META_DEBUG_SM, "Not saving window '%s', not session managed\n",
window->desc);
}
tmp = tmp->next;
++stack_position;
}
g_slist_free (windows);
fputs ("</mutter_session>\n", outfile);
out:
if (outfile)
{
@@ -1013,7 +1013,7 @@ save_state (void)
full_save_file (), g_strerror (errno));
}
}
g_free (mutter_dir);
g_free (session_dir);
}
@@ -1094,7 +1094,7 @@ load_state (const char *previous_save_file)
G_DIR_SEPARATOR_S,
previous_save_file,
NULL);
if (!g_file_get_contents (session_file,
&text,
&length,
@@ -1114,10 +1114,10 @@ load_state (const char *previous_save_file)
meta_topic (META_DEBUG_SM, "Parsing saved session file %s\n", session_file);
g_free (session_file);
session_file = NULL;
parse_data.info = NULL;
parse_data.previous_id = NULL;
context = g_markup_parse_context_new (&mutter_session_parser,
0, &parse_data, NULL);
@@ -1127,8 +1127,8 @@ load_state (const char *previous_save_file)
length,
&error))
goto error;
error = NULL;
if (!g_markup_parse_context_end_parse (context, &error))
goto error;
@@ -1138,7 +1138,7 @@ load_state (const char *previous_save_file)
goto out;
error:
meta_warning ("Failed to parse saved session file: %s\n",
error->message);
g_error_free (error);
@@ -1148,9 +1148,9 @@ load_state (const char *previous_save_file)
g_free (parse_data.previous_id);
parse_data.previous_id = NULL;
out:
g_free (text);
return parse_data.previous_id;
@@ -1172,14 +1172,14 @@ start_element_handler (GMarkupParseContext *context,
if (strcmp (element_name, "mutter_session") == 0)
{
/* Get previous ID */
int i;
int i;
i = 0;
while (attribute_names[i])
{
const char *name;
const char *val;
name = attribute_names[i];
val = attribute_values[i];
@@ -1191,7 +1191,7 @@ start_element_handler (GMarkupParseContext *context,
"<mutter_session> attribute seen but we already have the session ID");
return;
}
if (strcmp (name, "id") == 0)
{
pd->previous_id = decode_text_from_utf8 (val);
@@ -1205,14 +1205,14 @@ start_element_handler (GMarkupParseContext *context,
name, "mutter_session");
return;
}
++i;
}
}
else if (strcmp (element_name, "window") == 0)
{
int i;
if (pd->info)
{
g_set_error (error,
@@ -1221,7 +1221,7 @@ start_element_handler (GMarkupParseContext *context,
"nested <window> tag");
return;
}
pd->info = session_info_new ();
i = 0;
@@ -1229,10 +1229,10 @@ start_element_handler (GMarkupParseContext *context,
{
const char *name;
const char *val;
name = attribute_names[i];
val = attribute_values[i];
if (strcmp (name, "id") == 0)
{
if (*val)
@@ -1282,7 +1282,7 @@ start_element_handler (GMarkupParseContext *context,
pd->info = NULL;
return;
}
++i;
}
}
@@ -1296,7 +1296,7 @@ start_element_handler (GMarkupParseContext *context,
const char *name;
name = attribute_names[i];
if (strcmp (name, "index") == 0)
{
pd->info->workspace_indices =
@@ -1314,7 +1314,7 @@ start_element_handler (GMarkupParseContext *context,
pd->info = NULL;
return;
}
++i;
}
}
@@ -1394,22 +1394,22 @@ start_element_handler (GMarkupParseContext *context,
pd->info->saved_rect.y,
pd->info->saved_rect.width,
pd->info->saved_rect.height);
}
}
else if (strcmp (element_name, "geometry") == 0)
{
int i;
pd->info->geometry_set = TRUE;
i = 0;
while (attribute_names[i])
{
const char *name;
const char *val;
name = attribute_names[i];
val = attribute_values[i];
if (strcmp (name, "x") == 0)
{
if (*val)
@@ -1444,7 +1444,7 @@ start_element_handler (GMarkupParseContext *context,
name, "geometry");
return;
}
++i;
}
@@ -1482,12 +1482,12 @@ end_element_handler (GMarkupParseContext *context,
window_info_list = g_slist_prepend (window_info_list,
pd->info);
meta_topic (META_DEBUG_SM, "Loaded window info from session with class: %s name: %s role: %s\n",
pd->info->res_class ? pd->info->res_class : "(none)",
pd->info->res_name ? pd->info->res_name : "(none)",
pd->info->role ? pd->info->role : "(none)");
pd->info = NULL;
}
}
@@ -1523,20 +1523,20 @@ get_possible_matches (MetaWindow *window)
GSList *retval;
GSList *tmp;
gboolean ignore_client_id;
retval = NULL;
ignore_client_id = g_getenv ("MUTTER_DEBUG_SM") != NULL;
tmp = window_info_list;
while (tmp != NULL)
{
MetaWindowSessionInfo *info;
info = tmp->data;
if ((ignore_client_id ||
both_null_or_matching (info->id, window->sm_client_id)) &&
both_null_or_matching (info->id, window->sm_client_id)) &&
both_null_or_matching (info->res_class, window->res_class) &&
both_null_or_matching (info->res_name, window->res_name) &&
both_null_or_matching (info->role, window->role))
@@ -1563,7 +1563,7 @@ get_possible_matches (MetaWindow *window)
window->desc,
window->res_class ? window->res_class : "(none)",
info->res_class ? info->res_class : "(none)");
else if (!both_null_or_matching (info->res_name, window->res_name))
meta_topic (META_DEBUG_SM, "Window %s has name %s doesn't match saved name %s, no match\n",
window->desc,
@@ -1579,7 +1579,7 @@ get_possible_matches (MetaWindow *window)
window->desc, info->id);
}
}
tmp = tmp->next;
}
@@ -1593,10 +1593,10 @@ find_best_match (GSList *infos,
GSList *tmp;
const MetaWindowSessionInfo *matching_title;
const MetaWindowSessionInfo *matching_type;
matching_title = NULL;
matching_type = NULL;
tmp = infos;
while (tmp != NULL)
{
@@ -1611,7 +1611,7 @@ find_best_match (GSList *infos,
if (matching_type == NULL &&
info->type == window->type)
matching_type = info;
tmp = tmp->next;
}
@@ -1620,7 +1620,7 @@ find_best_match (GSList *infos,
* to e.g. break ties by geometry hint similarity,
* or other window features.
*/
if (matching_title)
return matching_title;
else if (matching_type)
@@ -1634,7 +1634,7 @@ meta_window_lookup_saved_state (MetaWindow *window)
{
GSList *possibles;
const MetaWindowSessionInfo *info;
/* Window is not session managed.
* I haven't yet figured out how to deal with these
* in a way that doesn't cause broken side effects in
@@ -1658,9 +1658,9 @@ meta_window_lookup_saved_state (MetaWindow *window)
}
info = find_best_match (possibles, window);
g_slist_free (possibles);
return info;
}
@@ -1685,7 +1685,7 @@ session_info_free (MetaWindowSessionInfo *info)
g_free (info->role);
g_slist_free (info->workspace_indices);
g_free (info);
}
@@ -1698,7 +1698,7 @@ session_info_new (void)
info->type = META_WINDOW_NORMAL;
info->gravity = NorthWestGravity;
return info;
}
@@ -1739,7 +1739,7 @@ finish_interact (gboolean shutdown)
if (current_state == STATE_DONE_WITH_INTERACT) /* paranoia */
{
SmcInteractDone (session_connection, False /* don't cancel logout */);
save_yourself_possibly_done (shutdown, TRUE);
}
}
@@ -1764,13 +1764,13 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
GSList *tmp;
GSList *columns = NULL;
GPid pid;
windows = meta_display_list_windows (meta_get_display (), META_LIST_DEFAULT);
tmp = windows;
while (tmp != NULL)
{
MetaWindow *window;
window = tmp->data;
/* only complain about normal windows, the others
@@ -1779,12 +1779,12 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
if (window->sm_client_id == NULL &&
window->type == META_WINDOW_NORMAL)
lame = g_slist_prepend (lame, window);
tmp = tmp->next;
}
g_slist_free (windows);
if (lame == NULL)
{
/* No lame apps. */

View File

@@ -9,9 +9,9 @@
* requires us to do it here.
*/
/*
/*
* Copyright (C) 2001 Havoc Pennington
*
*
* 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
@@ -21,7 +21,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/>.
*/
@@ -45,11 +45,11 @@ struct _MetaWindowSessionInfo
MetaWindowType type;
/* Information we restore */
GSList *workspace_indices;
GSList *workspace_indices;
int stack_position;
/* width/height should be multiplied by resize inc and
* added to base size; position should be interpreted in
* light of gravity. This preserves semantics of the

View File

@@ -94,14 +94,14 @@ x_error_handler (Display *xdisplay,
if (error_trap_depth == 0)
{
print_backtrace ();
fprintf (stderr, "Unexpected X error: %s serial %ld error_code %d request_code %d minor_code %d)\n",
buf,
error->serial,
error->error_code,
error->request_code,
error->minor_code);
exit (1);
}
@@ -122,7 +122,7 @@ error_trap_pop (Display *xdisplay)
fprintf (stderr, "Error trap underflow!\n");
exit (1);
}
XSync (xdisplay, False); /* get all errors out of the queue */
--error_trap_depth;
}
@@ -192,11 +192,11 @@ try_get_reply (Display *xdisplay,
struct timeval current_time;
gettimeofday (&current_time, NULL);
printf (" %gms (we have a reply for property %ld)\n",
ELAPSED (program_start_time, current_time),
ag_task_get_property (task));
data = NULL;
name = atom_name (xdisplay,
@@ -204,7 +204,7 @@ try_get_reply (Display *xdisplay,
printf (" %s on 0x%lx:\n", name,
ag_task_get_window (task));
free (name);
result = ag_task_get_reply_and_free (task,
&actual_type,
&actual_format,
@@ -222,12 +222,12 @@ try_get_reply (Display *xdisplay,
name = atom_name (xdisplay, actual_type);
printf (" actual_type = %s\n", name);
free (name);
printf (" actual_format = %d\n", actual_format);
printf (" n_items = %lu\n", n_items);
printf (" bytes_after = %lu\n", bytes_after);
printf (" data = \"%s\"\n", data ? (char*) data : "NULL");
}
@@ -252,13 +252,13 @@ main (int argc, char **argv)
char *end;
Atom *props;
struct timeval current_time;
if (argc < 2)
{
fprintf (stderr, "specify window ID\n");
return 1;
}
window_str = argv[1];
end = NULL;
@@ -280,7 +280,7 @@ main (int argc, char **argv)
XSynchronize (xdisplay, True);
XSetErrorHandler (x_error_handler);
n_props = 0;
props = XListProperties (xdisplay, window, &n_props);
if (n_props == 0 || props == NULL)
@@ -290,7 +290,7 @@ main (int argc, char **argv)
}
gettimeofday (&program_start_time, NULL);
i = 0;
while (i < n_props)
{
@@ -307,7 +307,7 @@ main (int argc, char **argv)
fprintf (stderr, "Failed to send request\n");
return 1;
}
++i;
}
@@ -315,24 +315,24 @@ main (int argc, char **argv)
props = NULL;
n_left = n_props;
while (TRUE)
{
XEvent xevent;
int connection;
fd_set set;
AgGetPropertyTask *task;
/* Mop up event queue */
while (XPending (xdisplay) > 0)
{
{
XNextEvent (xdisplay, &xevent);
gettimeofday (&current_time, NULL);
printf (" %gms (processing event type %d)\n",
ELAPSED (program_start_time, current_time),
xevent.xany.type);
}
while ((task = ag_get_next_completed_task (xdisplay)))
{
try_get_reply (xdisplay, task);
@@ -358,7 +358,7 @@ main (int argc, char **argv)
}
run_speed_comparison (xdisplay, window);
return 0;
}
@@ -373,7 +373,7 @@ run_speed_comparison (Display *xdisplay,
int n_props;
struct timeval start, end;
int n_left;
/* We just use atom values (0 to n_props) % 200, many are probably
* BadAtom, that's fine, but the %200 keeps most of them valid. The
* async case is about twice as advantageous when using valid atoms
@@ -382,9 +382,9 @@ run_speed_comparison (Display *xdisplay,
*/
n_props = 4000;
printf ("Timing with %d property requests\n", n_props);
gettimeofday (&start, NULL);
i = 0;
while (i < n_props)
{
@@ -397,23 +397,23 @@ run_speed_comparison (Display *xdisplay,
fprintf (stderr, "Failed to send request\n");
exit (1);
}
++i;
}
n_left = n_props;
while (TRUE)
{
int connection;
fd_set set;
XEvent xevent;
AgGetPropertyTask *task;
/* Mop up event queue */
while (XPending (xdisplay) > 0)
XNextEvent (xdisplay, &xevent);
while ((task = ag_get_next_completed_task (xdisplay)))
{
Atom actual_type;
@@ -423,7 +423,7 @@ run_speed_comparison (Display *xdisplay,
unsigned char *data;
assert (ag_task_have_reply (task));
data = NULL;
ag_task_get_reply_and_free (task,
&actual_type,
@@ -431,13 +431,13 @@ run_speed_comparison (Display *xdisplay,
&n_items,
&bytes_after,
&data);
if (data)
XFree (data);
n_left -= 1;
}
if (n_left == 0)
break;
@@ -449,16 +449,16 @@ run_speed_comparison (Display *xdisplay,
select (connection + 1, &set, NULL, NULL, NULL);
}
gettimeofday (&end, NULL);
printf ("Async time: %gms\n",
ELAPSED (start, end));
gettimeofday (&start, NULL);
error_trap_push (xdisplay);
i = 0;
while (i < n_props)
{
@@ -467,7 +467,7 @@ run_speed_comparison (Display *xdisplay,
unsigned long n_items;
unsigned long bytes_after;
unsigned char *data;
data = NULL;
if (XGetWindowProperty (xdisplay, window,
(Atom) i % 200,
@@ -483,14 +483,14 @@ run_speed_comparison (Display *xdisplay,
if (data)
XFree (data);
}
++i;
}
error_trap_pop (xdisplay);
gettimeofday (&end, NULL);
printf ("Sync time: %gms\n",
ELAPSED (start, end));
}

View File

@@ -15,11 +15,11 @@
* together.
*/
/*
/*
* Copyright (C) 2001, 2002, 2003 Red Hat, Inc.
* Copyright (C) 2004, 2005 Elijah Newren
* Copyright (C) 2009 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
@@ -29,7 +29,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/>.
*/
@@ -196,7 +196,7 @@ reload_wm_client_machine (MetaWindow *window,
{
g_free (window->wm_client_machine);
window->wm_client_machine = NULL;
if (value->type != META_PROP_VALUE_INVALID)
window->wm_client_machine = g_strdup (value->v.str);
@@ -345,7 +345,7 @@ reload_net_wm_pid (MetaWindow *window,
if (value->type != META_PROP_VALUE_INVALID)
{
gulong cardinal = (int) value->v.cardinal;
if (cardinal <= 0)
meta_warning ("Application set a bogus _NET_WM_PID %lu\n",
cardinal);
@@ -445,12 +445,12 @@ set_title_text (MetaWindow *window,
char **target)
{
gboolean modified = FALSE;
if (!target)
return FALSE;
g_free (*target);
if (!title)
*target = g_strdup ("");
else if (g_utf8_strlen (title, MAX_TITLE_LENGTH + 1) > MAX_TITLE_LENGTH)
@@ -503,7 +503,7 @@ set_window_title (MetaWindow *window,
window->display->atom__NET_WM_VISIBLE_NAME,
&new_title);
priv->using_net_wm_visible_name = modified;
meta_window_set_title (window, new_title);
g_free (new_title);
@@ -548,7 +548,7 @@ reload_wm_name (MetaWindow *window,
value->v.str);
return;
}
if (value->type != META_PROP_VALUE_INVALID)
{
set_window_title (window, value->v.str);
@@ -796,7 +796,7 @@ reload_mwm_hints (MetaWindow *window,
meta_verbose ("Functions flag unset\n");
meta_window_recalc_features (window);
/* We do all this anyhow at the end of meta_window_x11_new() */
if (!window->constructing)
{
@@ -804,7 +804,7 @@ reload_mwm_hints (MetaWindow *window,
meta_window_ensure_frame (window);
else
meta_window_destroy_frame (window);
meta_window_queue (window,
META_QUEUE_MOVE_RESIZE |
/* because ensure/destroy frame may unmap: */
@@ -859,32 +859,32 @@ reload_net_startup_id (MetaWindow *window,
{
guint32 timestamp = window->net_wm_user_time;
MetaWorkspace *workspace = NULL;
g_free (window->startup_id);
if (value->type != META_PROP_VALUE_INVALID)
window->startup_id = g_strdup (value->v.str);
else
window->startup_id = NULL;
/* Update timestamp and workspace on a running window */
if (!window->constructing)
{
window->initial_timestamp_set = 0;
window->initial_timestamp_set = 0;
window->initial_workspace_set = 0;
if (meta_screen_apply_startup_properties (window->screen, window))
{
if (window->initial_timestamp_set)
timestamp = window->initial_timestamp;
if (window->initial_workspace_set)
workspace = meta_screen_get_workspace_by_index (window->screen, window->initial_workspace);
meta_window_activate_with_workspace (window, timestamp, workspace);
}
}
meta_verbose ("New _NET_STARTUP_ID \"%s\" for %s\n",
window->startup_id ? window->startup_id : "unset",
window->desc);
@@ -982,7 +982,7 @@ spew_size_hints_differences (const XSizeHints *old,
if (FLAG_CHANGED (old, new, PWinGravity))
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PWinGravity now %s (%d -> %d)\n",
FLAG_TOGGLED_ON (old, new, PWinGravity) ? "set" : "unset",
old->win_gravity, new->win_gravity);
old->win_gravity, new->win_gravity);
}
void
@@ -1335,15 +1335,15 @@ reload_normal_hints (MetaWindow *window,
if (value->type != META_PROP_VALUE_INVALID)
{
XSizeHints old_hints;
meta_topic (META_DEBUG_GEOMETRY, "Updating WM_NORMAL_HINTS for %s\n", window->desc);
old_hints = window->size_hints;
meta_set_normal_hints (window, value->v.size_hints.hints);
spew_size_hints_differences (&old_hints, &window->size_hints);
meta_window_recalc_features (window);
if (!initial)
@@ -1357,12 +1357,12 @@ reload_wm_protocols (MetaWindow *window,
gboolean initial)
{
int i;
window->take_focus = FALSE;
window->delete_window = FALSE;
window->can_ping = FALSE;
if (value->type == META_PROP_VALUE_INVALID)
if (value->type == META_PROP_VALUE_INVALID)
return;
i = 0;
@@ -1379,7 +1379,7 @@ reload_wm_protocols (MetaWindow *window,
window->can_ping = TRUE;
++i;
}
meta_verbose ("New _NET_STARTUP_ID \"%s\" for %s\n",
window->startup_id ? window->startup_id : "unset",
window->desc);
@@ -1394,7 +1394,7 @@ reload_wm_hints (MetaWindow *window,
gboolean urgent;
old_group_leader = window->xgroup_leader;
/* Fill in defaults */
window->input = TRUE;
window->initially_iconic = FALSE;
@@ -1406,7 +1406,7 @@ reload_wm_hints (MetaWindow *window,
if (value->type != META_PROP_VALUE_INVALID)
{
const XWMHints *hints = value->v.wm_hints;
if (hints->flags & InputHint)
window->input = hints->input;
@@ -1436,7 +1436,7 @@ reload_wm_hints (MetaWindow *window,
{
meta_verbose ("Window %s changed its group leader to 0x%lx\n",
window->desc, window->xgroup_leader);
meta_window_group_leader_changed (window);
}
@@ -1709,7 +1709,7 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
MetaWindowPropHooks *table = g_memdup (hooks, sizeof (hooks)),
*cursor = table;
g_assert (display->prop_hooks == NULL);
display->prop_hooks_table = (gpointer) table;

View File

@@ -11,9 +11,9 @@
* round trip to the server.
*/
/*
/*
* Copyright (C) 2001, 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
@@ -23,7 +23,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/>.
*/

View File

@@ -2,7 +2,7 @@
/* Mutter X property convenience routines */
/*
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2002 Red Hat Inc.
*
@@ -10,7 +10,7 @@
* Copyright 1987, 1988, 1998 The Open Group
* Copyright 1988 by Wyse Technology, Inc., San Jose, Ca,
* Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
*
*
* 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
@@ -20,7 +20,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/>.
*/
@@ -31,20 +31,20 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
both that copyright notice and this permission notice appear in
supporting documentation, and that the name Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
software without specific, written prior permission.
DIGITAL AND WYSE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL DIGITAL OR WYSE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
DIGITAL AND WYSE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL DIGITAL OR WYSE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
@@ -114,12 +114,12 @@ validate_or_free_results (GetPropertyResults *results,
const char *res_class;
const char *res_name;
MetaWindow *w;
if (expected_format == results->format &&
expected_type == results->type &&
(!must_have_items || results->n_items > 0))
return TRUE;
return TRUE;
meta_error_trap_push (results->display);
type_name = XGetAtomName (results->display->xdisplay, results->type);
expected_name = XGetAtomName (results->display->xdisplay, expected_type);
@@ -140,7 +140,7 @@ validate_or_free_results (GetPropertyResults *results,
res_class = NULL;
res_name = NULL;
}
if (title == NULL)
title = "unknown";
@@ -149,7 +149,7 @@ validate_or_free_results (GetPropertyResults *results,
if (res_name == NULL)
res_name = "unknown";
meta_warning ("Window 0x%lx has property %s\nthat was expected to have type %s format %d\nand actually has type %s format %d n_items %d.\nThis is most likely an application bug, not a window manager bug.\nThe window has title=\"%s\" class=\"%s\" name=\"%s\"\n",
results->xwindow,
prop_name ? prop_name : "(bad atom)",
@@ -171,7 +171,7 @@ validate_or_free_results (GetPropertyResults *results,
XFree (results->prop);
results->prop = NULL;
}
return FALSE;
}
@@ -190,7 +190,7 @@ get_property (MetaDisplay *display,
results->type = None;
results->bytes_after = 0;
results->format = 0;
meta_error_trap_push (display);
if (XGetWindowProperty (display->xdisplay, xwindow, xatom,
0, G_MAXLONG,
@@ -222,12 +222,12 @@ atom_list_from_results (GetPropertyResults *results,
int *n_atoms_p)
{
if (!validate_or_free_results (results, 32, XA_ATOM, FALSE))
return FALSE;
return FALSE;
*atoms_p = (Atom*) results->prop;
*n_atoms_p = results->n_items;
results->prop = NULL;
results->prop = NULL;
return TRUE;
}
@@ -256,12 +256,12 @@ cardinal_list_from_results (GetPropertyResults *results,
int *n_cardinals_p)
{
if (!validate_or_free_results (results, 32, XA_CARDINAL, FALSE))
return FALSE;
return FALSE;
*cardinals_p = (gulong*) results->prop;
*n_cardinals_p = results->n_items;
results->prop = NULL;
#if GLIB_SIZEOF_LONG == 8
/* Xlib sign-extends format=32 items, but we want them unsigned */
{
@@ -300,8 +300,8 @@ motif_hints_from_results (GetPropertyResults *results,
{
int real_size, max_size;
#define MAX_ITEMS sizeof (MotifWmHints)/sizeof (gulong)
*hints_p = NULL;
*hints_p = NULL;
if (results->type == None || results->n_items <= 0)
{
@@ -337,7 +337,7 @@ motif_hints_from_results (GetPropertyResults *results,
XFree (results->prop);
results->prop = NULL;
}
return TRUE;
}
@@ -348,7 +348,7 @@ meta_prop_get_motif_hints (MetaDisplay *display,
MotifWmHints **hints_p)
{
GetPropertyResults results;
*hints_p = NULL;
if (!get_property (display, xwindow, xatom, AnyPropertyType,
@@ -363,13 +363,13 @@ latin1_string_from_results (GetPropertyResults *results,
char **str_p)
{
*str_p = NULL;
if (!validate_or_free_results (results, 8, XA_STRING, FALSE))
return FALSE;
*str_p = (char*) results->prop;
results->prop = NULL;
return TRUE;
}
@@ -386,7 +386,7 @@ meta_prop_get_latin1_string (MetaDisplay *display,
if (!get_property (display, xwindow, xatom, XA_STRING,
&results))
return FALSE;
return latin1_string_from_results (&results, str_p);
}
@@ -395,7 +395,7 @@ utf8_string_from_results (GetPropertyResults *results,
char **str_p)
{
*str_p = NULL;
if (!validate_or_free_results (results, 8,
results->display->atom_UTF8_STRING, FALSE))
return FALSE;
@@ -411,13 +411,13 @@ utf8_string_from_results (GetPropertyResults *results,
meta_XFree (name);
XFree (results->prop);
results->prop = NULL;
return FALSE;
}
*str_p = (char*) results->prop;
results->prop = NULL;
return TRUE;
}
@@ -449,14 +449,14 @@ utf8_list_from_results (GetPropertyResults *results,
int n_strings;
char **retval;
const char *p;
*str_p = NULL;
*n_str_p = 0;
if (!validate_or_free_results (results, 8,
results->display->atom_UTF8_STRING, FALSE))
return FALSE;
/* I'm not sure this is right, but I'm guessing the
* property is nul-separated
*/
@@ -471,11 +471,11 @@ utf8_list_from_results (GetPropertyResults *results,
if (results->prop[results->n_items - 1] != '\0')
++n_strings;
/* we're guaranteed that results->prop has a nul on the end
* by XGetWindowProperty
*/
retval = g_new0 (char*, n_strings + 1);
p = (char *)results->prop;
@@ -494,17 +494,17 @@ utf8_list_from_results (GetPropertyResults *results,
meta_XFree (name);
meta_XFree (results->prop);
results->prop = NULL;
g_strfreev (retval);
return FALSE;
}
retval[i] = g_strdup (p);
p = p + strlen (p) + 1;
++i;
}
*str_p = retval;
*n_str_p = i;
@@ -544,13 +544,13 @@ latin1_list_from_results (GetPropertyResults *results,
int n_strings;
char **retval;
const char *p;
*str_p = NULL;
*n_str_p = 0;
if (!validate_or_free_results (results, 8, XA_STRING, FALSE))
return FALSE;
/* I'm not sure this is right, but I'm guessing the
* property is nul-separated
*/
@@ -565,11 +565,11 @@ latin1_list_from_results (GetPropertyResults *results,
if (results->prop[results->n_items - 1] != '\0')
++n_strings;
/* we're guaranteed that results->prop has a nul on the end
* by XGetWindowProperty
*/
retval = g_new0 (char*, n_strings + 1);
p = (char *)results->prop;
@@ -577,11 +577,11 @@ latin1_list_from_results (GetPropertyResults *results,
while (i < n_strings)
{
retval[i] = g_strdup (p);
p = p + strlen (p) + 1;
++i;
}
*str_p = retval;
*n_str_p = i;
@@ -616,9 +616,9 @@ meta_prop_set_utf8_string_hint (MetaDisplay *display,
const char *val)
{
meta_error_trap_push (display);
XChangeProperty (display->xdisplay,
XChangeProperty (display->xdisplay,
xwindow, atom,
display->atom_UTF8_STRING,
display->atom_UTF8_STRING,
8, PropModeReplace, (guchar*) val, strlen (val));
meta_error_trap_pop (display);
}
@@ -628,12 +628,12 @@ window_from_results (GetPropertyResults *results,
Window *window_p)
{
if (!validate_or_free_results (results, 32, XA_WINDOW, TRUE))
return FALSE;
return FALSE;
*window_p = *(Window*) results->prop;
XFree (results->prop);
results->prop = NULL;
results->prop = NULL;
return TRUE;
}
@@ -644,12 +644,12 @@ counter_from_results (GetPropertyResults *results,
if (!validate_or_free_results (results, 32,
XA_CARDINAL,
TRUE))
return FALSE;
return FALSE;
*counter_p = *(XSyncCounter*) results->prop;
XFree (results->prop);
results->prop = NULL;
return TRUE;
}
@@ -679,7 +679,7 @@ meta_prop_get_window (MetaDisplay *display,
GetPropertyResults results;
*window_p = None;
if (!get_property (display, xwindow, xatom, XA_WINDOW,
&results))
return FALSE;
@@ -703,7 +703,7 @@ cardinal_with_atom_type_from_results (GetPropertyResults *results,
gulong *cardinal_p)
{
if (!validate_or_free_results (results, 32, prop_type, TRUE))
return FALSE;
return FALSE;
*cardinal_p = *(gulong*) results->prop;
#if GLIB_SIZEOF_LONG == 8
@@ -711,8 +711,8 @@ cardinal_with_atom_type_from_results (GetPropertyResults *results,
*cardinal_p &= 0xffffffff;
#endif
XFree (results->prop);
results->prop = NULL;
results->prop = NULL;
return TRUE;
}
@@ -769,13 +769,13 @@ text_property_from_results (GetPropertyResults *results,
results->prop = NULL;
tp.encoding = results->type;
tp.format = results->format;
tp.nitems = results->n_items;
tp.nitems = results->n_items;
*utf8_str_p = text_property_to_utf8 (results->display->xdisplay, &tp);
if (tp.value != NULL)
XFree (tp.value);
return *utf8_str_p != NULL;
}
@@ -786,7 +786,7 @@ meta_prop_get_text_property (MetaDisplay *display,
char **utf8_str_p)
{
GetPropertyResults results;
if (!get_property (display, xwindow, xatom, AnyPropertyType,
&results))
return FALSE;
@@ -825,13 +825,13 @@ wm_hints_from_results (GetPropertyResults *results,
{
XWMHints *hints;
xPropWMHints *raw;
*hints_p = NULL;
if (!validate_or_free_results (results, 32, XA_WM_HINTS, TRUE))
return FALSE;
/* pre-R3 bogusly truncated window_group, don't fail on them */
*hints_p = NULL;
if (!validate_or_free_results (results, 32, XA_WM_HINTS, TRUE))
return FALSE;
/* pre-R3 bogusly truncated window_group, don't fail on them */
if (results->n_items < (NumPropWMHintsElements - 1))
{
meta_verbose ("WM_HINTS property too short: %d should be %d\n",
@@ -843,11 +843,11 @@ wm_hints_from_results (GetPropertyResults *results,
}
return FALSE;
}
hints = ag_Xmalloc0 (sizeof (XWMHints));
raw = (xPropWMHints*) results->prop;
hints->flags = raw->flags;
hints->input = (raw->input ? True : False);
hints->initial_state = cvtINT32toInt (raw->initialState);
@@ -881,7 +881,7 @@ meta_prop_get_wm_hints (MetaDisplay *display,
GetPropertyResults results;
*hints_p = NULL;
if (!get_property (display, xwindow, xatom, XA_WM_HINTS,
&results))
return FALSE;
@@ -894,13 +894,13 @@ class_hint_from_results (GetPropertyResults *results,
XClassHint *class_hint)
{
int len_name, len_class;
class_hint->res_class = NULL;
class_hint->res_name = NULL;
if (!validate_or_free_results (results, 8, XA_STRING, FALSE))
return FALSE;
len_name = strlen ((char *) results->prop);
if (! (class_hint->res_name = ag_Xmalloc (len_name+1)))
{
@@ -908,14 +908,14 @@ class_hint_from_results (GetPropertyResults *results,
results->prop = NULL;
return FALSE;
}
strcpy (class_hint->res_name, (char *)results->prop);
if (len_name == (int) results->n_items)
len_name--;
len_class = strlen ((char *)results->prop + len_name + 1);
if (! (class_hint->res_class = ag_Xmalloc(len_class+1)))
{
XFree(class_hint->res_name);
@@ -924,12 +924,12 @@ class_hint_from_results (GetPropertyResults *results,
results->prop = NULL;
return FALSE;
}
strcpy (class_hint->res_class, (char *)results->prop + len_name + 1);
XFree (results->prop);
results->prop = NULL;
return TRUE;
}
@@ -940,10 +940,10 @@ meta_prop_get_class_hint (MetaDisplay *display,
XClassHint *class_hint)
{
GetPropertyResults results;
class_hint->res_class = NULL;
class_hint->res_name = NULL;
if (!get_property (display, xwindow, xatom, XA_STRING,
&results))
return FALSE;
@@ -958,10 +958,10 @@ size_hints_from_results (GetPropertyResults *results,
{
xPropSizeHints *raw;
XSizeHints *hints;
*hints_p = NULL;
*flags_p = 0;
if (!validate_or_free_results (results, 32, XA_WM_SIZE_HINTS, FALSE))
return FALSE;
@@ -971,7 +971,7 @@ size_hints_from_results (GetPropertyResults *results,
raw = (xPropSizeHints*) results->prop;
hints = ag_Xmalloc (sizeof (XSizeHints));
/* XSizeHints misdeclares these as int instead of long */
hints->flags = raw->flags;
hints->x = cvtINT32toInt (raw->x);
@@ -999,12 +999,12 @@ size_hints_from_results (GetPropertyResults *results,
}
hints->flags &= (*flags_p); /* get rid of unwanted bits */
XFree (results->prop);
results->prop = NULL;
*hints_p = hints;
return TRUE;
}
@@ -1019,7 +1019,7 @@ meta_prop_get_size_hints (MetaDisplay *display,
*hints_p = NULL;
*flags_p = 0;
if (!get_property (display, xwindow, xatom, XA_WM_SIZE_HINTS,
&results))
return FALSE;
@@ -1044,7 +1044,7 @@ latin1_to_utf8 (const char *text)
{
GString *str;
const char *p;
str = g_string_new ("");
p = text;
@@ -1068,10 +1068,10 @@ meta_prop_get_values (MetaDisplay *display,
meta_verbose ("Requesting %d properties of 0x%lx at once\n",
n_values, xwindow);
if (n_values == 0)
return;
tasks = g_new0 (AgGetPropertyTask*, n_values);
/* Start up tasks. The "values" array can have values
@@ -1134,22 +1134,22 @@ meta_prop_get_values (MetaDisplay *display,
if (values[i].atom != None)
tasks[i] = get_task (display, xwindow,
values[i].atom, values[i].required_type);
++i;
}
}
/* Get replies for all our tasks */
meta_topic (META_DEBUG_SYNC, "Syncing to get %d GetProperty replies in %s\n",
n_values, G_STRFUNC);
XSync (display->xdisplay, False);
/* Collect results, should arrive in order requested */
i = 0;
while (i < n_values)
{
AgGetPropertyTask *task;
GetPropertyResults results;
if (tasks[i] == NULL)
{
/* Probably values[i].type was None, or ag_task_create()
@@ -1158,7 +1158,7 @@ meta_prop_get_values (MetaDisplay *display,
values[i].type = META_PROP_VALUE_INVALID;
goto next;
}
task = ag_get_next_completed_task (display->xdisplay);
g_assert (task != NULL);
g_assert (ag_task_have_reply (task));
@@ -1171,7 +1171,7 @@ meta_prop_get_values (MetaDisplay *display,
results.type = None;
results.bytes_after = 0;
results.format = 0;
if (ag_task_get_reply_and_free (task,
&results.type, &results.format,
&results.n_items,
@@ -1301,7 +1301,7 @@ free_value (MetaPropValue *value)
{
switch (value->type)
{
case META_PROP_VALUE_INVALID:
case META_PROP_VALUE_INVALID:
break;
case META_PROP_VALUE_UTF8:
case META_PROP_VALUE_STRING:
@@ -1310,10 +1310,10 @@ free_value (MetaPropValue *value)
break;
case META_PROP_VALUE_MOTIF_HINTS:
meta_XFree (value->v.motif_hints);
break;
break;
case META_PROP_VALUE_CARDINAL:
break;
case META_PROP_VALUE_WINDOW:
case META_PROP_VALUE_WINDOW:
break;
case META_PROP_VALUE_ATOM_LIST:
meta_XFree (value->v.atom_list.atoms);

View File

@@ -2,9 +2,9 @@
/* Mutter X property convenience routines */
/*
/*
* Copyright (C) 2001 Havoc Pennington
*
*
* 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/>.
*/
@@ -168,7 +168,7 @@ typedef struct
MetaPropValueType type;
Atom atom;
Atom required_type; /* autofilled if None */
union
{
char *str;
@@ -183,13 +183,13 @@ typedef struct
gulong *counters;
int n_counters;
} xcounter_list;
struct
{
XSizeHints *hints;
unsigned long flags;
} size_hints;
struct
{
gulong *cardinals;
@@ -207,7 +207,7 @@ typedef struct
Atom *atoms;
int n_atoms;
} atom_list;
} v;
} MetaPropValue;