[libwnck: 12/17] all: Code spacing fixes
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck: 12/17] all: Code spacing fixes
- Date: Wed, 19 Jan 2011 13:35:01 +0000 (UTC)
commit 08603cf45db1319c338c1103bc7c03eee16e49ab
Author: Vincent Untz <vuntz gnome org>
Date: Tue Jan 18 16:09:30 2011 +0100
all: Code spacing fixes
Makefile.am | 2 +-
libwnck/application.c | 90 +++++-----
libwnck/class-group.c | 22 +-
libwnck/pager-accessible-factory.c | 4 +-
libwnck/pager-accessible.c | 56 +++---
libwnck/pager.c | 234 +++++++++++-----------
libwnck/screen.c | 288 ++++++++++++++--------------
libwnck/selector.c | 22 +-
libwnck/tasklist.c | 376 ++++++++++++++++++------------------
libwnck/test-pager.c | 18 +-
libwnck/test-selector.c | 16 +-
libwnck/test-tasklist.c | 22 +-
libwnck/util.c | 38 ++--
libwnck/window-action-menu.c | 2 +-
libwnck/window.c | 160 ++++++++--------
libwnck/wnckprop.c | 12 +-
libwnck/workspace-accessible.c | 22 +-
libwnck/workspace.c | 38 ++--
libwnck/xutils.c | 376 ++++++++++++++++++------------------
19 files changed, 900 insertions(+), 898 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4f74b7e..e6bff93 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,7 +8,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libwnck-3.0.pc
EXTRA_DIST = \
- HACKING \
+ HACKING \
MAINTAINERS
MAINTAINERCLEANFILES = \
diff --git a/libwnck/application.c b/libwnck/application.c
index 1506417..936bc5d 100644
--- a/libwnck/application.c
+++ b/libwnck/application.c
@@ -64,16 +64,16 @@ struct _WnckApplicationPrivate
GdkPixbuf *icon;
GdkPixbuf *mini_icon;
-
+
WnckIconCache *icon_cache;
WnckWindow *icon_window;
char *startup_id;
-
+
guint name_from_leader : 1; /* name is from group leader */
guint icon_from_leader : 1;
-
+
guint need_emit_icon_changed : 1;
};
@@ -101,7 +101,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void
wnck_application_init (WnckApplication *application)
-{
+{
application->priv = WNCK_APPLICATION_GET_PRIVATE (application);
application->priv->xwindow = None;
@@ -137,7 +137,7 @@ wnck_application_class_init (WnckApplicationClass *klass)
g_type_class_add_private (klass, sizeof (WnckApplicationPrivate));
object_class->finalize = wnck_application_finalize;
-
+
/**
* WnckApplication::name-changed:
* @app: the #WnckApplication which emitted the signal.
@@ -180,7 +180,7 @@ wnck_application_finalize (GObject *object)
g_list_free (application->priv->windows);
application->priv->windows = NULL;
-
+
g_free (application->priv->name);
application->priv->name = NULL;
@@ -191,10 +191,10 @@ wnck_application_finalize (GObject *object)
if (application->priv->mini_icon)
g_object_unref (G_OBJECT (application->priv->mini_icon));
application->priv->mini_icon = NULL;
-
+
_wnck_icon_cache_free (application->priv->icon_cache);
application->priv->icon_cache = NULL;
-
+
g_free (application->priv->startup_id);
application->priv->startup_id = NULL;
@@ -225,25 +225,25 @@ wnck_application_get (gulong xwindow)
/**
* wnck_application_get_xid:
* @app: a #WnckApplication.
- *
+ *
* Gets the X window ID of the group leader window for @app.
- *
+ *
* Return value: the X window ID of the group leader window for @app.
**/
gulong
wnck_application_get_xid (WnckApplication *app)
{
g_return_val_if_fail (WNCK_IS_APPLICATION (app), 0);
-
+
return app->priv->xwindow;
}
/**
* wnck_application_get_windows:
* @app: a #WnckApplication.
- *
+ *
* Gets the list of #WnckWindow belonging to @app.
- *
+ *
* Return value: (element-type WnckWindow) (transfer none): the list of
* #WnckWindow belonging to @app, or %NULL if the application contains no
* window. The list should not be modified nor freed, as it is owned by @app.
@@ -259,9 +259,9 @@ wnck_application_get_windows (WnckApplication *app)
/**
* wnck_application_get_n_windows:
* @app: a #WnckApplication.
- *
+ *
* Gets the number of #WnckWindow belonging to @app.
- *
+ *
* Return value: the number of #WnckWindow belonging to @app.
**/
int
@@ -275,14 +275,14 @@ wnck_application_get_n_windows (WnckApplication *app)
/**
* wnck_application_get_name:
* @app: a #WnckApplication.
- *
+ *
* Gets the name of @app. Since there is no way to properly find this name,
* various suboptimal heuristics are used to find it. GTK+ should probably have
* a function to allow applications to set the _NET_WM_NAME property on the
* group leader as the application name, and the <ulink
* url="http://standards.freedesktop.org/wm-spec/wm-spec-latest.html">EWMH</ulink>
* should say that this is where the application name goes.
- *
+ *
* Return value: the name of @app, or a fallback name if no name is available.
**/
const char*
@@ -299,11 +299,11 @@ wnck_application_get_name (WnckApplication *app)
/**
* wnck_application_get_icon_name:
* @app: a #WnckApplication
- *
+ *
* Gets the icon name of @app (to be used when @app is minimized). Since
* there is no way to properly find this name, various suboptimal heuristics
* are used to find it.
- *
+ *
* Return value: the icon name of @app, or a fallback icon name if no icon name
* is available.
**/
@@ -315,7 +315,7 @@ wnck_application_get_icon_name (WnckApplication *app)
/* FIXME this isn't actually implemented, should be different
* from regular name
*/
-
+
if (app->priv->name)
return app->priv->name;
else
@@ -325,9 +325,9 @@ wnck_application_get_icon_name (WnckApplication *app)
/**
* wnck_application_get_pid:
* @app: a #WnckApplication.
- *
+ *
* Gets the process ID of @app.
- *
+ *
* Return value: the process ID of @app, or 0 if none is available.
**/
int
@@ -346,7 +346,7 @@ get_icons (WnckApplication *app)
icon = NULL;
mini_icon = NULL;
-
+
if (_wnck_read_icons (app->priv->xwindow,
app->priv->icon_cache,
&icon,
@@ -373,7 +373,7 @@ get_icons (WnckApplication *app)
* complicated about icon_changed and when the icon
* needs updating and all that.
*/
-
+
g_assert ((app->priv->icon && app->priv->mini_icon) ||
!(app->priv->icon || app->priv->mini_icon));
}
@@ -391,7 +391,7 @@ find_icon_window (WnckApplication *app)
if (wnck_window_get_window_type (w) == WNCK_WINDOW_NORMAL)
return w;
-
+
tmp = tmp->next;
}
@@ -404,11 +404,11 @@ find_icon_window (WnckApplication *app)
/**
* wnck_application_get_icon:
* @app: a #WnckApplication.
- *
+ *
* Gets the icon to be used for @app. If no icon is set for @app, a
* suboptimal heuristic is used to find an appropriate icon. If no icon was
* found, a fallback icon is used.
- *
+ *
* Return value: the icon for @app. The caller should reference the returned
* <classname>GdkPixbuf</classname> if it needs to keep the icon around.
**/
@@ -436,11 +436,11 @@ wnck_application_get_icon (WnckApplication *app)
/**
* wnck_application_get_mini_icon:
* @app: a #WnckApplication.
- *
+ *
* Gets the mini-icon to be used for @app. If no mini-icon is set for @app,
* a suboptimal heuristic is used to find an appropriate icon. If no mini-icon
* was found, a fallback mini-icon is used.
- *
+ *
* Return value: the mini-icon for @app. The caller should reference the
* returned <classname>GdkPixbuf</classname> if it needs to keep the mini-icon
* around.
@@ -472,7 +472,7 @@ wnck_application_get_mini_icon (WnckApplication *app)
*
* Gets whether a default fallback icon is used for @app (because none
* was set on @app).
- *
+ *
* Return value: %TRUE if the icon for @app is a fallback, %FALSE otherwise.
**/
gboolean
@@ -517,13 +517,13 @@ _wnck_application_create (Window xwindow,
WnckScreen *screen)
{
WnckApplication *application;
-
+
if (app_hash == NULL)
app_hash = g_hash_table_new (_wnck_xid_hash, _wnck_xid_equal);
-
+
g_return_val_if_fail (g_hash_table_lookup (app_hash, &xwindow) == NULL,
NULL);
-
+
application = g_object_new (WNCK_TYPE_APPLICATION, NULL);
application->priv->xwindow = xwindow;
application->priv->screen = screen;
@@ -532,17 +532,17 @@ _wnck_application_create (Window xwindow,
if (application->priv->name == NULL)
application->priv->name = _wnck_get_res_class_utf8 (xwindow);
-
+
if (application->priv->name)
application->priv->name_from_leader = TRUE;
-
+
application->priv->pid = _wnck_get_pid (application->priv->xwindow);
application->priv->startup_id = _wnck_get_utf8_property (application->priv->xwindow,
_wnck_atom_get ("_NET_STARTUP_ID"));
-
+
g_hash_table_insert (app_hash, &application->priv->xwindow, application);
-
+
/* Hash now owns one ref, caller gets none */
/* Note that xwindow may correspond to a WnckWindow's xwindow,
@@ -550,7 +550,7 @@ _wnck_application_create (Window xwindow,
*/
_wnck_select_input (application->priv->xwindow,
WNCK_APP_WINDOW_EVENT_MASK);
-
+
return application;
}
@@ -558,7 +558,7 @@ void
_wnck_application_destroy (WnckApplication *application)
{
g_return_if_fail (wnck_application_get (application->priv->xwindow) == application);
-
+
g_hash_table_remove (app_hash, &application->priv->xwindow);
g_return_if_fail (wnck_application_get (application->priv->xwindow) == NULL);
@@ -585,13 +585,13 @@ _wnck_application_add_window (WnckApplication *app,
g_return_if_fail (WNCK_IS_APPLICATION (app));
g_return_if_fail (WNCK_IS_WINDOW (window));
g_return_if_fail (wnck_window_get_application (window) == NULL);
-
- app->priv->windows = g_list_prepend (app->priv->windows, window);
+
+ app->priv->windows = g_list_prepend (app->priv->windows, window);
_wnck_window_set_application (window, app);
g_signal_connect (G_OBJECT (window), "name_changed",
G_CALLBACK (window_name_changed), app);
-
+
/* emits signals, so do it last */
reset_name (app);
update_name (app);
@@ -609,13 +609,13 @@ _wnck_application_remove_window (WnckApplication *app,
g_return_if_fail (WNCK_IS_APPLICATION (app));
g_return_if_fail (WNCK_IS_WINDOW (window));
g_return_if_fail (wnck_window_get_application (window) == app);
-
+
app->priv->windows = g_list_remove (app->priv->windows, window);
_wnck_window_set_application (window, NULL);
g_signal_handlers_disconnect_by_func (G_OBJECT (window),
window_name_changed, app);
-
+
/* emits signals, so do it last */
reset_name (app);
update_name (app);
@@ -631,7 +631,7 @@ _wnck_application_process_property_notify (WnckApplication *app,
XEvent *xevent)
{
/* This prop notify is on the leader window */
-
+
if (xevent->xproperty.atom == XA_WM_NAME ||
xevent->xproperty.atom ==
_wnck_atom_get ("_NET_WM_NAME") ||
diff --git a/libwnck/class-group.c b/libwnck/class-group.c
index 14a0205..a636bed 100644
--- a/libwnck/class-group.c
+++ b/libwnck/class-group.c
@@ -474,7 +474,7 @@ _wnck_class_group_add_window (WnckClassGroup *class_group,
* _wnck_class_group_remove_window:
* @class_group: a #WnckClassGroup.
* @window: a #WnckWindow.
- *
+ *
* Removes a window from the list of windows that are grouped under the
* specified @class_group.
**/
@@ -497,9 +497,9 @@ _wnck_class_group_remove_window (WnckClassGroup *class_group,
/**
* wnck_class_group_get_windows:
* @class_group: a #WnckClassGroup.
- *
+ *
* Gets the list of #WnckWindow that are grouped in @class_group.
- *
+ *
* Return value: (element-type WnckWindow) (transfer none): the list of
* #WnckWindow grouped in @class_group, or %NULL if the group contains no
* window. The list should not be modified nor freed, as it is owned by
@@ -518,9 +518,9 @@ wnck_class_group_get_windows (WnckClassGroup *class_group)
/**
* wnck_class_group_get_res_class:
* @class_group: a #WnckClassGroup.
- *
+ *
* Gets the resource class name for @class_group.
- *
+ *
* Return value: the resource class name of @class_group, or an
* empty string if the group has no resource class name.
*
@@ -537,7 +537,7 @@ wnck_class_group_get_res_class (WnckClassGroup *class_group)
/**
* wnck_class_group_get_name:
* @class_group: a #WnckClassGroup.
- *
+ *
* Gets an human-readable name for @class_group. Since there is no way to
* properly find this name, a suboptimal heuristic is used to find it. The name
* is the name of all #WnckApplication for each #WnckWindow in @class_group if
@@ -545,7 +545,7 @@ wnck_class_group_get_res_class (WnckClassGroup *class_group)
* name, the name is the name of all #WnckWindow in @class_group if they all
* have the same name. If all #WnckWindow don't have the same name, the
* resource class name is used.
- *
+ *
* Return value: an human-readable name for @class_group.
*
* Since: 2.2
@@ -561,13 +561,13 @@ wnck_class_group_get_name (WnckClassGroup *class_group)
/**
* wnck_class_group_get_icon:
* @class_group: a #WnckClassGroup.
- *
+ *
* Gets the icon to be used for @class_group. Since there is no way to
* properly find the icon, a suboptimal heuristic is used to find it. The icon
* is the first icon found by looking at all the #WnckApplication for each
* #WnckWindow in @class_group, then at all the #WnckWindow in @class_group. If
* no icon was found, a fallback icon is used.
- *
+ *
* Return value: the icon for @class_group. The caller should reference the
* returned <classname>GdkPixbuf</classname> if it needs to keep the icon
* around.
@@ -585,11 +585,11 @@ wnck_class_group_get_icon (WnckClassGroup *class_group)
/**
* wnck_class_group_get_mini_icon:
* @class_group: a #WnckClassGroup.
- *
+ *
* Gets the mini-icon to be used for @class_group. Since there is no way to
* properly find the mini-icon, the same suboptimal heuristic as the one for
* wnck_class_group_get_icon() is used to find it.
- *
+ *
* Return value: the mini-icon for @class_group. The caller should reference
* the returned <classname>GdkPixbuf</classname> if it needs to keep the
* mini-icon around.
diff --git a/libwnck/pager-accessible-factory.c b/libwnck/pager-accessible-factory.c
index 42cff8b..446de31 100644
--- a/libwnck/pager-accessible-factory.c
+++ b/libwnck/pager-accessible-factory.c
@@ -57,9 +57,9 @@ static AtkObject*
wnck_pager_accessible_factory_create_accessible (GObject *obj)
{
GtkWidget *widget;
-
+
g_return_val_if_fail (GTK_IS_WIDGET (obj), NULL);
-
+
widget = GTK_WIDGET (obj);
return wnck_pager_accessible_new (widget);
}
diff --git a/libwnck/pager-accessible.c b/libwnck/pager-accessible.c
index ae6cb1b..5c1276b 100644
--- a/libwnck/pager-accessible.c
+++ b/libwnck/pager-accessible.c
@@ -65,9 +65,9 @@ wnck_pager_accessible_get_type (void)
{
static GType type = 0;
- if (!type)
+ if (!type)
{
- GTypeInfo tinfo =
+ GTypeInfo tinfo =
{
sizeof (WnckPagerAccessibleClass),
(GBaseInitFunc) NULL, /* base init */
@@ -81,7 +81,7 @@ wnck_pager_accessible_get_type (void)
NULL /* value table */
};
- const GInterfaceInfo atk_selection_info =
+ const GInterfaceInfo atk_selection_info =
{
(GInterfaceInitFunc) atk_selection_interface_init,
(GInterfaceFinalizeFunc) NULL,
@@ -97,7 +97,7 @@ wnck_pager_accessible_get_type (void)
GTypeQuery query;
GType derived_atk_type;
- derived_type = g_type_parent (WNCK_TYPE_PAGER);
+ derived_type = g_type_parent (WNCK_TYPE_PAGER);
factory = atk_registry_get_factory (atk_get_default_registry (),
derived_type);
@@ -131,9 +131,9 @@ wnck_pager_accessible_class_init (WnckPagerAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GObjectClass *obj_class = G_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_peek_parent (klass);
-
+
class->get_name = wnck_pager_accessible_get_name;
class->get_description = wnck_pager_accessible_get_description;
class->get_n_children = wnck_pager_accessible_get_n_children;
@@ -145,13 +145,13 @@ wnck_pager_accessible_class_init (WnckPagerAccessibleClass *klass)
static gboolean
-wnck_pager_add_selection (AtkSelection *selection,
+wnck_pager_add_selection (AtkSelection *selection,
int i)
{
WnckPager *pager;
WnckWorkspace *wspace;
GtkWidget *widget;
- int n_spaces;
+ int n_spaces;
#if GTK_CHECK_VERSION(2,21,0)
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
@@ -159,9 +159,9 @@ wnck_pager_add_selection (AtkSelection *selection,
widget = GTK_ACCESSIBLE (selection)->widget;
#endif
- if (widget == NULL)
+ if (widget == NULL)
{
- /*
+ /*
*State is defunct
*/
return FALSE;
@@ -179,7 +179,7 @@ wnck_pager_add_selection (AtkSelection *selection,
wspace = _wnck_pager_get_workspace (pager, i);
/* FIXME: Is gtk_get_current_event_time() good enough here? I have no idea */
_wnck_pager_activate_workspace (wspace, gtk_get_current_event_time ());
-
+
return TRUE;
}
@@ -187,14 +187,14 @@ wnck_pager_add_selection (AtkSelection *selection,
* Returns the AtkObject of the selected WorkSpace
*/
static AtkObject*
-wnck_pager_ref_selection (AtkSelection *selection,
+wnck_pager_ref_selection (AtkSelection *selection,
int i)
{
WnckPager *pager;
GtkWidget *widget;
WnckWorkspace *active_wspace;
AtkObject *accessible;
- int wsno;
+ int wsno;
g_return_val_if_fail (i == 0, NULL);
@@ -203,7 +203,7 @@ wnck_pager_ref_selection (AtkSelection *selection,
#else
widget = GTK_ACCESSIBLE (selection)->widget;
#endif
- if (widget == NULL)
+ if (widget == NULL)
{
/*
* State is defunct
@@ -234,7 +234,7 @@ wnck_pager_selection_count (AtkSelection *selection)
#else
widget = GTK_ACCESSIBLE (selection)->widget;
#endif
- if (widget == NULL)
+ if (widget == NULL)
{
/*
* State is defunct
@@ -252,7 +252,7 @@ wnck_pager_selection_count (AtkSelection *selection)
*and returns TRUE on selection.
*/
static gboolean
-wnck_pager_is_child_selected (AtkSelection *selection,
+wnck_pager_is_child_selected (AtkSelection *selection,
int i)
{
WnckPager *pager;
@@ -265,7 +265,7 @@ wnck_pager_is_child_selected (AtkSelection *selection,
#else
widget = GTK_ACCESSIBLE (selection)->widget;
#endif
- if (widget == NULL)
+ if (widget == NULL)
{
/*
* State is defunct
@@ -312,7 +312,7 @@ wnck_pager_accessible_finalize (GObject *gobject)
GSList *children;
pager_accessible_priv = get_private_data (gobject);
-
+
if (pager_accessible_priv)
{
if (pager_accessible_priv->children)
@@ -329,7 +329,7 @@ wnck_pager_accessible_finalize (GObject *gobject)
quark_private_data,
NULL);
}
-
+
G_OBJECT_CLASS (parent_class)->finalize (gobject);
}
@@ -345,7 +345,7 @@ wnck_pager_accessible_get_name (AtkObject *obj)
}
static const char*
-wnck_pager_accessible_get_description (AtkObject *obj)
+wnck_pager_accessible_get_description (AtkObject *obj)
{
g_return_val_if_fail (WNCK_PAGER_IS_ACCESSIBLE (obj), NULL);
@@ -384,7 +384,7 @@ wnck_pager_accessible_get_n_children (AtkObject* obj)
}
/*
- * Will return appropriate static AtkObject for the workspaces
+ * Will return appropriate static AtkObject for the workspaces
*/
static AtkObject*
wnck_pager_accessible_ref_child (AtkObject *obj,
@@ -397,7 +397,7 @@ wnck_pager_accessible_ref_child (AtkObject *obj,
int len;
WnckPagerAccessiblePriv *pager_accessible_priv;
AtkObject *ret;
-
+
g_return_val_if_fail (WNCK_PAGER_IS_ACCESSIBLE (obj), NULL);
g_return_val_if_fail (ATK_IS_OBJECT (obj), NULL);
@@ -426,15 +426,15 @@ wnck_pager_accessible_ref_child (AtkObject *obj,
*/
while (n_spaces > len)
{
- AtkRegistry *default_registry;
+ AtkRegistry *default_registry;
AtkObjectFactory *factory;
WnckWorkspace *wspace;
WnckWorkspaceAccessible *space_accessible;
-
+
default_registry = atk_get_default_registry ();
factory = atk_registry_get_factory (default_registry,
WNCK_TYPE_WORKSPACE);
-
+
wspace = _wnck_pager_get_workspace (pager, len);
space_accessible = WNCK_WORKSPACE_ACCESSIBLE (atk_object_factory_create_accessible (factory,
G_OBJECT (wspace)));
@@ -442,20 +442,20 @@ wnck_pager_accessible_ref_child (AtkObject *obj,
pager_accessible_priv->children = g_slist_append (pager_accessible_priv->children,
space_accessible);
-
+
++len;
}
ret = g_slist_nth_data (pager_accessible_priv->children, i);
g_object_ref (G_OBJECT (ret));
wnck_pager_accessible_update_workspace (ret, pager, i);
-
+
return ret;
}
static void
wnck_pager_accessible_update_workspace (AtkObject *aobj_ws,
- WnckPager *pager,
+ WnckPager *pager,
int i)
{
g_free (aobj_ws->name);
diff --git a/libwnck/pager.c b/libwnck/pager.c
index a89e3b4..2f28bf4 100644
--- a/libwnck/pager.c
+++ b/libwnck/pager.c
@@ -66,12 +66,12 @@
struct _WnckPagerPrivate
{
WnckScreen *screen;
-
+
int n_rows; /* really columns for vertical orientation */
WnckPagerDisplayMode display_mode;
gboolean show_all_workspaces;
GtkShadowType shadow_type;
-
+
GtkOrientation orientation;
int workspace_size;
guint screen_connections[N_SCREEN_CONNECTIONS];
@@ -200,7 +200,7 @@ static AtkObject* wnck_pager_get_accessible (GtkWidget *widget);
static void
wnck_pager_init (WnckPager *pager)
-{
+{
int i;
static const GtkTargetEntry targets[] = {
{ "application/x-wnck-window-id", 0, 0}
@@ -263,7 +263,7 @@ wnck_pager_class_init (WnckPagerClass *klass)
widget_class->focus = wnck_pager_focus;
widget_class->get_accessible = wnck_pager_get_accessible;
widget_class->drag_leave = wnck_pager_drag_motion_leave;
- widget_class->drag_motion = wnck_pager_drag_motion;
+ widget_class->drag_motion = wnck_pager_drag_motion;
widget_class->drag_drop = wnck_pager_drag_drop;
widget_class->drag_data_received = wnck_pager_drag_data_received;
widget_class->drag_data_get = wnck_pager_drag_data_get;
@@ -289,7 +289,7 @@ wnck_pager_finalize (GObject *object)
g_source_remove (pager->priv->dnd_activate);
pager->priv->dnd_activate = 0;
}
-
+
G_OBJECT_CLASS (wnck_pager_parent_class)->finalize (object);
}
@@ -388,7 +388,7 @@ static void
wnck_pager_unrealize (GtkWidget *widget)
{
WnckPager *pager;
-
+
pager = WNCK_PAGER (widget);
wnck_pager_clear_drag (pager);
@@ -398,7 +398,7 @@ wnck_pager_unrealize (GtkWidget *widget)
wnck_screen_release_workspace_layout (pager->priv->screen,
pager->priv->layout_manager_token);
pager->priv->layout_manager_token = WNCK_NO_MANAGER_TOKEN;
-
+
wnck_pager_disconnect_screen (pager);
pager->priv->screen = NULL;
@@ -420,7 +420,7 @@ wnck_pager_size_request (GtkWidget *widget,
WnckWorkspace *space;
pager = WNCK_PAGER (widget);
-
+
/* if we're not realized, we don't know about our screen yet */
if (pager->priv->screen == NULL)
_wnck_pager_set_screen (pager);
@@ -431,7 +431,7 @@ wnck_pager_size_request (GtkWidget *widget,
g_assert (pager->priv->n_rows > 0);
spaces_per_row = (n_spaces + pager->priv->n_rows - 1) / pager->priv->n_rows;
space = wnck_screen_get_workspace (pager->priv->screen, 0);
-
+
if (pager->priv->orientation == GTK_ORIENTATION_VERTICAL)
{
if (space) {
@@ -457,9 +457,9 @@ wnck_pager_size_request (GtkWidget *widget,
n_rows = 1;
spaces_per_row = 1;
}
-
+
other_dimension_size = screen_aspect * size;
-
+
requisition->width = size * n_rows + (n_rows - 1);
requisition->height = other_dimension_size * spaces_per_row + (spaces_per_row - 1);
}
@@ -501,7 +501,7 @@ wnck_pager_size_request (GtkWidget *widget,
layout = gtk_widget_create_pango_layout (widget, NULL);
screen = pager->priv->screen;
other_dimension_size = 1;
-
+
for (i = 0; i < n_spaces; i++)
{
pango_layout_set_text (layout,
@@ -510,12 +510,12 @@ wnck_pager_size_request (GtkWidget *widget,
pango_layout_get_pixel_size (layout, &w, NULL);
other_dimension_size = MAX (other_dimension_size, w);
}
-
+
g_object_unref (layout);
-
+
other_dimension_size += 2;
}
-
+
requisition->width = other_dimension_size * spaces_per_row + (spaces_per_row - 1);
requisition->height = size * n_rows + (n_rows - 1);
}
@@ -533,7 +533,7 @@ wnck_pager_size_request (GtkWidget *widget,
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
NULL);
-
+
requisition->width += 2 * focus_width;
requisition->height += 2 * focus_width;
}
@@ -645,7 +645,7 @@ get_workspace_rect (WnckPager *pager,
if (!pager->priv->show_all_workspaces)
{
WnckWorkspace *active_space;
-
+
active_space = wnck_screen_get_active_workspace (pager->priv->screen);
if (active_space && space == wnck_workspace_get_number (active_space))
@@ -682,14 +682,14 @@ get_workspace_rect (WnckPager *pager,
hsize -= 2 * style->xthickness;
vsize -= 2 * style->ythickness;
}
-
+
n_spaces = wnck_screen_get_workspace_count (pager->priv->screen);
g_assert (pager->priv->n_rows > 0);
spaces_per_row = (n_spaces + pager->priv->n_rows - 1) / pager->priv->n_rows;
-
+
if (pager->priv->orientation == GTK_ORIENTATION_VERTICAL)
- {
+ {
rect->width = (hsize - (pager->priv->n_rows - 1)) / pager->priv->n_rows;
rect->height = (vsize - (spaces_per_row - 1)) / spaces_per_row;
@@ -699,12 +699,12 @@ get_workspace_rect (WnckPager *pager,
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
col = pager->priv->n_rows - col - 1;
- rect->x = (rect->width + 1) * col;
+ rect->x = (rect->width + 1) * col;
rect->y = (rect->height + 1) * row;
-
+
if (col == pager->priv->n_rows - 1)
rect->width = hsize - rect->x;
-
+
if (row == spaces_per_row - 1)
rect->height = vsize - rect->y;
}
@@ -712,19 +712,19 @@ get_workspace_rect (WnckPager *pager,
{
rect->width = (hsize - (spaces_per_row - 1)) / spaces_per_row;
rect->height = (vsize - (pager->priv->n_rows - 1)) / pager->priv->n_rows;
-
+
col = space % spaces_per_row;
row = space / spaces_per_row;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
col = spaces_per_row - col - 1;
- rect->x = (rect->width + 1) * col;
+ rect->x = (rect->width + 1) * col;
rect->y = (rect->height + 1) * row;
if (col == spaces_per_row - 1)
rect->width = hsize - rect->x;
-
+
if (row == pager->priv->n_rows - 1)
rect->height = vsize - rect->y;
}
@@ -770,7 +770,7 @@ get_windows_for_workspace_in_bottom_to_top (WnckScreen *screen,
GList *windows;
GList *tmp;
int workspace_num;
-
+
result = NULL;
workspace_num = wnck_workspace_get_number (workspace);
@@ -796,7 +796,7 @@ get_window_rect (WnckWindow *window,
int x, y, width, height;
WnckWorkspace *workspace;
GdkRectangle unclipped_win_rect;
-
+
workspace = wnck_window_get_workspace (window);
if (workspace == NULL)
workspace = wnck_screen_get_active_workspace (wnck_window_get_screen (window));
@@ -804,19 +804,19 @@ get_window_rect (WnckWindow *window,
/* scale window down by same ratio we scaled workspace down */
width_ratio = (double) workspace_rect->width / (double) wnck_workspace_get_width (workspace);
height_ratio = (double) workspace_rect->height / (double) wnck_workspace_get_height (workspace);
-
+
wnck_window_get_geometry (window, &x, &y, &width, &height);
-
+
x += wnck_workspace_get_viewport_x (workspace);
y += wnck_workspace_get_viewport_y (workspace);
x = x * width_ratio + 0.5;
y = y * height_ratio + 0.5;
width = width * width_ratio + 0.5;
height = height * height_ratio + 0.5;
-
+
x += workspace_rect->x;
y += workspace_rect->y;
-
+
if (width < 3)
width = 3;
if (height < 3)
@@ -871,9 +871,9 @@ draw_window (cairo_t *cr,
icon = wnck_window_get_icon (win);
icon_w = icon_h = 0;
-
+
if (icon)
- {
+ {
icon_w = gdk_pixbuf_get_width (icon);
icon_h = gdk_pixbuf_get_height (icon);
@@ -902,7 +902,7 @@ draw_window (cairo_t *cr,
{
icon_x = winrect->x + (winrect->width - icon_w) / 2;
icon_y = winrect->y + (winrect->height - icon_h) / 2;
-
+
cairo_save (cr);
gdk_cairo_set_source_pixbuf (cr, icon, icon_x, icon_y);
cairo_rectangle (cr, icon_x, icon_y, icon_w, icon_h);
@@ -910,7 +910,7 @@ draw_window (cairo_t *cr,
cairo_paint_with_alpha (cr, translucency);
cairo_restore (cr);
}
-
+
if (is_active)
color = &style->fg[state];
else
@@ -927,7 +927,7 @@ draw_window (cairo_t *cr,
cairo_stroke (cr);
cairo_restore (cr);
-}
+}
static WnckWindow *
window_at_point (WnckPager *pager,
@@ -1007,12 +1007,12 @@ workspace_at_point (WnckPager *pager,
}
n_spaces = wnck_screen_get_workspace_count (pager->priv->screen);
-
+
i = 0;
while (i < n_spaces)
{
GdkRectangle rect;
-
+
get_workspace_rect (pager, i, &rect);
/* If workspace is on the edge, pretend points on the frame belong to the
@@ -1057,7 +1057,7 @@ workspace_at_point (WnckPager *pager,
g_assert (space != NULL);
/* Scale x, y mouse coords to corresponding screenwide viewport coords */
-
+
width_ratio = (double) wnck_workspace_get_width (space) / (double) rect.width;
height_ratio = (double) wnck_workspace_get_height (space) / (double) rect.height;
@@ -1090,7 +1090,7 @@ wnck_pager_draw_workspace (WnckPager *pager,
GtkWidget *widget;
GtkStateType state;
GtkStyle *style;
-
+
space = wnck_screen_get_workspace (pager->priv->screen, workspace);
if (!space)
return;
@@ -1100,7 +1100,7 @@ wnck_pager_draw_workspace (WnckPager *pager,
if (is_current)
state = GTK_STATE_SELECTED;
- else if (workspace == pager->priv->prelight)
+ else if (workspace == pager->priv->prelight)
state = GTK_STATE_PRELIGHT;
else
state = GTK_STATE_NORMAL;
@@ -1109,7 +1109,7 @@ wnck_pager_draw_workspace (WnckPager *pager,
/* FIXME in names mode, should probably draw things like a button.
*/
-
+
if (bg_pixbuf)
{
gdk_cairo_set_source_pixbuf (cr, bg_pixbuf, rect->x, rect->y);
@@ -1226,29 +1226,29 @@ wnck_pager_draw_workspace (WnckPager *pager,
}
if (pager->priv->display_mode == WNCK_PAGER_DISPLAY_CONTENT)
- {
+ {
windows = get_windows_for_workspace_in_bottom_to_top (pager->priv->screen,
wnck_screen_get_workspace (pager->priv->screen,
workspace));
-
+
tmp = windows;
while (tmp != NULL)
{
WnckWindow *win = tmp->data;
GdkRectangle winrect;
-
+
get_window_rect (win, rect, &winrect);
-
+
draw_window (cr,
widget,
win,
&winrect,
state,
win == pager->priv->drag_window && pager->priv->dragging ? TRUE : FALSE);
-
+
tmp = tmp->next;
}
-
+
g_list_free (windows);
}
else
@@ -1262,16 +1262,18 @@ wnck_pager_draw_workspace (WnckPager *pager,
workspace));
layout = gtk_widget_create_pango_layout (widget,
workspace_name);
-
+
pango_layout_get_pixel_size (layout, &w, &h);
-
+
if (is_current)
gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_SELECTED]);
else
gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]);
- cairo_move_to (cr,
+
+ cairo_move_to (cr,
rect->x + (rect->width - w) / 2,
- rect->y + (rect->height - h) / 2);
+ rect->y + (rect->height - h) / 2);
+
pango_cairo_show_layout (cr, layout);
g_object_unref (layout);
@@ -1306,7 +1308,7 @@ wnck_pager_draw (GtkWidget *widget,
gboolean first;
GtkStyle *style;
int focus_width;
-
+
pager = WNCK_PAGER (widget);
n_spaces = wnck_screen_get_workspace_count (pager->priv->screen);
@@ -1342,7 +1344,7 @@ wnck_pager_draw (GtkWidget *widget,
gtk_widget_get_allocated_width (widget) - 2 * focus_width,
gtk_widget_get_allocated_height (widget) - 2 * focus_width);
}
-
+
i = 0;
while (i < n_spaces)
{
@@ -1365,10 +1367,10 @@ wnck_pager_draw (GtkWidget *widget,
rect.height);
first = FALSE;
}
-
+
wnck_pager_draw_workspace (pager, cr, i, &rect, bg_pixbuf);
}
-
+
++i;
}
@@ -1383,7 +1385,7 @@ wnck_pager_button_press (GtkWidget *widget,
int space_number;
WnckWorkspace *space = NULL;
GdkRectangle workspace_rect;
-
+
if (event->button != 1)
return FALSE;
@@ -1439,13 +1441,13 @@ wnck_pager_queue_draw_workspace (WnckPager *pager,
gint i)
{
GdkRectangle rect;
-
+
if (i < 0)
return;
get_workspace_rect (pager, i, &rect);
- gtk_widget_queue_draw_area (GTK_WIDGET (pager),
- rect.x, rect.y,
+ gtk_widget_queue_draw_area (GTK_WIDGET (pager),
+ rect.x, rect.y,
rect.width, rect.height);
}
@@ -1474,7 +1476,7 @@ wnck_pager_check_prelight (WnckPager *pager,
id = -1;
else
id = workspace_at_point (pager, x, y, NULL, NULL);
-
+
if (id != pager->priv->prelight)
{
wnck_pager_queue_draw_workspace (pager, pager->priv->prelight);
@@ -1489,7 +1491,7 @@ wnck_pager_check_prelight (WnckPager *pager,
}
}
-static gboolean
+static gboolean
wnck_pager_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
@@ -1513,7 +1515,7 @@ wnck_pager_drag_motion (GtkWidget *widget,
gdk_drag_status (context, context->suggested_action, time);
#endif
}
- else
+ else
{
gdk_drag_status (context, 0, time);
@@ -1526,18 +1528,18 @@ wnck_pager_drag_motion (GtkWidget *widget,
pager->priv->dnd_time = 0;
}
- if (pager->priv->dnd_activate == 0 && pager->priv->prelight > -1)
+ if (pager->priv->dnd_activate == 0 && pager->priv->prelight > -1)
{
pager->priv->dnd_activate = g_timeout_add (WNCK_ACTIVATE_TIMEOUT,
wnck_pager_drag_motion_timeout,
pager);
pager->priv->dnd_time = time;
}
- }
+ }
return (pager->priv->prelight != -1);
}
-
+
static gboolean
wnck_pager_drag_drop (GtkWidget *widget,
GdkDragContext *context,
@@ -1547,17 +1549,17 @@ wnck_pager_drag_drop (GtkWidget *widget,
{
WnckPager *pager = WNCK_PAGER (widget);
GdkAtom target;
-
+
target = gtk_drag_dest_find_target (widget, context, NULL);
if (target != GDK_NONE)
gtk_drag_get_data (widget, context, target, time);
- else
+ else
gtk_drag_finish (context, FALSE, FALSE, time);
wnck_pager_clear_drag (pager);
wnck_pager_check_prelight (pager, x, y, FALSE);
-
+
return TRUE;
}
@@ -1582,7 +1584,7 @@ wnck_pager_drag_data_received (GtkWidget *widget,
gtk_drag_finish (context, FALSE, FALSE, time);
return;
}
-
+
i = workspace_at_point (pager, x, y, NULL, NULL);
space = wnck_screen_get_workspace (pager->priv->screen, i);
if (!space)
@@ -1590,9 +1592,9 @@ wnck_pager_drag_data_received (GtkWidget *widget,
gtk_drag_finish (context, FALSE, FALSE, time);
return;
}
-
+
xid = *((gulong *) gtk_selection_data_get_data (selection_data));
-
+
for (tmp = wnck_screen_get_windows_stacked (pager->priv->screen); tmp != NULL; tmp = tmp->next)
{
if (wnck_window_get_xid (tmp->data) == xid)
@@ -1607,9 +1609,9 @@ wnck_pager_drag_data_received (GtkWidget *widget,
}
gtk_drag_finish (context, FALSE, FALSE, time);
-}
+}
-static void
+static void
wnck_pager_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
@@ -1626,9 +1628,9 @@ wnck_pager_drag_data_get (GtkWidget *widget,
gtk_selection_data_set (selection_data,
gtk_selection_data_get_target (selection_data),
8, (guchar *)&xid, sizeof (gulong));
-}
+}
-static void
+static void
wnck_pager_drag_end (GtkWidget *widget,
GdkDragContext *context)
{
@@ -1686,7 +1688,7 @@ wnck_update_drag_icon (WnckWindow *window,
dnd_w = dnd_h = 32;
/* windows are huge, so let's make this huge */
dnd_w *= 3;
-
+
workspace = wnck_window_get_workspace (window);
if (workspace == NULL)
workspace = wnck_screen_get_active_workspace (wnck_window_get_screen (window));
@@ -1709,7 +1711,7 @@ wnck_update_drag_icon (WnckWindow *window,
rect.width, rect.height);
cr = cairo_create (surface);
draw_window (cr, widget, window,
- &rect, GTK_STATE_NORMAL, FALSE);
+ &rect, GTK_STATE_NORMAL, FALSE);
cairo_destroy (cr);
cairo_surface_set_device_offset (surface, 2, 2);
@@ -1775,7 +1777,7 @@ wnck_drag_clean_up (WnckWindow *window,
*
* Sets the given @window as the drag icon for @context.
**/
-void
+void
_wnck_window_set_as_drag_icon (WnckWindow *window,
GdkDragContext *context,
GtkWidget *drag_source)
@@ -1818,13 +1820,13 @@ wnck_pager_motion (GtkWidget *widget,
x, y))
{
GdkDragContext *context;
- context = gtk_drag_begin (widget,
+ context = gtk_drag_begin (widget,
gtk_drag_dest_get_target_list (widget),
GDK_ACTION_MOVE,
1, (GdkEvent *)event);
pager->priv->dragging = TRUE;
pager->priv->prelight_dnd = TRUE;
- _wnck_window_set_as_drag_icon (pager->priv->drag_window,
+ _wnck_window_set_as_drag_icon (pager->priv->drag_window,
context,
GTK_WIDGET (pager));
}
@@ -1857,12 +1859,12 @@ wnck_pager_button_release (GtkWidget *widget,
int j;
int viewport_x;
int viewport_y;
-
+
if (event->button != 1)
return FALSE;
pager = WNCK_PAGER (widget);
-
+
if (!pager->priv->dragging)
{
i = workspace_at_point (pager,
@@ -1895,12 +1897,12 @@ wnck_pager_button_release (GtkWidget *widget,
screen_height = wnck_screen_get_height (pager->priv->screen);
viewport_x = (viewport_x / screen_width) * screen_width;
viewport_y = (viewport_y / screen_height) * screen_height;
-
+
if (wnck_workspace_get_viewport_x (space) != viewport_x ||
wnck_workspace_get_viewport_y (space) != viewport_y)
wnck_screen_move_viewport (pager->priv->screen, viewport_x, viewport_y);
}
-
+
wnck_pager_clear_drag (pager);
}
@@ -1914,7 +1916,7 @@ wnck_pager_focus (GtkWidget *widget,
WnckPager *pager;
pager = WNCK_PAGER (widget);
-
+
return GTK_WIDGET_CLASS (wnck_pager_parent_class)->focus (widget, direction);
}
@@ -2001,7 +2003,7 @@ GtkWidget*
wnck_pager_new (WnckScreen *screen)
{
WnckPager *pager;
-
+
pager = g_object_new (WNCK_TYPE_PAGER, NULL);
return GTK_WIDGET (pager);
@@ -2057,7 +2059,7 @@ wnck_pager_set_layout_hint (WnckPager *pager)
* Tries to change the orientation of the layout of #WnckWorkspace on the
* #WnckScreen @pager is watching. Since no more than one application should
* set this property of a #WnckScreen at a time, setting the layout is not
- * guaranteed to work.
+ * guaranteed to work.
*
* If @orientation is %GTK_ORIENTATION_HORIZONTAL, the #WnckWorkspace will be
* laid out in rows, with the first #WnckWorkspace in the top left corner.
@@ -2113,7 +2115,7 @@ wnck_pager_set_orientation (WnckPager *pager,
* Tries to change the number of rows in the layout of #WnckWorkspace on the
* #WnckScreen @pager is watching. Since no more than one application should
* set this property of a #WnckScreen at a time, setting the layout is not
- * guaranteed to work.
+ * guaranteed to work.
*
* If @pager has not been added to a widget hierarchy, the call will fail
* because @pager can't know the screen on which to modify the layout.
@@ -2267,7 +2269,7 @@ window_closed_callback (WnckScreen *screen,
if (pager->priv->drag_window == window)
wnck_pager_clear_drag (pager);
-
+
wnck_pager_queue_draw_window (pager, window);
}
@@ -2356,7 +2358,7 @@ window_geometry_changed_callback (WnckWindow *window,
gpointer data)
{
WnckPager *pager = WNCK_PAGER (data);
-
+
wnck_pager_queue_draw_window (pager, window);
}
@@ -2371,7 +2373,7 @@ background_changed_callback (WnckWindow *window,
g_object_unref (G_OBJECT (pager->priv->bg_cache));
pager->priv->bg_cache = NULL;
}
-
+
gtk_widget_queue_draw (GTK_WIDGET (pager));
}
@@ -2396,28 +2398,28 @@ wnck_pager_connect_screen (WnckPager *pager)
guint *c;
GList *tmp;
WnckScreen *screen;
-
+
g_return_if_fail (pager->priv->screen != NULL);
screen = pager->priv->screen;
-
+
for (tmp = wnck_screen_get_windows (screen); tmp; tmp = tmp->next)
{
wnck_pager_connect_window (pager, WNCK_WINDOW (tmp->data));
}
-
+
i = 0;
c = pager->priv->screen_connections;
-
+
c[i] = g_signal_connect (G_OBJECT (screen), "active_window_changed",
G_CALLBACK (active_window_changed_callback),
pager);
++i;
-
+
c[i] = g_signal_connect (G_OBJECT (screen), "active_workspace_changed",
G_CALLBACK (active_workspace_changed_callback),
pager);
- ++i;
+ ++i;
c[i] = g_signal_connect (G_OBJECT (screen), "window_stacking_changed",
G_CALLBACK (window_stacking_changed_callback),
@@ -2447,7 +2449,7 @@ wnck_pager_connect_screen (WnckPager *pager)
c[i] = g_signal_connect (G_OBJECT (screen), "application_opened",
G_CALLBACK (application_opened_callback),
pager);
- ++i;
+ ++i;
c[i] = g_signal_connect (G_OBJECT (screen), "application_closed",
G_CALLBACK (application_closed_callback),
@@ -2463,7 +2465,7 @@ wnck_pager_connect_screen (WnckPager *pager)
G_CALLBACK (viewports_changed_callback),
pager);
++i;
-
+
g_assert (i == N_SCREEN_CONNECTIONS);
/* connect to name_changed on each workspace */
@@ -2505,7 +2507,7 @@ wnck_pager_disconnect_screen (WnckPager *pager)
if (pager->priv->screen == NULL)
return;
-
+
i = 0;
while (i < N_SCREEN_CONNECTIONS)
{
@@ -2514,7 +2516,7 @@ wnck_pager_disconnect_screen (WnckPager *pager)
pager->priv->screen_connections[i]);
pager->priv->screen_connections[i] = 0;
-
+
++i;
}
@@ -2524,7 +2526,7 @@ wnck_pager_disconnect_screen (WnckPager *pager)
space = wnck_screen_get_workspace (pager->priv->screen, i);
g_signal_handlers_disconnect_by_func (space, G_CALLBACK (workspace_name_changed_callback), pager);
}
-
+
for (tmp = wnck_screen_get_windows (pager->priv->screen); tmp; tmp = tmp->next)
{
wnck_pager_disconnect_window (pager, WNCK_WINDOW (tmp->data));
@@ -2571,7 +2573,7 @@ wnck_pager_get_background (WnckPager *pager,
{
Pixmap p;
GdkPixbuf *pix = NULL;
-
+
/* We have to be careful not to keep alternating between
* width/height values, otherwise this would get really slow.
*/
@@ -2591,12 +2593,12 @@ wnck_pager_get_background (WnckPager *pager,
/* FIXME this just globally disables the thumbnailing feature */
return NULL;
-
+
#define MIN_BG_SIZE 10
-
+
if (width < MIN_BG_SIZE || height < MIN_BG_SIZE)
return NULL;
-
+
p = wnck_screen_get_background_pixmap (pager->priv->screen);
if (p != None)
@@ -2619,7 +2621,7 @@ wnck_pager_get_background (WnckPager *pager,
return pager->priv->bg_cache;
}
-/*
+/*
*This will return aobj_pager whose parent is wnck's atk object -Gail Container
*/
static AtkObject *
@@ -2627,7 +2629,7 @@ wnck_pager_get_accessible (GtkWidget *widget)
{
static gboolean first_time = TRUE;
- if (first_time)
+ if (first_time)
{
AtkObjectFactory *factory;
AtkRegistry *registry;
@@ -2646,7 +2648,7 @@ wnck_pager_get_accessible (GtkWidget *widget)
derived_type);
derived_atk_type = atk_object_factory_get_accessible_type (factory);
- if (g_type_is_a (derived_atk_type, GTK_TYPE_ACCESSIBLE))
+ if (g_type_is_a (derived_atk_type, GTK_TYPE_ACCESSIBLE))
{
/*
* Specify what factory to use to create accessible
@@ -2665,13 +2667,13 @@ wnck_pager_get_accessible (GtkWidget *widget)
return GTK_WIDGET_CLASS (wnck_pager_parent_class)->get_accessible (widget);
}
-int
+int
_wnck_pager_get_n_workspaces (WnckPager *pager)
{
return wnck_screen_get_workspace_count (pager->priv->screen);
}
-const char*
+const char*
_wnck_pager_get_workspace_name (WnckPager *pager,
int i)
{
@@ -2695,9 +2697,9 @@ _wnck_pager_get_workspace (WnckPager *pager,
int i)
{
return wnck_screen_get_workspace (pager->priv->screen, i);
-}
+}
-void
+void
_wnck_pager_activate_workspace (WnckWorkspace *wspace,
guint32 timestamp)
{
@@ -2705,7 +2707,7 @@ _wnck_pager_activate_workspace (WnckWorkspace *wspace,
}
void
-_wnck_pager_get_workspace_rect (WnckPager *pager,
+_wnck_pager_get_workspace_rect (WnckPager *pager,
int i,
GdkRectangle *rect)
{
diff --git a/libwnck/screen.c b/libwnck/screen.c
index f8fb026..f11dd7f 100644
--- a/libwnck/screen.c
+++ b/libwnck/screen.c
@@ -74,7 +74,7 @@ struct _WnckScreenPrivate
int number;
Window xroot;
Screen *xscreen;
-
+
/* in map order */
GList *mapped_windows;
/* in stacking order */
@@ -100,19 +100,19 @@ struct _WnckScreenPrivate
Pixmap bg_pixmap;
char *wm_name;
-
- guint update_handler;
+
+ guint update_handler;
#ifdef HAVE_STARTUP_NOTIFICATION
SnDisplay *sn_display;
#endif
-
+
guint showing_desktop : 1;
-
+
guint vertical_workspaces : 1;
_WnckLayoutCorner starting_corner;
gint rows_of_workspaces;
- gint columns_of_workspaces;
+ gint columns_of_workspaces;
/* if you add flags, be sure to set them
* when we create the screen so we get an initial update
@@ -165,7 +165,7 @@ static void update_workspace_names (WnckScreen *screen);
static void update_showing_desktop (WnckScreen *screen);
static void queue_update (WnckScreen *screen);
-static void unqueue_update (WnckScreen *screen);
+static void unqueue_update (WnckScreen *screen);
static void do_update_now (WnckScreen *screen);
static void emit_active_window_changed (WnckScreen *screen);
@@ -197,7 +197,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void
wnck_screen_init (WnckScreen *screen)
-{
+{
screen->priv = WNCK_SCREEN_GET_PRIVATE (screen);
screen->priv->number = -1;
@@ -288,7 +288,7 @@ wnck_screen_class_init (WnckScreenClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, WNCK_TYPE_WORKSPACE);
-
+
/**
* WnckScreen::window-stacking-changed:
* @screen: the #WnckScreen which emitted the signal.
@@ -335,11 +335,11 @@ wnck_screen_class_init (WnckScreenClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, WNCK_TYPE_WINDOW);
-
+
/**
* WnckScreen::workspace-created:
* @screen: the #WnckScreen which emitted the signal.
- * @space: the workspace that has been created.
+ * @space: the workspace that has been created.
*
* Emitted when a #WnckWorkspace is created on @screen.
*/
@@ -351,11 +351,11 @@ wnck_screen_class_init (WnckScreenClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, WNCK_TYPE_WORKSPACE);
-
+
/**
* WnckScreen::workspace-destroyed:
* @screen: the #WnckScreen which emitted the signal.
- * @space: the workspace that has been destroyed.
+ * @space: the workspace that has been destroyed.
*
* Emitted when a #WnckWorkspace is destroyed on @screen.
*/
@@ -512,7 +512,7 @@ wnck_screen_finalize (GObject *object)
gpointer weak_pointer;
screen = WNCK_SCREEN (object);
-
+
unqueue_update (screen);
for (tmp = screen->priv->stacked_windows; tmp; tmp = tmp->next)
@@ -557,7 +557,7 @@ wnck_screen_finalize (GObject *object)
sn_display_unref (screen->priv->sn_display);
screen->priv->sn_display = NULL;
#endif
-
+
G_OBJECT_CLASS (wnck_screen_parent_class)->finalize (object);
}
@@ -595,9 +595,9 @@ wnck_screen_construct (WnckScreen *screen,
sn_error_trap_push,
sn_error_trap_pop);
#endif
-
+
screen->priv->bg_pixmap = None;
-
+
_wnck_select_input (screen->priv->xroot,
PropertyChangeMask);
@@ -611,16 +611,16 @@ wnck_screen_construct (WnckScreen *screen,
screen->priv->need_update_bg_pixmap = TRUE;
screen->priv->need_update_showing_desktop = TRUE;
screen->priv->need_update_wm = TRUE;
-
+
queue_update (screen);
}
/**
* wnck_screen_get:
* @index: screen number, starting from 0.
- *
+ *
* Gets the #WnckScreen for a given screen on the default display.
- *
+ *
* Return value: (transfer none): the #WnckScreen for screen @index, or %NULL
* if no such screen exists. The returned #WnckScreen is owned by libwnck and
* must not be referenced or unreferenced.
@@ -636,17 +636,17 @@ wnck_screen_get (int index)
if (index >= ScreenCount (display))
return NULL;
-
+
if (screens == NULL)
{
screens = g_new0 (WnckScreen*, ScreenCount (display));
_wnck_event_filter_init ();
}
-
+
if (screens[index] == NULL)
{
screens[index] = g_object_new (WNCK_TYPE_SCREEN, NULL);
-
+
wnck_screen_construct (screens[index], index);
}
@@ -671,9 +671,9 @@ _wnck_screen_get_existing (int number)
/**
* wnck_screen_get_default:
- *
+ *
* Gets the default #WnckScreen on the default display.
- *
+ *
* Return value: (transfer none): the default #WnckScreen. The returned
* #WnckScreen is owned by libwnck and must not be referenced or unreferenced.
**/
@@ -690,13 +690,13 @@ wnck_screen_get_default (void)
/**
* wnck_screen_get_for_root:
* @root_window_id: an X window ID.
- *
+ *
* Gets the #WnckScreen for the root window at @root_window_id, or
* %NULL if no #WnckScreen exists for this root window.
*
* This function does not work if wnck_screen_get() was not called for the
* sought #WnckScreen before, and returns %NULL.
- *
+ *
* Return value: (transfer none): the #WnckScreen for the root window at
* @root_window_id, or %NULL. The returned #WnckScreen is owned by libwnck and
* must not be referenced or unreferenced.
@@ -706,7 +706,7 @@ wnck_screen_get_for_root (gulong root_window_id)
{
int i;
Display *display;
-
+
if (screens == NULL)
return NULL;
@@ -717,7 +717,7 @@ wnck_screen_get_for_root (gulong root_window_id)
{
if (screens[i] != NULL && screens[i]->priv->xroot == root_window_id)
return screens[i];
-
+
++i;
}
@@ -727,10 +727,10 @@ wnck_screen_get_for_root (gulong root_window_id)
/**
* wnck_screen_get_number:
* @screen: a #WnckScreen.
- *
+ *
* Gets the index of @screen on the display to which it belongs. The first
* #WnckScreen has an index of 0.
- *
+ *
* Return value: the index of @space on @screen, or -1 on errors.
*
* Since: 2.20
@@ -746,10 +746,10 @@ wnck_screen_get_number (WnckScreen *screen)
/**
* wnck_screen_get_workspaces:
* @screen: a #WnckScreen.
- *
+ *
* Gets the list of #WnckWorkspace on @screen. The list is ordered: the
* first element in the list is the first #WnckWorkspace, etc..
- *
+ *
* Return value: (element-type WnckWorkspace) (transfer none): the list of
* #WnckWorkspace on @screen. The list should not be modified nor freed, as it
* is owned by @screen.
@@ -760,7 +760,7 @@ GList*
wnck_screen_get_workspaces (WnckScreen *screen)
{
g_return_val_if_fail (WNCK_IS_SCREEN (screen), NULL);
-
+
return screen->priv->workspaces;
}
@@ -768,9 +768,9 @@ wnck_screen_get_workspaces (WnckScreen *screen)
* wnck_screen_get_workspace:
* @screen: a #WnckScreen.
* @workspace: a workspace index, starting from 0.
- *
+ *
* Gets the #WnckWorkspace numbered @workspace on @screen.
- *
+ *
* Return value: (transfer none): the #WnckWorkspace numbered @workspace on
* @screen, or %NULL if no such workspace exists. The returned #WnckWorkspace
* is owned by libwnck and must not be referenced or unreferenced.
@@ -782,7 +782,7 @@ wnck_screen_get_workspace (WnckScreen *screen,
GList *list;
g_return_val_if_fail (WNCK_IS_SCREEN (screen), NULL);
-
+
/* We trust this function with property-provided numbers, it
* must reliably return NULL on bad data
*/
@@ -790,7 +790,7 @@ wnck_screen_get_workspace (WnckScreen *screen,
if (list == NULL)
return NULL;
-
+
return WNCK_WORKSPACE (list->data);
}
@@ -798,10 +798,10 @@ wnck_screen_get_workspace (WnckScreen *screen,
* wnck_screen_get_workspace_index:
* @screen: a #WnckScreen.
* @space: a #WnckWorkspace.
- *
+ *
* Gets the index of @space on @screen. The first #WnckWorkspace has an
* index of 0. See also wnck_workspace_get_number().
- *
+ *
* Return value: the index of @space on @screen, or -1 on errors.
*
* Since: 2.14
@@ -833,11 +833,11 @@ wnck_screen_get_workspace_index (WnckScreen *screen,
/**
* wnck_screen_get_active_workspace:
* @screen: a #WnckScreen.
- *
+ *
* Gets the active #WnckWorkspace on @screen. May return %NULL sometimes,
* if libwnck is in a weird state due to the asynchronous nature of the
* interaction with the window manager.
- *
+ *
* Return value: (transfer none): the active #WnckWorkspace on @screen, or
* %NULL. The returned #WnckWorkspace is owned by libwnck and must not be
* referenced or unreferenced.
@@ -855,10 +855,10 @@ wnck_screen_get_active_workspace (WnckScreen *screen)
* @screen: a #WnckScreen.
* @space: a #WnckWorkspace.
* @direction: direction in which to search the neighbor.
- *
+ *
* Gets the neighbor #WnckWorkspace of @space in the @direction direction on
* @screen.
- *
+ *
* Return value: (transfer none): the neighbor #WnckWorkspace of @space in the
* @direction direction on @screen, or %NULL if no such neighbor #WnckWorkspace
* exists. The returned #WnckWorkspace is owned by libwnck and must not be
@@ -919,10 +919,10 @@ wnck_screen_get_workspace_neighbor (WnckScreen *screen,
/**
* wnck_screen_get_active_window:
* @screen: a #WnckScreen.
- *
+ *
* Gets the active #WnckWindow on @screen. May return %NULL sometimes, since
* not all window managers guarantee that a window is always active.
- *
+ *
* Return value: (transfer none): the active #WnckWindow on @screen, or %NULL.
* The returned #WnckWindow is owned by libwnck and must not be referenced or
* unreferenced.
@@ -938,11 +938,11 @@ wnck_screen_get_active_window (WnckScreen *screen)
/**
* wnck_screen_get_previously_active_window:
* @screen: a #WnckScreen.
- *
+ *
* Gets the previously active #WnckWindow on @screen. May return %NULL
* sometimes, since not all window managers guarantee that a window is always
* active.
- *
+ *
* Return value: (transfer none): the previously active #WnckWindow on @screen,
* or %NULL. The returned #WnckWindow is owned by libwnck and must not be
* referenced or unreferenced.
@@ -960,12 +960,12 @@ wnck_screen_get_previously_active_window (WnckScreen *screen)
/**
* wnck_screen_get_windows:
* @screen: a #WnckScreen.
- *
+ *
* Gets the list of #WnckWindow on @screen. The list is not in a defined
* order, but should be "stable" (windows should not be reordered in it).
* However, the stability of the list is established by the window manager, so
* don't blame libwnck if it breaks down.
- *
+ *
* Return value: (element-type WnckWindow) (transfer none): the list of
* #WnckWindow on @screen, or %NULL if there is no window on @screen. The list
* should not be modified nor freed, as it is owned by @screen.
@@ -981,9 +981,9 @@ wnck_screen_get_windows (WnckScreen *screen)
/**
* wnck_screen_get_windows_stacked:
* @screen: a #WnckScreen.
- *
+ *
* Gets the list of #WnckWindow on @screen in bottom-to-top order.
- *
+ *
* Return value: (element-type WnckWindow) (transfer none): the list of
* #WnckWindow in stacking order on @screen, or %NULL if there is no window on
* @screen. The list should not be modified nor freed, as it is owned by
@@ -1000,10 +1000,10 @@ wnck_screen_get_windows_stacked (WnckScreen *screen)
/**
* _wnck_screen_get_gdk_screen:
* @screen: a #WnckScreen.
- *
+ *
* Gets the <classname>GdkScreen</classname referring to the same screen as
* @screen.
- *
+ *
* Return value: the <classname>GdkScreen</classname referring to the same
* screen as @screen.
**/
@@ -1019,7 +1019,7 @@ _wnck_screen_get_gdk_screen (WnckScreen *screen)
/**
* wnck_screen_force_update:
* @screen: a #WnckScreen.
- *
+ *
* Synchronously and immediately updates the list of #WnckWindow on @screen.
* This bypasses the standard update mechanism, where the list of #WnckWindow
* is updated in the idle loop.
@@ -1040,9 +1040,9 @@ wnck_screen_force_update (WnckScreen *screen)
/**
* wnck_screen_get_workspace_count:
* @screen: a #WnckScreen.
- *
+ *
* Gets the number of #WnckWorkspace on @screen.
- *
+ *
* Return value: the number of #WnckWorkspace on @screen.
**/
int
@@ -1057,7 +1057,7 @@ wnck_screen_get_workspace_count (WnckScreen *screen)
* wnck_screen_change_workspace_count:
* @screen: a #WnckScreen.
* @count: the number of #WnckWorkspace to request.
- *
+ *
* Asks the window manager to change the number of #WnckWorkspace on @screen.
*
* Since: 2.2
@@ -1067,10 +1067,10 @@ wnck_screen_change_workspace_count (WnckScreen *screen,
int count)
{
XEvent xev;
-
+
g_return_if_fail (WNCK_IS_SCREEN (screen));
g_return_if_fail (count >= 1);
-
+
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.window = screen->priv->xroot;
@@ -1079,7 +1079,7 @@ wnck_screen_change_workspace_count (WnckScreen *screen,
xev.xclient.message_type = _wnck_atom_get ("_NET_NUMBER_OF_DESKTOPS");
xev.xclient.format = 32;
xev.xclient.data.l[0] = count;
-
+
_wnck_error_trap_push ();
XSendEvent (DisplayOfScreen (screen->priv->xscreen),
screen->priv->xroot,
@@ -1356,7 +1356,7 @@ wnck_screen_calc_workspace_layout (WnckScreen *screen,
}
}
break;
- }
+ }
current_row = 0;
current_col = 0;
@@ -1462,7 +1462,7 @@ lists_equal (GList *a,
{
if (a_iter->data != b_iter->data)
return FALSE;
-
+
a_iter = a_iter->next;
b_iter = b_iter->next;
}
@@ -1503,7 +1503,7 @@ arrays_contain_same_windows (Window *a,
if (a_len == 0)
return TRUE; /* both are empty */
-
+
a_tmp = g_new (Window, a_len);
b_tmp = g_new (Window, b_len);
@@ -1517,7 +1517,7 @@ arrays_contain_same_windows (Window *a,
g_free (a_tmp);
g_free (b_tmp);
-
+
return result;
}
@@ -1543,16 +1543,16 @@ update_client_list (WnckScreen *screen)
gboolean active_changed;
gboolean stack_changed;
gboolean list_changed;
-
+
g_return_if_fail (reentrancy_guard == 0);
-
+
if (!screen->priv->need_update_stack_list)
return;
++reentrancy_guard;
-
+
screen->priv->need_update_stack_list = FALSE;
-
+
stack = NULL;
stack_length = 0;
_wnck_get_window_list (screen->priv->xroot,
@@ -1576,7 +1576,7 @@ update_client_list (WnckScreen *screen)
--reentrancy_guard;
return;
}
-
+
created = NULL;
closed = NULL;
created_apps = NULL;
@@ -1585,7 +1585,7 @@ update_client_list (WnckScreen *screen)
closed_class_groups = NULL;
new_hash = g_hash_table_new (NULL, NULL);
-
+
new_list = NULL;
i = 0;
while (i < mapping_length)
@@ -1600,8 +1600,8 @@ update_client_list (WnckScreen *screen)
WnckApplication *app;
const char *res_class;
WnckClassGroup *class_group;
-
- window = _wnck_window_create (mapping[i],
+
+ window = _wnck_window_create (mapping[i],
screen,
screen->priv->window_order++);
@@ -1610,14 +1610,14 @@ update_client_list (WnckScreen *screen)
/* Application */
leader = wnck_window_get_group_leader (window);
-
+
app = wnck_application_get (leader);
if (app == NULL)
{
app = _wnck_application_create (leader, screen);
created_apps = g_list_prepend (created_apps, app);
}
-
+
_wnck_application_add_window (app, window);
/* Class group */
@@ -1637,10 +1637,10 @@ update_client_list (WnckScreen *screen)
new_list = g_list_prepend (new_list, window);
g_hash_table_insert (new_hash, window, window);
-
+
++i;
}
-
+
/* put list back in order */
new_list = g_list_reverse (new_list);
@@ -1656,7 +1656,7 @@ update_client_list (WnckScreen *screen)
{
WnckApplication *app;
WnckClassGroup *class_group;
-
+
closed = g_list_prepend (closed, window);
/* Remove from the app */
@@ -1675,7 +1675,7 @@ update_client_list (WnckScreen *screen)
if (wnck_class_group_get_windows (class_group) == NULL)
closed_class_groups = g_list_prepend (closed_class_groups, class_group);
}
-
+
tmp = tmp->next;
}
@@ -1693,16 +1693,16 @@ update_client_list (WnckScreen *screen)
g_assert (window != NULL);
new_stack_list = g_list_prepend (new_stack_list, window);
-
+
++i;
}
-
+
g_free (stack);
g_free (mapping);
-
+
/* put list back in order */
new_stack_list = g_list_reverse (new_stack_list);
-
+
/* Now new_stack_list becomes screen->priv->stack_windows, new_list
* becomes screen->priv->mapped_windows, and we emit the opened/closed
* signals as appropriate
@@ -1720,7 +1720,7 @@ update_client_list (WnckScreen *screen)
g_assert (created_class_groups == NULL);
g_assert (closed_class_groups == NULL);
g_list_free (new_stack_list);
- g_list_free (new_list);
+ g_list_free (new_list);
--reentrancy_guard;
return;
}
@@ -1760,7 +1760,7 @@ update_client_list (WnckScreen *screen)
{
set_previously_active_window (screen, NULL);
}
-
+
if (window == screen->priv->active_window)
{
set_previously_active_window (screen, screen->priv->active_window);
@@ -1782,7 +1782,7 @@ update_client_list (WnckScreen *screen)
if (active_changed)
emit_active_window_changed (screen);
-
+
/* Now free the closed windows */
for (tmp = closed; tmp; tmp = tmp->next)
_wnck_window_destroy (WNCK_WINDOW (tmp->data));
@@ -1823,14 +1823,14 @@ update_workspace_list (WnckScreen *screen)
static int reentrancy_guard = 0;
g_return_if_fail (reentrancy_guard == 0);
-
+
if (!screen->priv->need_update_workspace_list)
return;
-
+
screen->priv->need_update_workspace_list = FALSE;
++reentrancy_guard;
-
+
n_spaces = 0;
if (!_wnck_get_cardinal (screen->priv->xroot,
_wnck_atom_get ("_NET_NUMBER_OF_DESKTOPS"),
@@ -1842,12 +1842,12 @@ update_workspace_list (WnckScreen *screen)
g_warning ("Someone set a weird number of desktops in _NET_NUMBER_OF_DESKTOPS, assuming the value is 1\n");
n_spaces = 1;
}
-
+
old_n_spaces = g_list_length (screen->priv->workspaces);
deleted = NULL;
created = NULL;
-
+
if (old_n_spaces == n_spaces)
{
--reentrancy_guard;
@@ -1867,7 +1867,7 @@ update_workspace_list (WnckScreen *screen)
else
{
int i;
-
+
g_assert (old_n_spaces < n_spaces);
/* Need to create some workspaces */
@@ -1882,7 +1882,7 @@ update_workspace_list (WnckScreen *screen)
space);
created = g_list_prepend (created, space);
-
+
++i;
}
@@ -1902,26 +1902,26 @@ update_workspace_list (WnckScreen *screen)
screen->priv->active_workspace = NULL;
emit_active_workspace_changed (screen, space);
}
-
+
emit_workspace_destroyed (screen, space);
-
+
tmp = tmp->next;
}
-
+
tmp = created;
while (tmp != NULL)
{
emit_workspace_created (screen, WNCK_WORKSPACE (tmp->data));
-
+
tmp = tmp->next;
}
g_list_free (created);
-
+
tmp = deleted;
while (tmp != NULL)
{
g_object_unref (tmp->data);
-
+
tmp = tmp->next;
}
g_list_free (deleted);
@@ -1934,7 +1934,7 @@ update_workspace_list (WnckScreen *screen)
screen->priv->need_update_active_workspace = TRUE;
queue_update (screen);
}
-
+
--reentrancy_guard;
}
@@ -1948,7 +1948,7 @@ update_viewport_settings (WnckScreen *screen)
gboolean do_update;
int space_width, space_height;
gboolean got_viewport_prop;
-
+
if (!screen->priv->need_update_viewport_settings)
return;
@@ -1961,7 +1961,7 @@ update_viewport_settings (WnckScreen *screen)
/* If no property, use the screen's size */
space_width = wnck_screen_get_width (screen);
space_height = wnck_screen_get_height (screen);
-
+
p_coord = NULL;
n_coord = 0;
if (_wnck_get_cardinal_list (screen->priv->xroot,
@@ -1973,28 +1973,28 @@ update_viewport_settings (WnckScreen *screen)
{
space_width = p_coord[0];
space_height = p_coord[1];
-
+
if (space_width < wnck_screen_get_width (screen))
space_width = wnck_screen_get_width (screen);
if (space_height < wnck_screen_get_height (screen))
space_height = wnck_screen_get_height (screen);
}
-
+
g_free (p_coord);
}
-
+
for (i = 0; i < n_spaces; i++)
{
space = wnck_screen_get_workspace (screen, i);
g_assert (space != NULL);
-
+
if (_wnck_workspace_set_geometry (space, space_width, space_height))
do_update = TRUE;
}
got_viewport_prop = FALSE;
-
+
p_coord = NULL;
n_coord = 0;
if (_wnck_get_cardinal_list (screen->priv->xroot,
@@ -2007,10 +2007,10 @@ update_viewport_settings (WnckScreen *screen)
int screen_width, screen_height;
got_viewport_prop = TRUE;
-
+
screen_width = wnck_screen_get_width (screen);
screen_height = wnck_screen_get_height (screen);
-
+
for (i = 0; i < n_spaces; i++)
{
int x = 2 * i;
@@ -2018,7 +2018,7 @@ update_viewport_settings (WnckScreen *screen)
space = wnck_screen_get_workspace (screen, i);
g_assert (space != NULL);
-
+
/* p_coord[x] is unsigned, and thus >= 0 */
if (p_coord[x] > space_width - screen_width)
p_coord[x] = space_width - screen_width;
@@ -2032,7 +2032,7 @@ update_viewport_settings (WnckScreen *screen)
do_update = TRUE;
}
}
-
+
g_free (p_coord);
}
@@ -2042,12 +2042,12 @@ update_viewport_settings (WnckScreen *screen)
{
space = wnck_screen_get_workspace (screen, i);
g_assert (space != NULL);
-
+
if (_wnck_workspace_set_viewport (space, 0, 0))
do_update = TRUE;
}
}
-
+
if (do_update)
emit_viewports_changed (screen);
}
@@ -2058,7 +2058,7 @@ update_active_workspace (WnckScreen *screen)
int number;
WnckWorkspace *previous_space;
WnckWorkspace *space;
-
+
if (!screen->priv->need_update_active_workspace)
return;
@@ -2069,12 +2069,12 @@ update_active_workspace (WnckScreen *screen)
_wnck_atom_get ("_NET_CURRENT_DESKTOP"),
&number))
number = -1;
-
+
space = wnck_screen_get_workspace (screen, number);
if (space == screen->priv->active_workspace)
return;
-
+
previous_space = screen->priv->active_workspace;
screen->priv->active_workspace = space;
@@ -2086,12 +2086,12 @@ update_active_window (WnckScreen *screen)
{
WnckWindow *window;
Window xwindow;
-
+
if (!screen->priv->need_update_active_window)
return;
screen->priv->need_update_active_window = FALSE;
-
+
xwindow = None;
_wnck_get_window (screen->priv->xroot,
_wnck_atom_get ("_NET_ACTIVE_WINDOW"),
@@ -2123,7 +2123,7 @@ update_workspace_layout (WnckScreen *screen)
n_items = 0;
if (_wnck_get_cardinal_list (screen->priv->xroot,
_wnck_atom_get ("_NET_DESKTOP_LAYOUT"),
- &list,
+ &list,
&n_items))
{
if (n_items == 3 || n_items == 4)
@@ -2209,7 +2209,7 @@ update_workspace_names (WnckScreen *screen)
int i;
GList *tmp;
GList *copy;
-
+
if (!screen->priv->need_update_workspace_names)
return;
@@ -2219,11 +2219,11 @@ update_workspace_names (WnckScreen *screen)
_wnck_atom_get ("_NET_DESKTOP_NAMES"));
copy = g_list_copy (screen->priv->workspaces);
-
+
i = 0;
tmp = copy;
while (tmp != NULL)
- {
+ {
if (names && names[i])
{
_wnck_workspace_update_name (tmp->data, names[i]);
@@ -2244,10 +2244,10 @@ static void
update_bg_pixmap (WnckScreen *screen)
{
Pixmap p;
-
+
if (!screen->priv->need_update_bg_pixmap)
return;
-
+
screen->priv->need_update_bg_pixmap = FALSE;
p = None;
@@ -2257,7 +2257,7 @@ update_bg_pixmap (WnckScreen *screen)
/* may have failed, so p may still be None */
screen->priv->bg_pixmap = p;
-
+
emit_background_changed (screen);
}
@@ -2265,10 +2265,10 @@ static void
update_showing_desktop (WnckScreen *screen)
{
int showing_desktop;
-
+
if (!screen->priv->need_update_showing_desktop)
return;
-
+
screen->priv->need_update_showing_desktop = FALSE;
showing_desktop = FALSE;
@@ -2277,7 +2277,7 @@ update_showing_desktop (WnckScreen *screen)
&showing_desktop);
screen->priv->showing_desktop = showing_desktop != 0;
-
+
emit_showing_desktop_changed (screen);
}
@@ -2285,10 +2285,10 @@ static void
update_wm (WnckScreen *screen)
{
Window wm_window;
-
+
if (!screen->priv->need_update_wm)
return;
-
+
screen->priv->need_update_wm = FALSE;
wm_window = None;
@@ -2326,7 +2326,7 @@ do_update_now (WnckScreen *screen)
screen->priv->need_update_viewport_settings = TRUE;
screen->priv->need_update_workspace_names = TRUE;
}
-
+
/* First get our big-picture state in order */
update_workspace_list (screen);
update_client_list (screen);
@@ -2339,7 +2339,7 @@ do_update_now (WnckScreen *screen)
update_workspace_names (screen);
update_showing_desktop (screen);
update_wm (screen);
-
+
update_bg_pixmap (screen);
}
@@ -2353,7 +2353,7 @@ update_idle (gpointer data)
screen->priv->update_handler = 0;
do_update_now (screen);
-
+
return FALSE;
}
@@ -2407,7 +2407,7 @@ emit_window_opened (WnckScreen *screen,
{
g_signal_emit (G_OBJECT (screen),
signals[WINDOW_OPENED],
- 0, window);
+ 0, window);
}
static void
@@ -2425,7 +2425,7 @@ emit_workspace_created (WnckScreen *screen,
{
g_signal_emit (G_OBJECT (screen),
signals[WORKSPACE_CREATED],
- 0, space);
+ 0, space);
}
static void
@@ -2570,7 +2570,7 @@ gulong
wnck_screen_get_background_pixmap (WnckScreen *screen)
{
g_return_val_if_fail (WNCK_IS_SCREEN (screen), None);
-
+
return screen->priv->bg_pixmap;
}
@@ -2637,7 +2637,7 @@ _wnck_screen_get_workspace_layout (WnckScreen *screen,
_WnckLayoutCorner *starting_corner)
{
g_return_if_fail (WNCK_IS_SCREEN (screen));
-
+
if (orientation)
*orientation = screen->priv->vertical_workspaces ?
WNCK_LAYOUT_ORIENTATION_VERTICAL :
@@ -2688,12 +2688,12 @@ wnck_screen_try_set_workspace_layout (WnckScreen *screen,
int columns)
{
int retval;
-
+
g_return_val_if_fail (WNCK_IS_SCREEN (screen),
WNCK_NO_MANAGER_TOKEN);
g_return_val_if_fail (rows != 0 || columns != 0,
WNCK_NO_MANAGER_TOKEN);
-
+
retval = _wnck_try_desktop_layout_manager (screen->priv->xscreen, current_token);
if (retval != WNCK_NO_MANAGER_TOKEN)
@@ -2740,7 +2740,7 @@ gboolean
wnck_screen_get_showing_desktop (WnckScreen *screen)
{
g_return_val_if_fail (WNCK_IS_SCREEN (screen), FALSE);
-
+
return screen->priv->showing_desktop;
}
@@ -2784,7 +2784,7 @@ wnck_screen_move_viewport (WnckScreen *screen,
g_return_if_fail (WNCK_IS_SCREEN (screen));
g_return_if_fail (x >= 0);
g_return_if_fail (y >= 0);
-
+
_wnck_change_viewport (WNCK_SCREEN_XSCREEN (screen), x, y);
}
@@ -2793,7 +2793,7 @@ SnDisplay*
_wnck_screen_get_sn_display (WnckScreen *screen)
{
g_return_val_if_fail (WNCK_IS_SCREEN (screen), NULL);
-
+
return screen->priv->sn_display;
}
#endif /* HAVE_STARTUP_NOTIFICATION */
@@ -2806,7 +2806,7 @@ _wnck_screen_change_workspace_name (WnckScreen *screen,
int n_spaces;
char **names;
int i;
-
+
n_spaces = wnck_screen_get_workspace_count (screen);
names = g_new0 (char*, n_spaces + 1);
@@ -2825,7 +2825,7 @@ _wnck_screen_change_workspace_name (WnckScreen *screen,
else
names[i] = (char*) ""; /* maybe this should be a g_warning() */
}
-
+
++i;
}
diff --git a/libwnck/selector.c b/libwnck/selector.c
index ee0b365..8f92851 100644
--- a/libwnck/selector.c
+++ b/libwnck/selector.c
@@ -156,7 +156,7 @@ wnck_selector_dimm_icon (GdkPixbuf *pixbuf)
w = gdk_pixbuf_get_width (pixbuf);
h = gdk_pixbuf_get_height (pixbuf);
- if (gdk_pixbuf_get_has_alpha (pixbuf))
+ if (gdk_pixbuf_get_has_alpha (pixbuf))
dimmed = gdk_pixbuf_copy (pixbuf);
else
dimmed = gdk_pixbuf_add_alpha (pixbuf, FALSE, 0, 0, 0);
@@ -220,7 +220,7 @@ wnck_selector_set_window_icon (WnckSelector *selector,
}
if (window && wnck_window_is_minimized (window))
- {
+ {
pixbuf = wnck_selector_dimm_icon (pixbuf);
freeme2 = pixbuf;
}
@@ -424,8 +424,8 @@ wnck_selector_window_state_changed (WnckWindow *window,
gtk_menu_reposition (GTK_MENU (selector->priv->menu));
}
- if (changed_mask &
- (WNCK_WINDOW_STATE_DEMANDS_ATTENTION | WNCK_WINDOW_STATE_URGENT))
+ if (changed_mask &
+ (WNCK_WINDOW_STATE_DEMANDS_ATTENTION | WNCK_WINDOW_STATE_URGENT))
{
if (wnck_window_or_transient_needs_attention (window))
_make_gtk_label_bold (GTK_LABEL (item->label));
@@ -541,7 +541,7 @@ wnck_selector_get_width (GtkWidget *widget, const char *text)
return width;
}
-static void
+static void
wnck_selector_drag_begin (GtkWidget *widget,
GdkDragContext *context,
WnckWindow *window)
@@ -561,7 +561,7 @@ wnck_selector_drag_begin (GtkWidget *widget,
_wnck_window_set_as_drag_icon (window, context, widget);
}
-static void
+static void
wnck_selector_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
@@ -569,7 +569,7 @@ wnck_selector_drag_data_get (GtkWidget *widget,
guint time,
WnckWindow *window)
{
- gulong xid;
+ gulong xid;
xid = wnck_window_get_xid (window);
gtk_selection_data_set (selection_data,
@@ -626,12 +626,12 @@ wnck_selector_item_new (WnckSelector *selector,
g_signal_connect_object (item, "drag_data_get",
G_CALLBACK (wnck_selector_drag_data_get),
G_OBJECT (window),
- 0);
+ 0);
g_signal_connect_object (item, "drag_begin",
G_CALLBACK (wnck_selector_drag_begin),
G_OBJECT (window),
- 0);
+ 0);
}
return item;
@@ -775,7 +775,7 @@ wnck_selector_insert_window (WnckSelector *selector, WnckWindow *window)
gtk_menu_shell_insert (GTK_MENU_SHELL (selector->priv->menu),
item, i);
}
- else
+ else
{
workspace_n = wnck_workspace_get_number (workspace);
@@ -1089,7 +1089,7 @@ wnck_selector_scroll_cb (WnckSelector *selector,
previous_window = window;
}
-
+
return TRUE;
}
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 1762cdf..d3cbeb4 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -69,16 +69,16 @@
*/
/* TODO:
- *
+ *
* Add total focused time to the grouping score function
* Fine tune the grouping scoring function
- * Fix "changes" to icon for groups/applications
+ * Fix "changes" to icon for groups/applications
* Maybe fine tune size_allocate() some more...
* Better vertical layout handling
* prefs
* support for right-click menu merging w/ bonobo for the applet
*
- */
+ */
#define WNCK_TYPE_TASK (wnck_task_get_type ())
@@ -117,7 +117,7 @@ struct _WnckTask
GObject parent_instance;
WnckTasklist *tasklist;
-
+
GtkWidget *button;
GtkWidget *image;
GtkWidget *label;
@@ -129,7 +129,7 @@ struct _WnckTask
#ifdef HAVE_STARTUP_NOTIFICATION
SnStartupSequence *startup_sequence;
#endif
-
+
gdouble grouping_score;
GList *windows; /* List of the WnckTask for the window,
@@ -139,7 +139,7 @@ struct _WnckTask
guint name_changed_tag;
guint class_name_changed_tag;
guint class_icon_changed_tag;
-
+
/* task menu */
GtkWidget *menu;
/* ops menu */
@@ -148,7 +148,7 @@ struct _WnckTask
guint really_toggling : 1; /* Set when tasklist really wants
* to change the togglebutton state
*/
- guint was_active : 1; /* used to fixup activation behavior */
+ guint was_active : 1; /* used to fixup activation behavior */
guint button_activate;
@@ -157,9 +157,9 @@ struct _WnckTask
time_t start_needs_attention;
gdouble glow_start_time;
gdouble glow_factor;
-
+
guint button_glow;
-
+
guint row;
guint col;
};
@@ -181,9 +181,9 @@ struct _WnckTasklistPrivate
WnckTask *active_task; /* NULL if active window not in tasklist */
WnckTask *active_class_group; /* NULL if active window not in tasklist */
-
+
gboolean include_all_workspaces;
-
+
/* Calculated by update_lists */
GList *class_groups;
GList *windows;
@@ -191,20 +191,20 @@ struct _WnckTasklistPrivate
/* Not handled by update_lists */
GList *startup_sequences;
-
- /* windows with _NET_WM_STATE_SKIP_TASKBAR set; connected to
+
+ /* windows with _NET_WM_STATE_SKIP_TASKBAR set; connected to
* "state_changed" signal, but excluded from tasklist.
*/
- GList *skipped_windows;
+ GList *skipped_windows;
GHashTable *class_group_hash;
GHashTable *win_hash;
-
+
gint max_button_width;
gint max_button_height;
gboolean switch_workspace_on_unminimize;
-
+
WnckTasklistGroupingType grouping;
gint grouping_limit;
@@ -219,7 +219,7 @@ struct _WnckTasklistPrivate
WnckLoadIconFunction icon_loader;
void *icon_loader_data;
GDestroyNotify free_icon_loader_data;
-
+
#ifdef HAVE_STARTUP_NOTIFICATION
SnMonitorContext *sn_context;
guint startup_sequence_timeout;
@@ -228,7 +228,7 @@ struct _WnckTasklistPrivate
gint monitor_num;
GdkRectangle monitor_geometry;
GtkReliefStyle relief;
-
+
guint drag_start_time;
};
@@ -265,7 +265,7 @@ static gint wnck_task_compare (gconstpointer a,
gconstpointer b);
static void wnck_task_update_visible_state (WnckTask *task);
static void wnck_task_state_changed (WnckWindow *window,
- WnckWindowState changed_mask,
+ WnckWindowState changed_mask,
WnckWindowState new_state,
gpointer data);
@@ -417,7 +417,7 @@ static void
wnck_task_class_init (WnckTaskClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
object_class->finalize = wnck_task_finalize;
gtk_rc_parse_string ("\n"
@@ -460,7 +460,7 @@ wnck_task_button_glow (WnckTask *task)
}
else
{
- task->glow_factor = fade_opacity * (0.5 -
+ task->glow_factor = fade_opacity * (0.5 -
0.5 * cos ((now - task->glow_start_time) *
M_PI * 2.0 / loop_time));
@@ -492,11 +492,11 @@ wnck_task_queue_glow (WnckTask *task)
task->glow_start_time = 0.0;
/* The animation doesn't speed up or slow down based on the
- * timeout value, but instead will just appear smoother or
+ * timeout value, but instead will just appear smoother or
* choppier.
*/
task->button_glow =
- g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
+ g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
50,
(GSourceFunc) wnck_task_button_glow, task,
(GDestroyNotify) wnck_task_clear_glow_start_timeout_id);
@@ -554,7 +554,7 @@ wnck_task_finalize (GObject *object)
task->icon_changed_tag);
task->icon_changed_tag = 0;
}
-
+
if (task->name_changed_tag != 0)
{
g_signal_handler_disconnect (task->window,
@@ -606,7 +606,7 @@ wnck_task_finalize (GObject *object)
{
g_source_remove (task->button_activate);
task->button_activate = 0;
- }
+ }
wnck_task_stop_glow (task);
@@ -623,7 +623,7 @@ wnck_tasklist_init (WnckTasklist *tasklist)
widget = GTK_WIDGET (tasklist);
gtk_widget_set_has_window (widget, FALSE);
-
+
tasklist->priv = WNCK_TASKLIST_GET_PRIVATE (tasklist);
tasklist->priv->screen = NULL;
@@ -673,7 +673,7 @@ wnck_tasklist_init (WnckTasklist *tasklist)
tasklist->priv->monitor_num = -1;
tasklist->priv->monitor_geometry.width = -1; /* invalid value */
tasklist->priv->relief = GTK_RELIEF_NORMAL;
-
+
tasklist->priv->drag_start_time = 0;
atk_obj = gtk_widget_get_accessible (widget);
@@ -698,10 +698,10 @@ wnck_tasklist_class_init (WnckTasklistClass *klass)
widget_class->size_allocate = wnck_tasklist_size_allocate;
widget_class->realize = wnck_tasklist_realize;
widget_class->unrealize = wnck_tasklist_unrealize;
-
+
container_class->forall = wnck_tasklist_forall;
container_class->remove = wnck_tasklist_remove;
-
+
/**
* WnckTasklist:fade-loop-time:
*
@@ -791,9 +791,9 @@ static void
wnck_tasklist_free_skipped_windows (WnckTasklist *tasklist)
{
GList *l;
-
+
l = tasklist->priv->skipped_windows;
-
+
while (l != NULL)
{
skipped_window *skipped = (skipped_window*) l->data;
@@ -802,7 +802,7 @@ wnck_tasklist_free_skipped_windows (WnckTasklist *tasklist)
g_free (skipped);
l = l->next;
}
-
+
g_list_free (tasklist->priv->skipped_windows);
}
@@ -873,7 +873,7 @@ wnck_tasklist_set_grouping (WnckTasklist *tasklist,
if (tasklist->priv->grouping == grouping)
return;
-
+
tasklist->priv->grouping = grouping;
gtk_widget_queue_resize (GTK_WIDGET (tasklist));
}
@@ -964,7 +964,7 @@ wnck_tasklist_set_include_all_workspaces (WnckTasklist *tasklist,
if (tasklist->priv->include_all_workspaces == include_all_workspaces)
return;
-
+
tasklist->priv->include_all_workspaces = include_all_workspaces;
wnck_tasklist_update_lists (tasklist);
gtk_widget_queue_resize (GTK_WIDGET (tasklist));
@@ -1002,11 +1002,11 @@ wnck_tasklist_set_grouping_limit (WnckTasklist *tasklist,
*
* Deprecated:2.20:
*/
-void
+void
wnck_tasklist_set_minimum_width (WnckTasklist *tasklist, gint size)
{
}
-
+
/**
* wnck_tasklist_get_minimum_width:
* @tasklist: a #WnckTasklist.
@@ -1032,11 +1032,11 @@ wnck_tasklist_get_minimum_width (WnckTasklist *tasklist)
*
* Deprecated:2.20:
*/
-void
+void
wnck_tasklist_set_minimum_height (WnckTasklist *tasklist, gint size)
{
}
-
+
/**
* wnck_tasklist_get_minimum_height:
* @tasklist: a #WnckTasklist.
@@ -1061,7 +1061,7 @@ wnck_tasklist_get_minimum_height (WnckTasklist *tasklist)
* @free_data_func: function to free the data
*
* Sets a function to be used for loading icons.
- *
+ *
* Since: 2.2
**/
void
@@ -1077,7 +1077,7 @@ wnck_tasklist_set_icon_loader (WnckTasklist *tasklist,
tasklist->priv->icon_loader = load_icon_func;
tasklist->priv->icon_loader_data = data;
- tasklist->priv->free_icon_loader_data = free_data_func;
+ tasklist->priv->free_icon_loader_data = free_data_func;
}
/* returns the maximal possible button width (i.e. if you
@@ -1101,7 +1101,7 @@ wnck_tasklist_layout (GtkAllocation *allocation,
/* At least one row */
n_rows = MAX (n_rows, 1);
-
+
/* We want to use as many rows as possible to limit the width */
n_cols = (n_buttons + n_rows - 1) / n_rows;
@@ -1110,7 +1110,7 @@ wnck_tasklist_layout (GtkAllocation *allocation,
*n_cols_out = n_cols;
*n_rows_out = n_rows;
-
+
return allocation->width / n_cols;
}
@@ -1159,7 +1159,7 @@ wnck_tasklist_score_groups (WnckTasklist *tasklist,
if (strcmp (name, first_name) == 0)
n_same_title++;
}
-
+
w = w->next;
}
same_window_ratio = (double)n_same_title/(double)n_windows;
@@ -1182,7 +1182,7 @@ wnck_task_get_highest_scored (GList *ungrouped_class_groups,
WnckTask *best_task = NULL;
double max_score = -1000000000.0; /* Large negative score */
GList *l;
-
+
l = ungrouped_class_groups;
while (l != NULL)
{
@@ -1193,7 +1193,7 @@ wnck_task_get_highest_scored (GList *ungrouped_class_groups,
max_score = class_group_task->grouping_score;
best_task = class_group_task;
}
-
+
l = l->next;
}
@@ -1276,7 +1276,7 @@ wnck_tasklist_size_request (GtkWidget *widget,
GET_MAX_WIDTH_HEIGHT_FROM_BUTTONS (tasklist->priv->windows)
GET_MAX_WIDTH_HEIGHT_FROM_BUTTONS (tasklist->priv->class_groups)
GET_MAX_WIDTH_HEIGHT_FROM_BUTTONS (tasklist->priv->startup_sequences)
-
+
/* Note that the fact that we nearly don't care about the width/height
* requested by the buttons makes it possible to hide/show the label/image
* in wnck_task_size_allocated(). If we really cared about those, this
@@ -1294,7 +1294,7 @@ wnck_tasklist_size_request (GtkWidget *widget,
array = g_array_new (FALSE, FALSE, sizeof (int));
/* Calculate size_hints list */
-
+
n_windows = g_list_length (tasklist->priv->windows);
n_startup_sequences = g_list_length (tasklist->priv->startup_sequences);
n_grouped_buttons = 0;
@@ -1303,7 +1303,7 @@ wnck_tasklist_size_request (GtkWidget *widget,
grouping_limit = MIN (tasklist->priv->grouping_limit,
tasklist->priv->max_button_width);
-
+
/* Try ungrouped mode */
wnck_tasklist_layout (&fake_allocation,
tasklist->priv->max_button_width,
@@ -1377,12 +1377,12 @@ wnck_tasklist_size_request (GtkWidget *widget,
g_array_insert_val (array, 0, val);
g_array_insert_val (array, 0, val);
}
-
+
if (tasklist->priv->size_hints)
g_free (tasklist->priv->size_hints);
tasklist->priv->size_hints_len = array->len;
-
+
tasklist->priv->size_hints = (int *)g_array_free (array, FALSE);
requisition->width = tasklist->priv->size_hints[0];
@@ -1439,7 +1439,7 @@ wnck_tasklist_get_size_hint_list (WnckTasklist *tasklist,
*n_elements = tasklist->priv->size_hints_len;
return tasklist->priv->size_hints;
}
-
+
static void
wnck_task_size_allocated (GtkWidget *widget,
GtkAllocation *allocation,
@@ -1490,7 +1490,7 @@ wnck_tasklist_size_allocate (GtkWidget *widget,
GList *visible_tasks = NULL;
GList *windows_sorted = NULL;
int grouping_limit;
-
+
tasklist = WNCK_TASKLIST (widget);
n_windows = g_list_length (tasklist->priv->windows);
@@ -1530,13 +1530,13 @@ wnck_tasklist_size_allocate (GtkWidget *widget,
/* Sort */
class_group_task->windows = g_list_sort (class_group_task->windows,
wnck_task_compare_alphabetically);
-
+
/* Hide all this group's windows */
l = class_group_task->windows;
while (l != NULL)
{
win_task = WNCK_TASK (l->data);
-
+
gtk_widget_set_child_visible (GTK_WIDGET (win_task->button), FALSE);
l = l->next;
@@ -1547,7 +1547,7 @@ wnck_tasklist_size_allocate (GtkWidget *widget,
visible_tasks = g_list_prepend (visible_tasks, class_group_task->windows->data);
gtk_widget_set_child_visible (GTK_WIDGET (class_group_task->button), FALSE);
}
-
+
button_width = wnck_tasklist_layout (allocation,
tasklist->priv->max_button_width,
tasklist->priv->max_button_height,
@@ -1560,10 +1560,10 @@ wnck_tasklist_size_allocate (GtkWidget *widget,
while (l != NULL)
{
class_group_task = WNCK_TASK (l->data);
-
+
visible_tasks = g_list_concat (visible_tasks, g_list_copy (class_group_task->windows));
gtk_widget_set_child_visible (GTK_WIDGET (class_group_task->button), FALSE);
-
+
l = l->next;
}
@@ -1600,7 +1600,7 @@ wnck_tasklist_size_allocate (GtkWidget *widget,
WnckTask *task = WNCK_TASK (l->data);
int row = i % n_rows;
int col = i / n_rows;
-
+
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
col = n_cols - col - 1;
@@ -1617,7 +1617,7 @@ wnck_tasklist_size_allocate (GtkWidget *widget,
if (task->type != WNCK_TASK_STARTUP_SEQUENCE)
{
GList *ll;
-
+
/* Build sorted windows list */
if (g_list_length (task->windows) > 1)
windows_sorted = g_list_concat (windows_sorted,
@@ -1638,12 +1638,12 @@ wnck_tasklist_size_allocate (GtkWidget *widget,
/* Update icon geometries. */
wnck_tasklist_update_icon_geometries (tasklist, visible_tasks);
-
+
g_list_free (visible_tasks);
g_list_free (tasklist->priv->windows);
g_list_free (ungrouped_class_groups);
tasklist->priv->windows = windows_sorted;
-
+
GTK_WIDGET_CLASS (wnck_tasklist_parent_class)->size_allocate (widget,
allocation);
}
@@ -1654,7 +1654,7 @@ wnck_tasklist_realize (GtkWidget *widget)
WnckTasklist *tasklist;
GdkScreen *gdkscreen;
- tasklist = WNCK_TASKLIST (widget);
+ tasklist = WNCK_TASKLIST (widget);
gdkscreen = gtk_widget_get_screen (widget);
tasklist->priv->screen = wnck_screen_get (gdk_screen_get_number (gdkscreen));
@@ -1668,7 +1668,7 @@ wnck_tasklist_realize (GtkWidget *widget)
tasklist,
NULL);
#endif
-
+
(* GTK_WIDGET_CLASS (wnck_tasklist_parent_class)->realize) (widget);
tasklist_instances = g_slist_append (tasklist_instances, tasklist);
@@ -1695,9 +1695,9 @@ wnck_tasklist_unrealize (GtkWidget *widget)
sn_monitor_context_unref (tasklist->priv->sn_context);
tasklist->priv->sn_context = NULL;
#endif
-
+
(* GTK_WIDGET_CLASS (wnck_tasklist_parent_class)->unrealize) (widget);
-
+
tasklist_instances = g_slist_remove (tasklist_instances, tasklist);
g_slist_foreach (tasklist_instances,
(GFunc) wnck_tasklist_update_lists,
@@ -1712,7 +1712,7 @@ wnck_tasklist_forall (GtkContainer *container,
{
WnckTasklist *tasklist;
GList *tmp;
-
+
tasklist = WNCK_TASKLIST (container);
tmp = tasklist->priv->windows;
@@ -1720,16 +1720,16 @@ wnck_tasklist_forall (GtkContainer *container,
{
WnckTask *task = WNCK_TASK (tmp->data);
tmp = tmp->next;
-
+
(* callback) (task->button, callback_data);
}
-
+
tmp = tasklist->priv->class_groups;
while (tmp != NULL)
{
WnckTask *task = WNCK_TASK (tmp->data);
tmp = tmp->next;
-
+
(* callback) (task->button, callback_data);
}
@@ -1738,7 +1738,7 @@ wnck_tasklist_forall (GtkContainer *container,
{
WnckTask *task = WNCK_TASK (tmp->data);
tmp = tmp->next;
-
+
(* callback) (task->button, callback_data);
}
}
@@ -1749,7 +1749,7 @@ wnck_tasklist_remove (GtkContainer *container,
{
WnckTasklist *tasklist;
GList *tmp;
-
+
g_return_if_fail (WNCK_IS_TASKLIST (container));
g_return_if_fail (widget != NULL);
@@ -1797,7 +1797,7 @@ wnck_tasklist_remove (GtkContainer *container,
{
WnckTask *task = WNCK_TASK (tmp->data);
tmp = tmp->next;
-
+
if (task->button == widget)
{
g_hash_table_remove (tasklist->priv->class_group_hash,
@@ -1817,7 +1817,7 @@ wnck_tasklist_remove (GtkContainer *container,
{
WnckTask *task = WNCK_TASK (tmp->data);
tmp = tmp->next;
-
+
if (task->button == widget)
{
tasklist->priv->startup_sequences =
@@ -2073,7 +2073,7 @@ static void
wnck_tasklist_free_tasks (WnckTasklist *tasklist)
{
GList *l;
-
+
tasklist->priv->active_task = NULL;
tasklist->priv->active_class_group = NULL;
@@ -2107,10 +2107,10 @@ wnck_tasklist_free_tasks (WnckTasklist *tasklist)
gtk_widget_destroy (task->button);
}
}
-
+
g_assert (tasklist->priv->class_groups == NULL);
g_assert (g_hash_table_size (tasklist->priv->class_group_hash) == 0);
-
+
if (tasklist->priv->skipped_windows)
{
wnck_tasklist_free_skipped_windows (tasklist);
@@ -2155,7 +2155,7 @@ tasklist_include_window_impl (WnckTasklist *tasklist,
if (wnck_window_is_pinned (win))
return TRUE;
- active_workspace = wnck_screen_get_active_workspace (tasklist->priv->screen);
+ active_workspace = wnck_screen_get_active_workspace (tasklist->priv->screen);
if (active_workspace == NULL)
return TRUE;
@@ -2174,7 +2174,7 @@ tasklist_include_window_impl (WnckTasklist *tasklist,
static gboolean
tasklist_include_in_skipped_list (WnckTasklist *tasklist, WnckWindow *win)
{
- return tasklist_include_window_impl (tasklist,
+ return tasklist_include_window_impl (tasklist,
win,
TRUE /* check_for_skipped_list */);
}
@@ -2182,7 +2182,7 @@ tasklist_include_in_skipped_list (WnckTasklist *tasklist, WnckWindow *win)
static gboolean
wnck_tasklist_include_window (WnckTasklist *tasklist, WnckWindow *win)
{
- return tasklist_include_window_impl (tasklist,
+ return tasklist_include_window_impl (tasklist,
win,
FALSE /* check_for_skipped_list */);
}
@@ -2203,7 +2203,7 @@ wnck_tasklist_update_lists (WnckTasklist *tasklist)
/* wnck_tasklist_update_lists() will be called on realize */
if (!gtk_widget_get_realized (GTK_WIDGET (tasklist)))
return;
-
+
tasklist_window = gtk_widget_get_window (GTK_WIDGET (tasklist));
if (tasklist_window != NULL)
@@ -2231,7 +2231,7 @@ wnck_tasklist_update_lists (WnckTasklist *tasklist)
}
}
}
-
+
l = windows = wnck_screen_get_windows (tasklist->priv->screen);
while (l != NULL)
{
@@ -2242,7 +2242,7 @@ wnck_tasklist_update_lists (WnckTasklist *tasklist)
win_task = wnck_task_new_from_window (tasklist, win);
tasklist->priv->windows = g_list_prepend (tasklist->priv->windows, win_task);
g_hash_table_insert (tasklist->priv->win_hash, win, win_task);
-
+
gtk_widget_set_parent (win_task->button, GTK_WIDGET (tasklist));
gtk_widget_show (win_task->button);
@@ -2271,7 +2271,7 @@ wnck_tasklist_update_lists (WnckTasklist *tasklist)
g_hash_table_insert (tasklist->priv->class_group_hash,
class_group, class_group_task);
}
-
+
class_group_task->windows =
g_list_prepend (class_group_task->windows,
win_task);
@@ -2292,11 +2292,11 @@ wnck_tasklist_update_lists (WnckTasklist *tasklist)
"state_changed",
G_CALLBACK (wnck_task_state_changed),
tasklist);
- tasklist->priv->skipped_windows =
+ tasklist->priv->skipped_windows =
g_list_prepend (tasklist->priv->skipped_windows,
(gpointer) skipped);
}
-
+
l = l->next;
}
@@ -2312,7 +2312,7 @@ wnck_tasklist_update_lists (WnckTasklist *tasklist)
* task label
*/
wnck_task_update_visible_state (class_group_task);
-
+
l = l->next;
}
@@ -2331,7 +2331,7 @@ wnck_tasklist_change_active_task (WnckTasklist *tasklist, WnckTask *active_task)
g_assert (active_task == NULL ||
active_task->type != WNCK_TASK_STARTUP_SEQUENCE);
-
+
if (tasklist->priv->active_task)
{
tasklist->priv->active_task->really_toggling = TRUE;
@@ -2339,9 +2339,9 @@ wnck_tasklist_change_active_task (WnckTasklist *tasklist, WnckTask *active_task)
FALSE);
tasklist->priv->active_task->really_toggling = FALSE;
}
-
+
tasklist->priv->active_task = active_task;
-
+
if (tasklist->priv->active_task)
{
tasklist->priv->active_task->really_toggling = TRUE;
@@ -2366,9 +2366,9 @@ wnck_tasklist_change_active_task (WnckTasklist *tasklist, WnckTask *active_task)
FALSE);
tasklist->priv->active_class_group->really_toggling = FALSE;
}
-
+
tasklist->priv->active_class_group = active_task;
-
+
if (tasklist->priv->active_class_group)
{
tasklist->priv->active_class_group->really_toggling = TRUE;
@@ -2385,11 +2385,11 @@ wnck_tasklist_update_icon_geometries (WnckTasklist *tasklist,
{
gint x, y, width, height;
GList *l1;
-
+
for (l1 = visible_tasks; l1; l1 = l1->next) {
WnckTask *task = WNCK_TASK (l1->data);
GtkAllocation allocation;
-
+
if (!gtk_widget_get_realized (task->button))
continue;
@@ -2441,7 +2441,7 @@ wnck_tasklist_active_window_changed (WnckScreen *screen,
while (active_window && !active_task)
{
active_window = wnck_window_get_transient (active_window);
- active_task = g_hash_table_lookup (tasklist->priv->win_hash,
+ active_task = g_hash_table_lookup (tasklist->priv->win_hash,
active_window);
/* Check for transient cycles */
if (active_window == initial_window)
@@ -2559,7 +2559,7 @@ wnck_tasklist_window_changed_geometry (WnckWindow *window,
/* Don't keep any stale references */
gtk_widget_queue_draw (GTK_WIDGET (tasklist));
-
+
tasklist->priv->idle_callback_tag = g_idle_add (do_wnck_tasklist_update_lists, tasklist);
}
@@ -2595,7 +2595,7 @@ wnck_tasklist_window_added (WnckScreen *screen,
#ifdef HAVE_STARTUP_NOTIFICATION
wnck_tasklist_check_end_sequence (tasklist, win);
#endif
-
+
wnck_tasklist_connect_window (tasklist, win);
wnck_tasklist_update_lists (tasklist);
@@ -2634,7 +2634,7 @@ wnck_task_position_menu (GtkMenu *menu,
gint menu_ypos;
gint pointer_x;
gint pointer_y;
-
+
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL);
window = gtk_widget_get_window (widget);
@@ -2737,7 +2737,7 @@ wnck_tasklist_activate_task_window (WnckTask *task,
if (task->window == NULL)
return;
-
+
state = wnck_window_get_state (task->window);
active_ws = wnck_screen_get_active_workspace (tasklist->priv->screen);
@@ -2754,7 +2754,7 @@ wnck_tasklist_activate_task_window (WnckTask *task,
}
else
{
- if ((task->was_active ||
+ if ((task->was_active ||
wnck_window_transient_is_most_recently_activated (task->window)) &&
(!window_ws || active_ws == window_ws))
{
@@ -2774,18 +2774,18 @@ wnck_tasklist_activate_task_window (WnckTask *task,
wnck_window_activate_transient (task->window, timestamp);
}
}
-
+
if (tasklist->priv->activate_timeout_id)
g_source_remove (tasklist->priv->activate_timeout_id);
- tasklist->priv->activate_timeout_id =
+ tasklist->priv->activate_timeout_id =
g_timeout_add (500, &wnck_tasklist_change_active_timeout, tasklist);
wnck_tasklist_change_active_task (tasklist, task);
}
-static void
+static void
wnck_task_close_all (GtkMenuItem *menu_item,
gpointer data)
{
@@ -2820,7 +2820,7 @@ wnck_task_unminimize_all (GtkMenuItem *menu_item,
}
}
-static void
+static void
wnck_task_minimize_all (GtkMenuItem *menu_item,
gpointer data)
{
@@ -2836,7 +2836,7 @@ wnck_task_minimize_all (GtkMenuItem *menu_item,
}
}
-static void
+static void
wnck_task_unmaximize_all (GtkMenuItem *menu_item,
gpointer data)
{
@@ -2852,7 +2852,7 @@ wnck_task_unmaximize_all (GtkMenuItem *menu_item,
}
}
-static void
+static void
wnck_task_maximize_all (GtkMenuItem *menu_item,
gpointer data)
{
@@ -2879,20 +2879,20 @@ wnck_task_popup_menu (WnckTask *task,
GtkWidget *menu_item;
GtkWidget *image;
GList *l, *list;
-
+
g_return_if_fail (task->type == WNCK_TASK_CLASS_GROUP);
if (task->class_group == NULL)
return;
-
+
if (task->menu == NULL)
{
task->menu = gtk_menu_new ();
g_object_ref_sink (task->menu);
}
-
+
menu = task->menu;
-
+
/* Remove old menu content */
list = gtk_container_get_children (GTK_CONTAINER (menu));
l = list;
@@ -2903,12 +2903,12 @@ wnck_task_popup_menu (WnckTask *task,
l = l->next;
}
g_list_free (list);
-
+
l = task->windows;
while (l)
{
win_task = WNCK_TASK (l->data);
-
+
text = wnck_task_get_text (win_task, TRUE, TRUE);
menu_item = gtk_image_menu_item_new_with_label (text);
g_free (text);
@@ -2916,13 +2916,13 @@ wnck_task_popup_menu (WnckTask *task,
gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (menu_item),
TRUE);
- if (wnck_task_get_needs_attention (win_task))
+ if (wnck_task_get_needs_attention (win_task))
_make_gtk_label_bold (GTK_LABEL (gtk_bin_get_child (GTK_BIN (menu_item))));
text = wnck_task_get_text (win_task, FALSE, FALSE);
gtk_widget_set_tooltip_text (menu_item, text);
g_free (text);
-
+
pixbuf = wnck_task_get_icon (win_task);
if (pixbuf)
{
@@ -2932,7 +2932,7 @@ wnck_task_popup_menu (WnckTask *task,
image);
g_object_unref (pixbuf);
}
-
+
gtk_widget_show (menu_item);
if (action_submenu)
@@ -2955,24 +2955,24 @@ wnck_task_popup_menu (WnckTask *task,
g_signal_connect_object (G_OBJECT(menu_item), "drag_begin",
G_CALLBACK (wnck_task_drag_begin),
G_OBJECT (win_task),
- 0);
+ 0);
g_signal_connect_object (G_OBJECT(menu_item), "drag_end",
G_CALLBACK (wnck_task_drag_end),
G_OBJECT (win_task),
- 0);
+ 0);
g_signal_connect_object (G_OBJECT(menu_item), "drag_data_get",
G_CALLBACK (wnck_task_drag_data_get),
G_OBJECT (win_task),
- 0);
+ 0);
}
-
+
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
-
+
l = l->next;
}
/* In case of Right click, show Minimize All, Unminimize All, Close All*/
- if (action_submenu)
+ if (action_submenu)
{
GtkWidget *separator;
GtkWidget *image;
@@ -3037,7 +3037,7 @@ wnck_task_popup_menu (WnckTask *task,
gtk_menu_set_screen (GTK_MENU (menu),
_wnck_screen_get_gdk_screen (task->tasklist->priv->screen));
-
+
gtk_widget_show (menu);
gtk_menu_popup (GTK_MENU (menu),
NULL, NULL,
@@ -3052,7 +3052,7 @@ wnck_task_button_toggled (GtkButton *button,
/* Did we really want to change the state of the togglebutton? */
if (task->really_toggling)
return;
-
+
/* Undo the toggle */
task->really_toggling = TRUE;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
@@ -3084,7 +3084,7 @@ wnck_task_get_text (WnckTask *task,
gboolean include_state)
{
const char *name;
-
+
switch (task->type)
{
case WNCK_TASK_CLASS_GROUP:
@@ -3109,7 +3109,7 @@ wnck_task_get_text (WnckTask *task,
name = sn_startup_sequence_get_name (task->startup_sequence);
if (name == NULL)
name = sn_startup_sequence_get_binary_name (task->startup_sequence);
-
+
return g_strdup (name);
#else
return NULL;
@@ -3133,7 +3133,7 @@ wnck_dimm_icon (GdkPixbuf *pixbuf)
h = gdk_pixbuf_get_height (pixbuf);
g_assert (gdk_pixbuf_get_has_alpha (pixbuf));
-
+
pixel_stride = 4;
row = gdk_pixbuf_get_pixels (pixbuf);
@@ -3146,7 +3146,7 @@ wnck_dimm_icon (GdkPixbuf *pixbuf)
for (x = 0; x < w; x++)
{
pixels[3] /= 2;
-
+
pixels += pixel_stride;
}
@@ -3159,7 +3159,7 @@ wnck_task_scale_icon (GdkPixbuf *orig, gboolean minimized)
{
int w, h;
GdkPixbuf *pixbuf;
-
+
if (!orig)
return NULL;
@@ -3170,15 +3170,15 @@ wnck_task_scale_icon (GdkPixbuf *orig, gboolean minimized)
!gdk_pixbuf_get_has_alpha (orig))
{
double scale;
-
+
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
TRUE,
8,
MINI_ICON_SIZE * w / (double) h,
MINI_ICON_SIZE);
-
+
scale = MINI_ICON_SIZE / (double) gdk_pixbuf_get_height (orig);
-
+
gdk_pixbuf_scale (orig,
pixbuf,
0, 0,
@@ -3190,18 +3190,18 @@ wnck_task_scale_icon (GdkPixbuf *orig, gboolean minimized)
}
else
pixbuf = orig;
-
+
if (minimized)
{
if (orig == pixbuf)
pixbuf = gdk_pixbuf_copy (orig);
-
+
wnck_dimm_icon (pixbuf);
}
if (orig == pixbuf)
g_object_ref (pixbuf);
-
+
return pixbuf;
}
@@ -3213,7 +3213,7 @@ wnck_task_get_icon (WnckTask *task)
GdkPixbuf *pixbuf;
pixbuf = NULL;
-
+
switch (task->type)
{
case WNCK_TASK_CLASS_GROUP:
@@ -3232,12 +3232,12 @@ wnck_task_get_icon (WnckTask *task)
if (task->tasklist->priv->icon_loader != NULL)
{
const char *icon;
-
+
icon = sn_startup_sequence_get_icon_name (task->startup_sequence);
if (icon != NULL)
{
GdkPixbuf *loaded;
-
+
loaded = (* task->tasklist->priv->icon_loader) (icon,
MINI_ICON_SIZE,
0,
@@ -3358,7 +3358,7 @@ wnck_task_state_changed (WnckWindow *window,
gtk_widget_queue_resize (GTK_WIDGET (tasklist));
return;
}
-
+
if ((changed_mask & WNCK_WINDOW_STATE_DEMANDS_ATTENTION) ||
(changed_mask & WNCK_WINDOW_STATE_URGENT))
{
@@ -3374,7 +3374,7 @@ wnck_task_state_changed (WnckWindow *window,
gtk_widget_queue_resize (GTK_WIDGET (tasklist));
}
}
-
+
if ((changed_mask & WNCK_WINDOW_STATE_MINIMIZED) ||
(changed_mask & WNCK_WINDOW_STATE_DEMANDS_ATTENTION) ||
(changed_mask & WNCK_WINDOW_STATE_URGENT))
@@ -3390,7 +3390,7 @@ wnck_task_state_changed (WnckWindow *window,
WnckTask *class_group_task;
wnck_task_update_visible_state (win_task);
-
+
class_group_task =
g_hash_table_lookup (tasklist->priv->class_group_hash,
win_task->class_group);
@@ -3399,7 +3399,7 @@ wnck_task_state_changed (WnckWindow *window,
wnck_task_update_visible_state (class_group_task);
}
}
-
+
}
static void
@@ -3539,7 +3539,7 @@ wnck_task_drag_data_get (GtkWidget *widget,
guint time,
WnckTask *task)
{
- gulong xid;
+ gulong xid;
xid = wnck_window_get_xid (task->window);
gtk_selection_data_set (selection_data,
@@ -3609,7 +3609,7 @@ wnck_task_drag_data_received (GtkWidget *widget,
return;
}
}
-
+
if (found_window)
{
for (l = windows; l; l = l->next)
@@ -3668,19 +3668,19 @@ wnck_task_button_press_event (GtkWidget *widget,
task->was_active = FALSE;
return FALSE;
- }
+ }
else if (event->button == 3)
{
if (task->action_menu)
gtk_widget_destroy (task->action_menu);
g_assert (task->action_menu == NULL);
-
+
task->action_menu = wnck_action_menu_new (task->window);
g_object_add_weak_pointer (G_OBJECT (task->action_menu),
(void**) &task->action_menu);
-
+
gtk_menu_set_screen (GTK_MENU (task->action_menu),
_wnck_screen_get_gdk_screen (task->tasklist->priv->screen));
@@ -3693,7 +3693,7 @@ wnck_task_button_press_event (GtkWidget *widget,
g_signal_connect (task->action_menu, "selection-done",
G_CALLBACK (gtk_widget_destroy), NULL);
-
+
return TRUE;
}
break;
@@ -3719,7 +3719,7 @@ wnck_task_create_widgets (WnckTask *task, GtkReliefStyle relief)
static const GtkTargetEntry targets[] = {
{ "application/x-wnck-window-id", 0, 0 }
};
-
+
if (!disable_sound_quark)
disable_sound_quark = g_quark_from_static_string ("gnome_disable_sound_events");
@@ -3735,7 +3735,7 @@ wnck_task_create_widgets (WnckTask *task, GtkReliefStyle relief)
disable_sound_quark, GINT_TO_POINTER (TRUE));
g_object_add_weak_pointer (G_OBJECT (task->button),
(void**) &task->button);
-
+
gtk_widget_set_name (task->button,
"tasklist-button");
@@ -3762,7 +3762,7 @@ wnck_task_create_widgets (WnckTask *task, GtkReliefStyle relief)
}
else
task->image = gtk_image_new ();
-
+
gtk_widget_show (task->image);
text = wnck_task_get_text (task, TRUE, TRUE);
@@ -3787,11 +3787,11 @@ wnck_task_create_widgets (WnckTask *task, GtkReliefStyle relief)
gtk_container_add (GTK_CONTAINER (task->button), hbox);
gtk_widget_show (hbox);
g_free (text);
-
+
text = wnck_task_get_text (task, FALSE, FALSE);
gtk_widget_set_tooltip_text (task->button, text);
g_free (text);
-
+
/* Set up signals */
if (GTK_IS_TOGGLE_BUTTON (task->button))
g_signal_connect_object (G_OBJECT (task->button), "toggled",
@@ -3803,7 +3803,7 @@ wnck_task_create_widgets (WnckTask *task, GtkReliefStyle relief)
G_CALLBACK (wnck_task_size_allocated),
G_OBJECT (task),
0);
-
+
g_signal_connect_object (G_OBJECT (task->button), "button_press_event",
G_CALLBACK (wnck_task_button_press_event),
G_OBJECT (task),
@@ -3812,19 +3812,19 @@ wnck_task_create_widgets (WnckTask *task, GtkReliefStyle relief)
g_signal_connect_object (G_OBJECT(task->button), "drag_motion",
G_CALLBACK (wnck_task_drag_motion),
G_OBJECT (task),
- 0);
+ 0);
- if (task->type == WNCK_TASK_WINDOW)
+ if (task->type == WNCK_TASK_WINDOW)
{
g_signal_connect_object (G_OBJECT (task->button), "drag_data_get",
G_CALLBACK (wnck_task_drag_data_get),
G_OBJECT (task),
- 0);
+ 0);
g_signal_connect_object (G_OBJECT (task->button), "drag_data_received",
G_CALLBACK (wnck_task_drag_data_received),
G_OBJECT (task),
- 0);
+ 0);
}
@@ -3837,19 +3837,19 @@ wnck_task_create_widgets (WnckTask *task, GtkReliefStyle relief)
g_signal_connect_object (G_OBJECT(task->button), "drag_data_get",
G_CALLBACK (wnck_task_drag_data_get),
G_OBJECT (task),
- 0);
+ 0);
g_signal_connect_object (G_OBJECT(task->button), "drag_begin",
G_CALLBACK (wnck_task_drag_begin),
G_OBJECT (task),
- 0);
+ 0);
g_signal_connect_object (G_OBJECT(task->button), "drag_end",
G_CALLBACK (wnck_task_drag_end),
G_OBJECT (task),
- 0);
+ 0);
}
-
+
switch (task->type)
{
case WNCK_TASK_CLASS_GROUP:
@@ -3896,7 +3896,7 @@ wnck_task_draw (GtkWidget *widget,
gboolean overlay_rect;
task = WNCK_TASK (data);
-
+
switch (task->type)
{
case WNCK_TASK_CLASS_GROUP:
@@ -3926,7 +3926,7 @@ wnck_task_draw (GtkWidget *widget,
width = gtk_widget_get_allocated_width (task->button);
height = gtk_widget_get_allocated_height (task->button);
-
+
tasklist = WNCK_TASKLIST (task->tasklist);
tasklist_widget = GTK_WIDGET (task->tasklist);
@@ -3956,7 +3956,7 @@ wnck_task_draw (GtkWidget *widget,
/* Now attach it to the window */
attached_style = gtk_style_attach (style, gtk_widget_get_window (task->button));
g_object_ref (attached_style);
-
+
/* draw the button with our modified style instead of the real one. */
gtk_paint_box (attached_style, cr, state,
GTK_SHADOW_OUT, task->button, "button",
@@ -3966,9 +3966,9 @@ wnck_task_draw (GtkWidget *widget,
gtk_style_detach (attached_style);
g_object_unref (attached_style);
}
-
+
/* then the contents */
-
+
cairo_save (cr);
gtk_widget_get_allocation (task->button, &allocation);
child = gtk_bin_get_child (GTK_BIN (task->button));
@@ -4058,7 +4058,7 @@ wnck_task_compare (gconstpointer a,
pos2 = G_MAXINT;
break;
}
-
+
if (pos1 < pos2)
return -1;
else if (pos1 > pos2)
@@ -4075,7 +4075,7 @@ remove_startup_sequences_for_window (WnckTasklist *tasklist,
#ifdef HAVE_STARTUP_NOTIFICATION
const char *win_id;
GList *tmp;
-
+
win_id = _wnck_window_get_startup_id (window);
if (win_id == NULL)
return;
@@ -4086,14 +4086,14 @@ remove_startup_sequences_for_window (WnckTasklist *tasklist,
WnckTask *task = tmp->data;
GList *next = tmp->next;
const char *task_id;
-
+
g_assert (task->type == WNCK_TASK_STARTUP_SEQUENCE);
task_id = sn_startup_sequence_get_id (task->startup_sequence);
if (task_id && strcmp (task_id, win_id) == 0)
gtk_widget_destroy (task->button);
-
+
tmp = next;
}
#else
@@ -4113,11 +4113,11 @@ wnck_task_new_from_window (WnckTasklist *tasklist,
task->window = g_object_ref (window);
task->class_group = g_object_ref (wnck_window_get_class_group (window));
task->tasklist = tasklist;
-
+
wnck_task_create_widgets (task, tasklist->priv->relief);
remove_startup_sequences_for_window (tasklist, window);
-
+
return task;
}
@@ -4154,7 +4154,7 @@ wnck_task_new_from_startup_sequence (WnckTasklist *tasklist,
task->startup_sequence = sequence;
sn_startup_sequence_ref (task->startup_sequence);
task->tasklist = tasklist;
-
+
wnck_task_create_widgets (task, tasklist->priv->relief);
return task;
@@ -4186,7 +4186,7 @@ sequence_timeout_callback (void *user_data)
sn_startup_sequence_get_last_active_time (task->startup_sequence,
&tv_sec, &tv_usec);
-
+
elapsed =
((((double)now.tv_sec - tv_sec) * G_USEC_PER_SEC +
(now.tv_usec - tv_usec))) / 1000.0;
@@ -4195,16 +4195,16 @@ sequence_timeout_callback (void *user_data)
{
g_assert (task->button != NULL);
/* removes task from list as a side effect */
- gtk_widget_destroy (task->button);
+ gtk_widget_destroy (task->button);
goto restart; /* don't iterate over changed list, just restart;
* not efficient but who cares here.
*/
}
-
+
tmp = tmp->next;
}
-
+
if (tasklist->priv->startup_sequences == NULL)
{
tasklist->priv->startup_sequence_timeout = 0;
@@ -4227,13 +4227,13 @@ wnck_tasklist_sn_event (SnMonitorEvent *event,
case SN_MONITOR_EVENT_INITIATED:
{
WnckTask *task;
-
+
task = wnck_task_new_from_startup_sequence (tasklist,
sn_monitor_event_get_startup_sequence (event));
-
+
gtk_widget_set_parent (task->button, GTK_WIDGET (tasklist));
gtk_widget_show (task->button);
-
+
tasklist->priv->startup_sequences =
g_list_prepend (tasklist->priv->startup_sequences,
task);
@@ -4244,7 +4244,7 @@ wnck_tasklist_sn_event (SnMonitorEvent *event,
g_timeout_add_seconds (1, sequence_timeout_callback,
tasklist);
}
-
+
gtk_widget_queue_resize (GTK_WIDGET (tasklist));
}
break;
@@ -4262,10 +4262,10 @@ wnck_tasklist_sn_event (SnMonitorEvent *event,
{
g_assert (task->button != NULL);
/* removes task from list as a side effect */
- gtk_widget_destroy (task->button);
+ gtk_widget_destroy (task->button);
break;
}
-
+
tmp = tmp->next;
}
}
@@ -4293,16 +4293,16 @@ wnck_tasklist_check_end_sequence (WnckTasklist *tasklist,
const char *res_class;
const char *res_name;
GList *tmp;
-
+
if (tasklist->priv->startup_sequences == NULL)
return;
-
+
res_class = _wnck_window_get_resource_class (window);
res_name = _wnck_window_get_resource_name (window);
if (res_class == NULL && res_name == NULL)
return;
-
+
tmp = tasklist->priv->startup_sequences;
while (tmp != NULL)
{
@@ -4310,7 +4310,7 @@ wnck_tasklist_check_end_sequence (WnckTasklist *tasklist,
const char *wmclass;
wmclass = sn_startup_sequence_get_wmclass (task->startup_sequence);
-
+
if (wmclass != NULL &&
((res_class && strcmp (res_class, wmclass) == 0) ||
(res_name && strcmp (res_name, wmclass) == 0)))
@@ -4319,12 +4319,12 @@ wnck_tasklist_check_end_sequence (WnckTasklist *tasklist,
g_assert (task->button != NULL);
/* removes task from list as a side effect */
- gtk_widget_destroy (task->button);
+ gtk_widget_destroy (task->button);
/* only match one */
return;
}
-
+
tmp = tmp->next;
}
}
diff --git a/libwnck/test-pager.c b/libwnck/test-pager.c
index 564c5c0..0d11422 100644
--- a/libwnck/test-pager.c
+++ b/libwnck/test-pager.c
@@ -27,19 +27,19 @@ create_pager_window (WnckScreen *screen,
{
GtkWidget *win;
GtkWidget *pager;
-
+
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_stick (GTK_WINDOW (win));
#if 0
wnck_gtk_window_set_dock_type (GTK_WINDOW (win));
#endif
-
+
gtk_window_set_title (GTK_WINDOW (win), "Pager");
/* very very random */
gtk_window_move (GTK_WINDOW (win), 0, 0);
-
+
/* quit on window close */
g_signal_connect (G_OBJECT (win), "destroy",
G_CALLBACK (gtk_main_quit),
@@ -52,9 +52,9 @@ create_pager_window (WnckScreen *screen,
wnck_pager_set_orientation (WNCK_PAGER (pager), orientation);
wnck_pager_set_n_rows (WNCK_PAGER (pager), n_rows);
wnck_pager_set_shadow_type (WNCK_PAGER (pager), GTK_SHADOW_IN);
-
+
gtk_container_add (GTK_CONTAINER (win), pager);
-
+
gtk_widget_show_all (win);
}
@@ -65,7 +65,7 @@ main (int argc, char **argv)
GtkOrientation orientation;
WnckPagerDisplayMode mode;
WnckScreen *screen;
-
+
ctxt = g_option_context_new ("");
g_option_context_add_main_entries (ctxt, entries, NULL);
g_option_context_add_group (ctxt, gtk_get_option_group (TRUE));
@@ -82,7 +82,7 @@ main (int argc, char **argv)
/* because the pager doesn't respond to signals at the moment */
wnck_screen_force_update (screen);
-
+
if (vertical)
orientation = GTK_ORIENTATION_VERTICAL;
else
@@ -94,8 +94,8 @@ main (int argc, char **argv)
mode = WNCK_PAGER_DISPLAY_CONTENT;
create_pager_window (screen, orientation, !only_current, mode, n_rows);
-
+
gtk_main ();
-
+
return 0;
}
diff --git a/libwnck/test-selector.c b/libwnck/test-selector.c
index 1ed52f6..fb27ea3 100644
--- a/libwnck/test-selector.c
+++ b/libwnck/test-selector.c
@@ -31,10 +31,10 @@ main (int argc, char **argv)
gtk_init (&argc, &argv);
screen = wnck_screen_get_default ();
-
+
/* because the pager doesn't respond to signals at the moment */
wnck_screen_force_update (screen);
-
+
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (win), 200, 32);
gtk_window_stick (GTK_WINDOW (win));
@@ -54,22 +54,22 @@ main (int argc, char **argv)
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (win), frame);
- gtk_container_add (GTK_CONTAINER (frame), selector);
+ gtk_container_add (GTK_CONTAINER (frame), selector);
gtk_widget_show (selector);
gtk_widget_show (frame);
gtk_window_move (GTK_WINDOW (win), 0, 0);
-
+
if (skip_tasklist)
{
- gtk_window_set_skip_taskbar_hint (GTK_WINDOW (win), TRUE);
- gtk_window_set_keep_above (GTK_WINDOW (win), TRUE);
+ gtk_window_set_skip_taskbar_hint (GTK_WINDOW (win), TRUE);
+ gtk_window_set_keep_above (GTK_WINDOW (win), TRUE);
}
gtk_widget_show (win);
-
+
gtk_main ();
-
+
return 0;
}
diff --git a/libwnck/test-tasklist.c b/libwnck/test-tasklist.c
index e205563..19f38f7 100644
--- a/libwnck/test-tasklist.c
+++ b/libwnck/test-tasklist.c
@@ -22,8 +22,8 @@ static GOptionEntry entries[] = {
static gboolean
window_draw (GtkWidget *widget,
- cairo_t *cr,
- gpointer user_data)
+ cairo_t *cr,
+ gpointer user_data)
{
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_rgba (cr, 1., 1., 1., .5);
@@ -51,7 +51,7 @@ main (int argc, char **argv)
GtkWidget *win;
GtkWidget *frame;
GtkWidget *tasklist;
-
+
ctxt = g_option_context_new ("");
g_option_context_add_main_entries (ctxt, entries, NULL);
g_option_context_add_group (ctxt, gtk_get_option_group (TRUE));
@@ -65,10 +65,10 @@ main (int argc, char **argv)
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
screen = wnck_screen_get_default ();
-
+
/* because the pager doesn't respond to signals at the moment */
wnck_screen_force_update (screen);
-
+
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (win), 200, 100);
gtk_window_stick (GTK_WINDOW (win));
@@ -127,22 +127,22 @@ main (int argc, char **argv)
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (win), frame);
- gtk_container_add (GTK_CONTAINER (frame), tasklist);
+ gtk_container_add (GTK_CONTAINER (frame), tasklist);
gtk_widget_show (tasklist);
gtk_widget_show (frame);
gtk_window_move (GTK_WINDOW (win), 0, 0);
-
+
if (skip_tasklist)
{
- gtk_window_set_skip_taskbar_hint (GTK_WINDOW (win), TRUE);
- gtk_window_set_keep_above (GTK_WINDOW (win), TRUE);
+ gtk_window_set_skip_taskbar_hint (GTK_WINDOW (win), TRUE);
+ gtk_window_set_keep_above (GTK_WINDOW (win), TRUE);
}
gtk_widget_show (win);
-
+
gtk_main ();
-
+
return 0;
}
diff --git a/libwnck/util.c b/libwnck/util.c
index 6ca51b5..b32793e 100644
--- a/libwnck/util.c
+++ b/libwnck/util.c
@@ -101,16 +101,16 @@ _wnck_print_resource_usage (WnckResourceUsage *usage)
"\tunknowns : %d\n"
"\tpixmap bytes : %ld\n"
"\ttotal bytes : ~%ld\n",
- usage->n_windows,
- usage->n_gcs,
+ usage->n_windows,
+ usage->n_gcs,
usage->n_fonts,
- usage->n_pixmaps,
+ usage->n_pixmaps,
usage->n_pictures,
usage->n_glyphsets,
usage->n_colormap_entries,
usage->n_passive_grabs,
usage->n_cursors,
- usage->n_other,
+ usage->n_other,
usage->pixmap_bytes,
usage->total_bytes_estimate);
}
@@ -138,7 +138,7 @@ wnck_init_resource_usage (GdkDisplay *gdisplay)
#else
status = WNCK_EXT_MISSING;
#endif
-
+
g_object_set_data (G_OBJECT (gdisplay),
"wnck-xres-status",
GINT_TO_POINTER (status));
@@ -192,11 +192,11 @@ wnck_xid_read_resource_usage (GdkDisplay *gdisplay,
Atom colormap_entry_atom;
Atom passive_grab_atom;
Atom cursor_atom;
-
+
types = NULL;
n_types = 0;
pixmap_bytes = 0;
-
+
_wnck_error_trap_push ();
xdisplay = GDK_DISPLAY_XDISPLAY (gdisplay);
@@ -207,8 +207,8 @@ wnck_xid_read_resource_usage (GdkDisplay *gdisplay,
XResQueryClientPixmapBytes (xdisplay,
xid, &pixmap_bytes);
- _wnck_error_trap_pop ();
-
+ _wnck_error_trap_pop ();
+
usage->pixmap_bytes = pixmap_bytes;
pixmap_atom = _wnck_atom_get ("PIXMAP");
@@ -220,12 +220,12 @@ wnck_xid_read_resource_usage (GdkDisplay *gdisplay,
colormap_entry_atom = _wnck_atom_get ("COLORMAP ENTRY");
passive_grab_atom = _wnck_atom_get ("PASSIVE GRAB");
cursor_atom = _wnck_atom_get ("CURSOR");
-
+
i = 0;
while (i < n_types)
{
int t = types[i].resource_type;
-
+
if (t == pixmap_atom)
usage->n_pixmaps += types[i].count;
else if (t == window_atom)
@@ -246,7 +246,7 @@ wnck_xid_read_resource_usage (GdkDisplay *gdisplay,
usage->n_cursors += types[i].count;
else
usage->n_other += types[i].count;
-
+
++i;
}
@@ -337,12 +337,12 @@ wnck_find_pid_for_resource_r (Display *xdisplay,
_wnck_error_trap_push ();
qtres = XQueryTree (xdisplay, win_top, &dummy, &dummy,
&children, &n_children);
- err = _wnck_error_trap_pop ();
+ err = _wnck_error_trap_pop ();
if (!qtres || err != Success)
return;
- for (i = 0; i < n_children; i++)
+ for (i = 0; i < n_children; i++)
{
wnck_find_pid_for_resource_r (xdisplay, children[i],
match_xid, mask, xid, pid);
@@ -466,7 +466,7 @@ wnck_pid_read_resource_usage_start_build_cache (GdkDisplay *gdisplay)
xdisplay = GDK_DISPLAY_XDISPLAY (gdisplay);
_wnck_error_trap_push ();
- XResQueryClients (xdisplay, &xres_state.n_clients, &xres_state.clients);
+ XResQueryClients (xdisplay, &xres_state.n_clients, &xres_state.clients);
err = _wnck_error_trap_pop ();
if (err != Success)
@@ -562,7 +562,7 @@ wnck_pid_read_resource_usage_no_cache (GdkDisplay *gdisplay,
WnckScreen *screen;
GList *windows;
GList *tmp;
-
+
screen = wnck_screen_get (i);
g_assert (screen != NULL);
@@ -583,7 +583,7 @@ wnck_pid_read_resource_usage_no_cache (GdkDisplay *gdisplay,
tmp = tmp->next;
}
-
+
++i;
}
}
@@ -778,7 +778,7 @@ _wnck_stock_icons_init (void)
return;
done = TRUE;
-
+
factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (factory);
@@ -794,7 +794,7 @@ _wnck_stock_icons_init (void)
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
gtk_icon_factory_add (factory, items[i].stock_id, icon_set);
gtk_icon_set_unref (icon_set);
-
+
g_object_unref (G_OBJECT (pixbuf));
}
diff --git a/libwnck/window-action-menu.c b/libwnck/window-action-menu.c
index e687cff..38fdcba 100644
--- a/libwnck/window-action-menu.c
+++ b/libwnck/window-action-menu.c
@@ -830,7 +830,7 @@ refill_submenu_workspace (WnckActionMenu *menu)
{
char *name;
GtkWidget *item;
-
+
name = get_workspace_name_with_accel (menu->priv->window, i);
item = make_menu_item (MOVE_TO_WORKSPACE);
diff --git a/libwnck/window.c b/libwnck/window.c
index 58fd0a2..97dda53 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -88,12 +88,12 @@ struct _WnckWindowPrivate
gint sort_order;
WnckWindowType wintype;
-
+
GdkPixbuf *icon;
GdkPixbuf *mini_icon;
WnckIconCache *icon_cache;
-
+
WnckWindowActions actions;
int x;
@@ -110,12 +110,12 @@ struct _WnckWindowPrivate
char *res_class;
char *res_name;
-
+
/* true if transient_for points to root window,
* not another app window
*/
guint transient_for_root : 1;
-
+
/* window state */
guint is_minimized : 1;
guint is_maximized_horz : 1;
@@ -137,9 +137,9 @@ struct _WnckWindowPrivate
* externally-visible state (it determines the WM_STATE
* interpretation)
*/
- guint net_wm_state_hidden : 1;
+ guint net_wm_state_hidden : 1;
guint wm_state_iconic : 1;
-
+
/* idle handler for updates */
guint update_handler;
@@ -324,7 +324,7 @@ wnck_window_class_init (WnckWindowClass *klass)
* WnckWindow::state-changed:
* @window: the #WnckWindow which emitted the signal.
* @changed_mask: the bitmask containing bits set for all states of @window
- * that have changed.
+ * that have changed.
* @new_state: the new state of @window.
*
* Emitted when the state of @window changes. This can happen when @window is
@@ -377,7 +377,7 @@ wnck_window_class_init (WnckWindowClass *klass)
* WnckWindow::actions-changed:
* @window: the #WnckWindow which emitted the signal.
* @changed_mask: the bitmask containing bits set for all actions
- * availabilities for @window that have changed.
+ * availabilities for @window that have changed.
* @new_state: the new actions availabilities for @window.
*
* Emitted when the actions availabilities for @window change.
@@ -406,7 +406,7 @@ wnck_window_class_init (WnckWindowClass *klass)
G_STRUCT_OFFSET (WnckWindowClass, geometry_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ G_TYPE_NONE, 0);
}
static void
@@ -442,7 +442,7 @@ wnck_window_finalize (GObject *object)
if (window->priv->mini_icon)
g_object_unref (G_OBJECT (window->priv->mini_icon));
window->priv->mini_icon = NULL;
-
+
_wnck_icon_cache_free (window->priv->icon_cache);
window->priv->icon_cache = NULL;
@@ -544,7 +544,7 @@ _wnck_window_create (Window xwindow,
&window->priv->height);
window->priv->sort_order = sort_order;
-
+
window->priv->need_update_name = TRUE;
window->priv->need_update_state = TRUE;
window->priv->need_update_icon_name = TRUE;
@@ -698,12 +698,12 @@ _wnck_window_get_name_for_display (WnckWindow *window,
const char *name;
g_return_val_if_fail (WNCK_IS_WINDOW (window), NULL);
-
+
if (use_icon_name && wnck_window_has_icon_name (window))
name = wnck_window_get_icon_name (window);
- else
+ else
name = wnck_window_get_name (window);
-
+
if (use_state_decorations)
{
if (window->priv->is_shaded)
@@ -913,11 +913,11 @@ wnck_window_get_sort_order (WnckWindow *window)
*
* Since: 2.20
**/
-void wnck_window_set_sort_order (WnckWindow *window,
+void wnck_window_set_sort_order (WnckWindow *window,
gint order)
-{
+{
g_return_if_fail (WNCK_IS_WINDOW (window));
-
+
window->priv->sort_order = order;
return;
}
@@ -925,9 +925,9 @@ void wnck_window_set_sort_order (WnckWindow *window,
/**
* wnck_window_get_window_type:
* @window: a #WnckWindow.
- *
+ *
* Gets the semantic type of @window.
- *
+ *
* Return value: the semantic type of @window.
**/
WnckWindowType
@@ -935,7 +935,7 @@ wnck_window_get_window_type (WnckWindow *window)
{
/* FIXME: should we have an invalid window type for this? */
g_return_val_if_fail (WNCK_IS_WINDOW (window), 0);
-
+
return window->priv->wintype;
}
@@ -943,7 +943,7 @@ wnck_window_get_window_type (WnckWindow *window)
* wnck_window_set_window_type:
* @window: a #WnckWindow.
* @wintype: a semantic type.
- *
+ *
* Sets the semantic type of @window to @wintype.
*
* Since: 2.12
@@ -986,7 +986,7 @@ wnck_window_set_window_type (WnckWindow *window, WnckWindowType wintype)
_wnck_error_trap_push ();
XChangeProperty (_wnck_window_get_display (window),
- window->priv->xwindow,
+ window->priv->xwindow,
_wnck_atom_get ("_NET_WM_WINDOW_TYPE"),
XA_ATOM, 32, PropModeReplace,
(guchar *)&atom, 1);
@@ -1047,7 +1047,7 @@ transient_needs_attention (WnckWindow *window)
{
GList *windows;
WnckWindow *transient;
-
+
if (!WNCK_IS_WINDOW (window))
return NULL;
@@ -1101,7 +1101,7 @@ _wnck_window_or_transient_get_needs_attention_time (WnckWindow *window)
gboolean
wnck_window_or_transient_needs_attention (WnckWindow *window)
{
- return wnck_window_needs_attention (window) ||
+ return wnck_window_needs_attention (window) ||
transient_needs_attention (window) != NULL;
}
@@ -1143,16 +1143,16 @@ const char*
_wnck_window_get_startup_id (WnckWindow *window)
{
g_return_val_if_fail (WNCK_IS_WINDOW (window), NULL);
-
+
if (window->priv->startup_id == NULL &&
window->priv->group_leader != None)
{
WnckApplication *app;
/* Fall back to group leader property */
-
+
app = wnck_application_get (window->priv->group_leader);
-
+
if (app != NULL)
return wnck_application_get_startup_id (app);
else
@@ -1407,7 +1407,7 @@ wnck_window_is_sticky (WnckWindow *window)
*
* This function existed before 2.6, but the @timestamp argument was missing
* in earlier versions.
- *
+ *
* Since: 2.6
**/
void
@@ -1864,7 +1864,7 @@ wnck_window_unpin (WnckWindow *window)
*
* This function existed before 2.10, but the @timestamp argument was missing
* in earlier versions.
- *
+ *
* Since: 2.10
**/
void
@@ -1936,13 +1936,13 @@ static WnckWindow*
find_last_transient_for (GList *windows,
Window xwindow)
{
- GList *tmp;
+ GList *tmp;
WnckWindow *retval;
/* find _last_ transient for xwindow in the list */
-
+
retval = NULL;
-
+
tmp = windows;
while (tmp != NULL)
{
@@ -1951,7 +1951,7 @@ find_last_transient_for (GList *windows,
if (w->priv->transient_for == xwindow &&
w->priv->wintype != WNCK_WINDOW_UTILITY)
retval = w;
-
+
tmp = tmp->next;
}
@@ -1966,14 +1966,14 @@ find_last_transient_for (GList *windows,
*
* If @window has transients, activates the most likely transient
* instead of the window itself. Otherwise activates @window.
- *
+ *
* FIXME the ideal behavior of this function is probably to activate
* the most recently active window among @window and its transients.
* This is probably best implemented on the window manager side.
- *
+ *
* This function existed before 2.10, but the @timestamp argument was missing
* in earlier versions.
- *
+ *
* Since: 2.10
**/
void
@@ -1983,14 +1983,14 @@ wnck_window_activate_transient (WnckWindow *window,
GList *windows;
WnckWindow *transient;
WnckWindow *next;
-
+
g_return_if_fail (WNCK_IS_WINDOW (window));
windows = wnck_screen_get_windows_stacked (window->priv->screen);
transient = NULL;
next = find_last_transient_for (windows, window->priv->xwindow);
-
+
while (next != NULL)
{
if (next == window)
@@ -2001,7 +2001,7 @@ wnck_window_activate_transient (WnckWindow *window,
}
transient = next;
-
+
next = find_last_transient_for (windows, transient->priv->xwindow);
}
@@ -2025,7 +2025,7 @@ wnck_window_activate_transient (WnckWindow *window,
* minimize @window and its transients. (Not doing this can be
* especially annoying in the case of modal dialogs that don't appear
* in the #WnckTaslist).
- *
+ *
* Return value: %TRUE if one of the transients of @window is the most recently
* activated window, %FALSE otherwise.
*
@@ -2036,7 +2036,7 @@ wnck_window_transient_is_most_recently_activated (WnckWindow *window)
{
GList *windows;
WnckWindow *transient;
-
+
g_return_val_if_fail (WNCK_IS_WINDOW (window), FALSE);
windows = wnck_screen_get_windows_stacked (window->priv->screen);
@@ -2063,7 +2063,7 @@ get_icons (WnckWindow *window)
icon = NULL;
mini_icon = NULL;
-
+
if (_wnck_read_icons (window->priv->xwindow,
window->priv->icon_cache,
&icon,
@@ -2091,11 +2091,11 @@ get_icons (WnckWindow *window)
/**
* wnck_window_get_icon:
* @window: a #WnckWindow.
- *
+ *
* Gets the icon to be used for @window. If no icon was found, a fallback
* icon is used. wnck_window_get_icon_is_fallback() can be used to tell if the
- * icon is the fallback icon.
- *
+ * icon is the fallback icon.
+ *
* Return value: the icon for @window. The caller should reference the
* returned <classname>GdkPixbuf</classname> if it needs to keep the icon
* around.
@@ -2117,11 +2117,11 @@ wnck_window_get_icon (WnckWindow *window)
/**
* wnck_window_get_mini_icon:
* @window: a #WnckWindow.
- *
+ *
* Gets the mini-icon to be used for @window. If no mini-icon was found, a
* fallback mini-icon is used. wnck_window_get_icon_is_fallback() can be used
- * to tell if the mini-icon is the fallback mini-icon.
- *
+ * to tell if the mini-icon is the fallback mini-icon.
+ *
* Return value: the mini-icon for @window. The caller should reference the
* returned <classname>GdkPixbuf</classname> if it needs to keep the icon
* around.
@@ -2130,13 +2130,13 @@ GdkPixbuf*
wnck_window_get_mini_icon (WnckWindow *window)
{
g_return_val_if_fail (WNCK_IS_WINDOW (window), NULL);
-
+
get_icons (window);
if (window->priv->need_emit_icon_changed)
queue_update (window); /* not done in get_icons since we call that from
* the update
*/
-
+
return window->priv->mini_icon;
}
@@ -2146,7 +2146,7 @@ wnck_window_get_mini_icon (WnckWindow *window)
*
* Gets whether a default fallback icon is used for @window (because none
* was set on @window).
- *
+ *
* Return value: %TRUE if the icon for @window is a fallback, %FALSE otherwise.
**/
gboolean
@@ -2160,9 +2160,9 @@ wnck_window_get_icon_is_fallback (WnckWindow *window)
/**
* wnck_window_get_actions:
* @window: a #WnckWindow.
- *
+ *
* Gets the actions that can be done for @window.
- *
+ *
* Return value: bitmask of actions that can be done for @window.
**/
WnckWindowActions
@@ -2177,9 +2177,9 @@ wnck_window_get_actions (WnckWindow *window)
/**
* wnck_window_get_state:
* @window: a #WnckWindow.
- *
+ *
* Gets the state of @window.
- *
+ *
* Return value: bitmask of active states for @window.
**/
WnckWindowState
@@ -2305,7 +2305,7 @@ wnck_window_set_geometry (WnckWindow *window,
gravity_and_flags = gravity;
gravity_and_flags |= geometry_mask << 8;
gravity_and_flags |= source << 12;
-
+
x += window->priv->left_frame;
y += window->priv->top_frame;
width -= window->priv->left_frame + window->priv->right_frame;
@@ -2320,10 +2320,10 @@ wnck_window_set_geometry (WnckWindow *window,
* wnck_window_is_visible_on_workspace:
* @window: a #WnckWindow.
* @workspace: a #WnckWorkspace.
- *
+ *
* Like wnck_window_is_on_workspace(), but also checks that
* the window is in a visible state (i.e. not minimized or shaded).
- *
+ *
* Return value: %TRUE if @window appears on @workspace in normal state, %FALSE
* otherwise.
**/
@@ -2335,7 +2335,7 @@ wnck_window_is_visible_on_workspace (WnckWindow *window,
g_return_val_if_fail (WNCK_IS_WINDOW (window), FALSE);
g_return_val_if_fail (WNCK_IS_WORKSPACE (workspace), FALSE);
-
+
state = wnck_window_get_state (window);
if (state & WNCK_WINDOW_STATE_HIDDEN)
@@ -2383,7 +2383,7 @@ wnck_window_set_icon_geometry (WnckWindow *window,
* wnck_window_is_on_workspace:
* @window: a #WnckWindow.
* @workspace: a #WnckWorkspace.
- *
+ *
* Gets whether @window appears on @workspace.
*
* Return value: %TRUE if @window appears on @workspace, %FALSE otherwise.
@@ -2394,7 +2394,7 @@ wnck_window_is_on_workspace (WnckWindow *window,
{
g_return_val_if_fail (WNCK_IS_WINDOW (window), FALSE);
g_return_val_if_fail (WNCK_IS_WORKSPACE (workspace), FALSE);
-
+
return wnck_window_is_pinned (window) ||
wnck_window_get_workspace (window) == workspace;
}
@@ -2403,9 +2403,9 @@ wnck_window_is_on_workspace (WnckWindow *window,
* wnck_window_is_in_viewport:
* @window: a #WnckWindow.
* @workspace: a #WnckWorkspace.
- *
+ *
* Gets %TRUE if @window appears in the current viewport of @workspace.
- *
+ *
* Return value: %TRUE if @window appears in current viewport of @workspace,
* %FALSE otherwise.
*
@@ -2417,7 +2417,7 @@ wnck_window_is_in_viewport (WnckWindow *window,
{
GdkRectangle window_rect;
GdkRectangle viewport_rect;
-
+
g_return_val_if_fail (WNCK_IS_WINDOW (window), FALSE);
g_return_val_if_fail (WNCK_IS_WORKSPACE (workspace), FALSE);
@@ -2622,7 +2622,7 @@ update_state (WnckWindow *window)
* state update just means the _NET_WM_STATE prop
* changed
*/
-
+
if (reread_net_wm_state)
{
gboolean demanded_attention;
@@ -2640,7 +2640,7 @@ update_state (WnckWindow *window)
window->priv->net_wm_state_hidden = FALSE;
window->priv->is_fullscreen = FALSE;
window->priv->demands_attention = FALSE;
-
+
atoms = NULL;
n_atoms = 0;
_wnck_get_atom_list (window->priv->xwindow,
@@ -2706,7 +2706,7 @@ update_state (WnckWindow *window)
!window->priv->transient_for_root)
window->priv->skip_taskbar = TRUE;
break;
-
+
case WNCK_WINDOW_NORMAL:
break;
}
@@ -2723,13 +2723,13 @@ update_state (WnckWindow *window)
case WNCK_WINDOW_SPLASHSCREEN:
window->priv->skip_pager = TRUE;
break;
-
+
case WNCK_WINDOW_NORMAL:
case WNCK_WINDOW_DIALOG:
case WNCK_WINDOW_UTILITY:
break;
}
-
+
/* FIXME we need to recompute this if the window manager changes */
if (wnck_screen_net_wm_supports (window->priv->screen,
"_NET_WM_STATE_HIDDEN"))
@@ -2745,7 +2745,7 @@ update_state (WnckWindow *window)
else
{
window->priv->is_minimized = window->priv->wm_state_iconic;
-
+
window->priv->is_hidden = window->priv->is_minimized || window->priv->is_shaded;
}
}
@@ -2833,7 +2833,7 @@ update_actions (WnckWindow *window)
&atoms,
&n_atoms))
{
- window->priv->actions =
+ window->priv->actions =
WNCK_WINDOW_ACTION_MOVE |
WNCK_WINDOW_ACTION_RESIZE |
WNCK_WINDOW_ACTION_SHADE |
@@ -2925,7 +2925,7 @@ update_wintype (WnckWindow *window)
int n_atoms;
WnckWindowType type;
gboolean found_type;
-
+
if (!window->priv->need_update_wintype)
return;
@@ -2933,7 +2933,7 @@ update_wintype (WnckWindow *window)
found_type = FALSE;
type = WNCK_WINDOW_NORMAL;
-
+
atoms = NULL;
n_atoms = 0;
if (_wnck_get_atom_list (window->priv->xwindow,
@@ -2942,7 +2942,7 @@ update_wintype (WnckWindow *window)
&n_atoms))
{
int i;
-
+
i = 0;
while (i < n_atoms && !found_type)
{
@@ -2968,7 +2968,7 @@ update_wintype (WnckWindow *window)
type = WNCK_WINDOW_SPLASHSCREEN;
else
found_type = FALSE;
-
+
++i;
}
@@ -3000,7 +3000,7 @@ update_transient_for (WnckWindow *window)
return;
window->priv->need_update_transient_for = FALSE;
-
+
parent = None;
if (_wnck_get_window (window->priv->xwindow,
_wnck_atom_get ("WM_TRANSIENT_FOR"),
@@ -3030,7 +3030,7 @@ update_startup_id (WnckWindow *window)
window->priv->need_update_startup_id = FALSE;
g_free (window->priv->startup_id);
- window->priv->startup_id =
+ window->priv->startup_id =
_wnck_get_utf8_property (window->priv->xwindow,
_wnck_atom_get ("_NET_STARTUP_ID"));
}
@@ -3130,7 +3130,7 @@ force_update_now (WnckWindow *window)
WnckWindowState old_state;
WnckWindowState new_state;
WnckWindowActions old_actions;
-
+
unqueue_update (window);
/* Name must be done before all other stuff,
@@ -3162,7 +3162,7 @@ force_update_now (WnckWindow *window)
update_frame_extents (window); /* emits signals */
get_icons (window);
-
+
new_state = COMPRESS_STATE (window);
if (old_state != new_state)
@@ -3171,7 +3171,7 @@ force_update_now (WnckWindow *window)
if (old_actions != window->priv->actions)
emit_actions_changed (window, old_actions ^ window->priv->actions,
window->priv->actions);
-
+
if (window->priv->need_emit_icon_changed)
emit_icon_changed (window);
}
diff --git a/libwnck/wnckprop.c b/libwnck/wnckprop.c
index be69e34..e51b9dd 100644
--- a/libwnck/wnckprop.c
+++ b/libwnck/wnckprop.c
@@ -1,6 +1,6 @@
/* vim: set sw=2 et: */
/*
- * Copyright (C) 2007 Vincent Untz
+ * Copyright (C) 2007 Vincent Untz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -296,7 +296,7 @@ static GOptionEntry space_entries[] = {
static void clean_up (void);
/* this part is mostly stolen from xutils.c */
-typedef struct
+typedef struct
{
Window window;
Atom timestamp_prop_atom;
@@ -1725,7 +1725,7 @@ find_managed_window (Display *display,
return retval;
}
-static void
+static void
handle_button_press_event (XKeyEvent *event)
{
if (event->subwindow == None)
@@ -1818,7 +1818,7 @@ main (int argc, char **argv)
GOptionGroup *group;
GError *error;
WnckScreen *screen;
-
+
bindtextdomain (GETTEXT_PACKAGE, WNCK_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
@@ -1924,7 +1924,7 @@ main (int argc, char **argv)
if (!got_from_user)
return 0;
}
-
+
if (mode == SCREEN_READ_MODE)
print_screen (screen);
else if (mode == SCREEN_LIST_MODE)
@@ -2025,6 +2025,6 @@ main (int argc, char **argv)
g_printerr (_("Cannot interact with window with XID %lu: "
"the window cannot be found\n"), xid);
}
-
+
return 0;
}
diff --git a/libwnck/workspace-accessible.c b/libwnck/workspace-accessible.c
index 8addbff..a275f56 100644
--- a/libwnck/workspace-accessible.c
+++ b/libwnck/workspace-accessible.c
@@ -54,7 +54,7 @@ wnck_workspace_accessible_get_type (void)
if (!type)
{
- const GTypeInfo tinfo =
+ const GTypeInfo tinfo =
{
sizeof (WnckWorkspaceAccessibleClass),
(GBaseInitFunc) NULL, /* base init */
@@ -68,7 +68,7 @@ wnck_workspace_accessible_get_type (void)
NULL /* value table */
};
- const GInterfaceInfo atk_component_info =
+ const GInterfaceInfo atk_component_info =
{
(GInterfaceInitFunc) atk_component_interface_init,
(GInterfaceFinalizeFunc) NULL,
@@ -92,10 +92,10 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->contains = wnck_workspace_accessible_contains;
}
-static void
+static void
wnck_workspace_accessible_get_extents (AtkComponent *component,
- int *x,
- int *y,
+ int *x,
+ int *y,
int *width,
int *height,
AtkCoordType coords)
@@ -142,11 +142,11 @@ wnck_workspace_accessible_get_extents (AtkComponent *component,
atk_component_get_position (ATK_COMPONENT (parent), &px,&py, coords);
_wnck_pager_get_workspace_rect (pager, WNCK_WORKSPACE_ACCESSIBLE (component)->index, &rect);
-
+
*x = rect.x + px;
*y = rect.y + py;
*height = rect.height;
- *width = rect.width;
+ *width = rect.width;
}
static void
@@ -154,11 +154,11 @@ wnck_workspace_accessible_get_size (AtkComponent *component,
int *width,
int *height)
{
- AtkCoordType coords = ATK_XY_SCREEN;
+ AtkCoordType coords = ATK_XY_SCREEN;
int x, y;
/* FIXME: Value for initialization of coords picked randomly to please gcc */
-
+
wnck_workspace_accessible_get_extents (component, &x, &y, width, height, coords);
}
@@ -173,7 +173,7 @@ wnck_workspace_accessible_get_position (AtkComponent *component,
}
static gboolean
-wnck_workspace_accessible_contains (AtkComponent *component,
+wnck_workspace_accessible_contains (AtkComponent *component,
int x,
int y,
AtkCoordType coords)
@@ -217,7 +217,7 @@ wnck_workspace_accessible_new (GObject *obj)
WNCK_WORKSPACE_ACCESSIBLE (atk_object)->index =
wnck_workspace_get_number (WNCK_WORKSPACE (obj));
-
+
return atk_object;
}
diff --git a/libwnck/workspace.c b/libwnck/workspace.c
index 76828e6..4d329cd 100644
--- a/libwnck/workspace.c
+++ b/libwnck/workspace.c
@@ -140,42 +140,42 @@ wnck_workspace_finalize (GObject *object)
g_free (workspace->priv->name);
workspace->priv->name = NULL;
-
+
G_OBJECT_CLASS (wnck_workspace_parent_class)->finalize (object);
}
/**
* wnck_workspace_get_number:
* @space: a #WnckWorkspace.
- *
+ *
* Gets the index of @space on the #WnckScreen to which it belongs. The
* first workspace has an index of 0.
- *
+ *
* Return value: the index of @space on its #WnckScreen, or -1 on errors.
**/
int
wnck_workspace_get_number (WnckWorkspace *space)
{
g_return_val_if_fail (WNCK_IS_WORKSPACE (space), -1);
-
+
return space->priv->number;
}
/**
* wnck_workspace_get_name:
* @space: a #WnckWorkspace.
- *
+ *
* Gets the human-readable name that should be used to refer to @space. If
* the user has not set a special name, a fallback like "Workspace 3" will be
* used.
- *
+ *
* Return value: the name of @space.
**/
const char*
wnck_workspace_get_name (WnckWorkspace *space)
{
g_return_val_if_fail (WNCK_IS_WORKSPACE (space), NULL);
-
+
return space->priv->name;
}
@@ -185,7 +185,7 @@ wnck_workspace_get_name (WnckWorkspace *space)
* @name: new name for @space.
*
* Changes the name of @space.
- *
+ *
* Since: 2.2
**/
void
@@ -222,14 +222,14 @@ wnck_workspace_get_screen (WnckWorkspace *space)
* @space: a #WnckWorkspace.
* @timestamp: the X server timestamp of the user interaction event that caused
* this call to occur.
- *
+ *
* Asks the window manager to make @space the active workspace. The window
* manager may decide to refuse the request (to not steal the focus if there is
* a more recent user activity, for example).
*
* This function existed before 2.10, but the @timestamp argument was missing
* in earlier versions.
- *
+ *
* Since: 2.10
**/
void
@@ -247,14 +247,14 @@ WnckWorkspace*
_wnck_workspace_create (int number, WnckScreen *screen)
{
WnckWorkspace *space;
-
+
space = g_object_new (WNCK_TYPE_WORKSPACE, NULL);
space->priv->number = number;
space->priv->name = NULL;
space->priv->screen = screen;
_wnck_workspace_update_name (space, NULL);
-
+
/* Just set reasonable defaults */
space->priv->width = wnck_screen_get_width (screen);
space->priv->height = wnck_screen_get_height (screen);
@@ -271,7 +271,7 @@ _wnck_workspace_update_name (WnckWorkspace *space,
const char *name)
{
char *old;
-
+
g_return_if_fail (WNCK_IS_WORKSPACE (space));
old = space->priv->name;
@@ -313,7 +313,7 @@ _wnck_workspace_set_geometry (WnckWorkspace *space,
return TRUE; /* change was made */
}
else
- return FALSE;
+ return FALSE;
}
gboolean
@@ -427,11 +427,11 @@ wnck_workspace_is_virtual (WnckWorkspace *space)
/**
* wnck_workspace_get_layout_row:
* @space: a #WnckWorkspace.
- *
+ *
* Gets the row of @space in the #WnckWorkspace layout. The first row has an
* index of 0 and is always the top row, regardless of the starting corner set
* for the layout.
- *
+ *
* Return value: the row of @space in the #WnckWorkspace layout, or -1 on
* errors.
*
@@ -466,12 +466,12 @@ wnck_workspace_get_layout_row (WnckWorkspace *space)
/**
* wnck_workspace_get_layout_column:
* @space: a #WnckWorkspace.
- *
+ *
* Gets the column of @space in the #WnckWorkspace layout. The first column
* has an index of 0 and is always the left column, regardless of the starting
* corner set for the layout and regardless of the default direction of the
* environment (i.e., in both Left-To-Right and Right-To-Left environments).
- *
+ *
* Return value: the column of @space in the #WnckWorkspace layout, or -1 on
* errors.
*
@@ -507,7 +507,7 @@ wnck_workspace_get_layout_column (WnckWorkspace *space)
* wnck_workspace_get_neighbor:
* @space: a #WnckWorkspace.
* @direction: direction in which to search the neighbor.
- *
+ *
* Gets the neighbor #WnckWorkspace of @space in the @direction direction.
*
* Return value: the neighbor #WnckWorkspace of @space in the @direction
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 82547f6..681aca3 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -44,7 +44,7 @@ _wnck_get_cardinal (Window xwindow,
int err, result;
*val = 0;
-
+
_wnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_wnck_get_default_display(),
@@ -52,12 +52,12 @@ _wnck_get_cardinal (Window xwindow,
atom,
0, G_MAXLONG,
False, XA_CARDINAL, &type, &format, &nitems,
- &bytes_after, (void*)&num);
+ &bytes_after, (void*)&num);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return FALSE;
-
+
if (type != XA_CARDINAL)
{
XFree (num);
@@ -65,7 +65,7 @@ _wnck_get_cardinal (Window xwindow,
}
*val = *num;
-
+
XFree (num);
return TRUE;
@@ -85,7 +85,7 @@ _wnck_get_wm_state (Window xwindow)
wm_state = _wnck_atom_get ("WM_STATE");
retval = NormalState;
-
+
_wnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_wnck_get_default_display(),
@@ -98,7 +98,7 @@ _wnck_get_wm_state (Window xwindow)
if (err != Success ||
result != Success)
return retval;
-
+
if (type != wm_state)
{
XFree (num);
@@ -106,7 +106,7 @@ _wnck_get_wm_state (Window xwindow)
}
retval = *num;
-
+
XFree (num);
return retval;
@@ -125,7 +125,7 @@ _wnck_get_window (Window xwindow,
int err, result;
*val = 0;
-
+
_wnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_wnck_get_default_display(),
@@ -133,12 +133,12 @@ _wnck_get_window (Window xwindow,
atom,
0, G_MAXLONG,
False, XA_WINDOW, &type, &format, &nitems,
- &bytes_after, (void*)&w);
+ &bytes_after, (void*)&w);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return FALSE;
-
+
if (type != XA_WINDOW)
{
XFree (w);
@@ -146,7 +146,7 @@ _wnck_get_window (Window xwindow,
}
*val = *w;
-
+
XFree (w);
return TRUE;
@@ -165,7 +165,7 @@ _wnck_get_pixmap (Window xwindow,
int err, result;
*val = 0;
-
+
_wnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_wnck_get_default_display(),
@@ -173,12 +173,12 @@ _wnck_get_pixmap (Window xwindow,
atom,
0, G_MAXLONG,
False, XA_PIXMAP, &type, &format, &nitems,
- &bytes_after, (void*)&w);
+ &bytes_after, (void*)&w);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return FALSE;
-
+
if (type != XA_PIXMAP)
{
XFree (w);
@@ -186,7 +186,7 @@ _wnck_get_pixmap (Window xwindow,
}
*val = *w;
-
+
XFree (w);
return TRUE;
@@ -205,7 +205,7 @@ _wnck_get_atom (Window xwindow,
int err, result;
*val = 0;
-
+
_wnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_wnck_get_default_display(),
@@ -213,12 +213,12 @@ _wnck_get_atom (Window xwindow,
atom,
0, G_MAXLONG,
False, XA_ATOM, &type, &format, &nitems,
- &bytes_after, (void*)&a);
+ &bytes_after, (void*)&a);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return FALSE;
-
+
if (type != XA_ATOM)
{
XFree (a);
@@ -226,7 +226,7 @@ _wnck_get_atom (Window xwindow,
}
*val = *a;
-
+
XFree (a);
return TRUE;
@@ -238,10 +238,10 @@ text_property_to_utf8 (const XTextProperty *prop)
char **list;
int count;
char *retval;
-
+
list = NULL;
- count = gdk_text_property_to_utf8_list_for_display (gdk_display_get_default(),
+ count = gdk_text_property_to_utf8_list_for_display (gdk_display_get_default (),
gdk_x11_xatom_to_atom (prop->encoding),
prop->format,
prop->value,
@@ -267,7 +267,7 @@ _wnck_get_text_property (Window xwindow,
{
XTextProperty text;
char *retval;
-
+
_wnck_error_trap_push ();
text.nitems = 0;
@@ -285,7 +285,7 @@ _wnck_get_text_property (Window xwindow,
{
retval = NULL;
}
-
+
_wnck_error_trap_pop ();
return retval;
@@ -302,20 +302,20 @@ _wnck_get_string_property_latin1 (Window xwindow,
gchar *str;
int err, result;
char *retval;
-
+
_wnck_error_trap_push ();
str = NULL;
result = XGetWindowProperty (_wnck_get_default_display(),
xwindow, atom,
0, G_MAXLONG,
False, XA_STRING, &type, &format, &nitems,
- &bytes_after, (guchar **)&str);
+ &bytes_after, (guchar **)&str);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return NULL;
-
+
if (type != XA_STRING)
{
XFree (str);
@@ -323,9 +323,9 @@ _wnck_get_string_property_latin1 (Window xwindow,
}
retval = g_strdup (str);
-
+
XFree (str);
-
+
return retval;
}
@@ -343,7 +343,7 @@ _wnck_get_utf8_property (Window xwindow,
Atom utf8_string;
utf8_string = _wnck_atom_get ("UTF8_STRING");
-
+
_wnck_error_trap_push ();
type = None;
val = NULL;
@@ -353,13 +353,13 @@ _wnck_get_utf8_property (Window xwindow,
0, G_MAXLONG,
False, utf8_string,
&type, &format, &nitems,
- &bytes_after, (guchar **)&val);
+ &bytes_after, (guchar **)&val);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return NULL;
-
+
if (type != utf8_string ||
format != 8 ||
nitems == 0)
@@ -376,11 +376,11 @@ _wnck_get_utf8_property (Window xwindow,
XFree (val);
return NULL;
}
-
+
retval = g_strndup (val, nitems);
-
+
XFree (val);
-
+
return retval;
}
@@ -399,7 +399,7 @@ _wnck_get_window_list (Window xwindow,
*windows = NULL;
*len = 0;
-
+
_wnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_wnck_get_default_display(),
@@ -407,12 +407,12 @@ _wnck_get_window_list (Window xwindow,
atom,
0, G_MAXLONG,
False, XA_WINDOW, &type, &format, &nitems,
- &bytes_after, (void*)&data);
+ &bytes_after, (void*)&data);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return FALSE;
-
+
if (type != XA_WINDOW)
{
XFree (data);
@@ -422,10 +422,10 @@ _wnck_get_window_list (Window xwindow,
*windows = g_new (Window, nitems);
memcpy (*windows, data, sizeof (Window) * nitems);
*len = nitems;
-
+
XFree (data);
- return TRUE;
+ return TRUE;
}
gboolean
@@ -443,7 +443,7 @@ _wnck_get_atom_list (Window xwindow,
*atoms = NULL;
*len = 0;
-
+
_wnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_wnck_get_default_display(),
@@ -456,7 +456,7 @@ _wnck_get_atom_list (Window xwindow,
if (err != Success ||
result != Success)
return FALSE;
-
+
if (type != XA_ATOM)
{
XFree (data);
@@ -466,7 +466,7 @@ _wnck_get_atom_list (Window xwindow,
*atoms = g_new (Atom, nitems);
memcpy (*atoms, data, sizeof (Atom) * nitems);
*len = nitems;
-
+
XFree (data);
return TRUE;
@@ -487,7 +487,7 @@ _wnck_get_cardinal_list (Window xwindow,
*cardinals = NULL;
*len = 0;
-
+
_wnck_error_trap_push ();
type = None;
result = XGetWindowProperty (_wnck_get_default_display(),
@@ -495,12 +495,12 @@ _wnck_get_cardinal_list (Window xwindow,
atom,
0, G_MAXLONG,
False, XA_CARDINAL, &type, &format, &nitems,
- &bytes_after, (void*)&nums);
+ &bytes_after, (void*)&nums);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return FALSE;
-
+
if (type != XA_CARDINAL)
{
XFree (nums);
@@ -510,7 +510,7 @@ _wnck_get_cardinal_list (Window xwindow,
*cardinals = g_new (gulong, nitems);
memcpy (*cardinals, nums, sizeof (gulong) * nitems);
*len = nitems;
-
+
XFree (nums);
return TRUE;
@@ -531,9 +531,9 @@ _wnck_get_utf8_list (Window xwindow,
guint i;
guint n_strings;
char *p;
-
+
utf8_string = _wnck_atom_get ("UTF8_STRING");
-
+
_wnck_error_trap_push ();
type = None;
val = NULL;
@@ -543,13 +543,13 @@ _wnck_get_utf8_list (Window xwindow,
0, G_MAXLONG,
False, utf8_string,
&type, &format, &nitems,
- &bytes_after, (void*)&val);
+ &bytes_after, (void*)&val);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return NULL;
-
+
if (type != utf8_string ||
format != 8 ||
nitems == 0)
@@ -577,7 +577,7 @@ _wnck_get_utf8_list (Window xwindow,
/* we're guaranteed that val has a nul on the end
* by XGetWindowProperty
*/
-
+
retval = g_new0 (char*, n_strings + 1);
p = val;
@@ -594,13 +594,13 @@ _wnck_get_utf8_list (Window xwindow,
}
retval[i] = g_strdup (p);
-
+
p = p + strlen (p) + 1;
++i;
}
-
+
XFree (val);
-
+
return retval;
}
@@ -612,8 +612,8 @@ _wnck_set_utf8_list (Window xwindow,
Atom utf8_string;
GString *flattened;
int i;
-
- utf8_string = _wnck_atom_get ("UTF8_STRING");
+
+ utf8_string = _wnck_atom_get ("UTF8_STRING");
/* flatten to nul-separated list */
flattened = g_string_new ("");
@@ -626,13 +626,13 @@ _wnck_set_utf8_list (Window xwindow,
}
_wnck_error_trap_push ();
-
+
XChangeProperty (_wnck_get_default_display(),
xwindow,
atom,
utf8_string, 8, PropModeReplace,
(guchar *) flattened->str, flattened->len);
-
+
_wnck_error_trap_pop ();
g_string_free (flattened, TRUE);
@@ -661,13 +661,13 @@ filter_func (GdkXEvent *gdkxevent,
int i;
Display *display;
#endif /* HAVE_STARTUP_NOTIFICATION */
-
+
switch (xevent->type)
{
case PropertyNotify:
{
WnckScreen *screen;
-
+
screen = wnck_screen_get_for_root (xevent->xany.window);
if (screen != NULL)
_wnck_screen_process_property_notify (screen, xevent);
@@ -681,7 +681,7 @@ filter_func (GdkXEvent *gdkxevent,
if (app)
_wnck_application_process_property_notify (app, xevent);
-
+
if (window)
_wnck_window_process_property_notify (window, xevent);
}
@@ -691,9 +691,9 @@ filter_func (GdkXEvent *gdkxevent,
case ConfigureNotify:
{
WnckWindow *window;
-
+
window = wnck_window_get (xevent->xconfigure.window);
-
+
if (window)
_wnck_window_process_configure_notify (window, xevent);
}
@@ -721,13 +721,13 @@ filter_func (GdkXEvent *gdkxevent,
if (s != NULL)
sn_display_process_event (_wnck_screen_get_sn_display (s),
xevent);
-
+
++i;
}
#endif /* HAVE_STARTUP_NOTIFICATION */
break;
}
-
+
return GDK_FILTER_CONTINUE;
}
@@ -806,7 +806,7 @@ _wnck_close (Screen *screen,
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
-
+
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
@@ -825,7 +825,7 @@ _wnck_close (Screen *screen,
root,
False,
SubstructureRedirectMask | SubstructureNotifyMask,
- &xev);
+ &xev);
_wnck_error_trap_pop ();
}
@@ -851,7 +851,7 @@ _wnck_keyboard_move (Screen *screen,
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
-
+
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
@@ -870,7 +870,7 @@ _wnck_keyboard_move (Screen *screen,
root,
False,
SubstructureRedirectMask | SubstructureNotifyMask,
- &xev);
+ &xev);
_wnck_error_trap_pop ();
}
@@ -884,7 +884,7 @@ _wnck_keyboard_size (Screen *screen,
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
-
+
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
@@ -903,7 +903,7 @@ _wnck_keyboard_size (Screen *screen,
root,
False,
SubstructureRedirectMask | SubstructureNotifyMask,
- &xev);
+ &xev);
_wnck_error_trap_pop ();
}
@@ -920,8 +920,8 @@ _wnck_change_state (Screen *screen,
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
#define _NET_WM_STATE_ADD 1 /* add/set property */
-#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
-
+#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
+
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
@@ -958,7 +958,7 @@ _wnck_change_workspace (Screen *screen,
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
-
+
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
@@ -993,7 +993,7 @@ _wnck_activate (Screen *screen,
if (timestamp == 0)
g_warning ("Received a timestamp of 0; window activation may not "
"function properly.\n");
-
+
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
@@ -1015,7 +1015,7 @@ _wnck_activate (Screen *screen,
root,
False,
SubstructureRedirectMask | SubstructureNotifyMask,
- &xev);
+ &xev);
_wnck_error_trap_pop ();
}
@@ -1030,7 +1030,7 @@ _wnck_activate_workspace (Screen *screen,
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
-
+
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
@@ -1064,7 +1064,7 @@ _wnck_change_viewport (Screen *screen,
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
-
+
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
@@ -1097,7 +1097,7 @@ _wnck_toggle_showing_desktop (Screen *screen,
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
-
+
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
@@ -1124,7 +1124,7 @@ char*
_wnck_get_session_id (Window xwindow)
{
Window client_leader;
-
+
client_leader = None;
_wnck_get_window (xwindow,
_wnck_atom_get ("WM_CLIENT_LEADER"),
@@ -1154,7 +1154,7 @@ char*
_wnck_get_name (Window xwindow)
{
char *name;
-
+
name = _wnck_get_utf8_property (xwindow,
_wnck_atom_get ("_NET_WM_VISIBLE_NAME"));
@@ -1173,7 +1173,7 @@ char*
_wnck_get_icon_name (Window xwindow)
{
char *name;
-
+
name = _wnck_get_utf8_property (xwindow,
_wnck_atom_get ("_NET_WM_VISIBLE_ICON_NAME"));
@@ -1193,7 +1193,7 @@ latin1_to_utf8 (const char *latin1)
{
GString *str;
const char *p;
-
+
str = g_string_new (NULL);
p = latin1;
@@ -1223,7 +1223,7 @@ _wnck_get_wmclass (Window xwindow,
{
XClassHint ch;
char *retval;
-
+
_wnck_error_trap_push ();
ch.res_name = NULL;
@@ -1233,7 +1233,7 @@ _wnck_get_wmclass (Window xwindow,
&ch);
_wnck_error_trap_pop ();
-
+
retval = NULL;
if (res_class)
@@ -1241,12 +1241,12 @@ _wnck_get_wmclass (Window xwindow,
if (res_name)
*res_name = NULL;
-
+
if (ch.res_name)
{
if (res_name)
*res_name = latin1_to_utf8 (ch.res_name);
-
+
XFree (ch.res_name);
}
@@ -1254,7 +1254,7 @@ _wnck_get_wmclass (Window xwindow,
{
if (res_class)
*res_class = latin1_to_utf8 (ch.res_class);
-
+
XFree (ch.res_class);
}
}
@@ -1299,7 +1299,7 @@ _wnck_select_input (Window xwindow,
int mask)
{
GdkWindow *gdkwindow;
-
+
gdkwindow = gdk_x11_window_lookup_for_display (gdk_display_get_default (),
xwindow);
@@ -1315,11 +1315,11 @@ _wnck_select_input (Window xwindow,
XGetWindowAttributes (_wnck_get_default_display (), xwindow, &attrs);
mask |= attrs.your_event_mask;
}
-
+
XSelectInput (_wnck_get_default_display (), xwindow, mask);
_wnck_error_trap_pop ();
}
-
+
/* The icon-reading code is copied
* from metacity, please sync bugfixes
*/
@@ -1331,26 +1331,26 @@ find_largest_sizes (gulong *data,
{
*width = 0;
*height = 0;
-
+
while (nitems > 0)
{
int w, h;
gboolean replace;
replace = FALSE;
-
+
if (nitems < 3)
return FALSE; /* no space for w, h */
-
+
w = data[0];
h = data[1];
-
+
if (nitems < ((w * h) + 2))
return FALSE; /* not enough data */
*width = MAX (w, *width);
*height = MAX (h, *height);
-
+
data += (w * h) + 2;
nitems -= (w * h) + 2;
}
@@ -1371,7 +1371,7 @@ find_best_size (gulong *data,
int best_h;
gulong *best_start;
int max_width, max_height;
-
+
*width = 0;
*height = 0;
*start = NULL;
@@ -1383,24 +1383,24 @@ find_best_size (gulong *data,
ideal_width = max_width;
if (ideal_height < 0)
ideal_height = max_height;
-
+
best_w = 0;
best_h = 0;
best_start = NULL;
-
+
while (nitems > 0)
{
int w, h;
gboolean replace;
replace = FALSE;
-
+
if (nitems < 3)
return FALSE; /* no space for w, h */
-
+
w = data[0];
h = data[1];
-
+
if (nitems < ((w * h) + 2))
break; /* not enough data */
@@ -1414,7 +1414,7 @@ find_best_size (gulong *data,
const int ideal_size = (ideal_width + ideal_height) / 2;
int best_size = (best_w + best_h) / 2;
int this_size = (w + h) / 2;
-
+
/* larger than desired is always better than smaller */
if (best_size < ideal_size &&
this_size >= ideal_size)
@@ -1459,7 +1459,7 @@ argbdata_to_pixdata (gulong *argb_data, int len, guchar **pixdata)
{
guchar *p;
int i;
-
+
*pixdata = g_new (guchar, len * 4);
p = *pixdata;
@@ -1469,10 +1469,10 @@ argbdata_to_pixdata (gulong *argb_data, int len, guchar **pixdata)
{
guint argb;
guint rgba;
-
+
argb = argb_data[i];
rgba = (argb << 8) | (argb >> 24);
-
+
*p = rgba >> 24;
++p;
*p = (rgba >> 16) & 0xff;
@@ -1481,7 +1481,7 @@ argbdata_to_pixdata (gulong *argb_data, int len, guchar **pixdata)
++p;
*p = rgba & 0xff;
++p;
-
+
++i;
}
}
@@ -1509,7 +1509,7 @@ read_rgb_icon (Window xwindow,
int w, h;
gulong *best_mini;
int mini_w, mini_h;
-
+
_wnck_error_trap_push ();
type = None;
data = NULL;
@@ -1519,9 +1519,9 @@ read_rgb_icon (Window xwindow,
0, G_MAXLONG,
False, XA_CARDINAL, &type, &format, &nitems,
&bytes_after, (void*)&data);
-
+
err = _wnck_error_trap_pop ();
-
+
if (err != Success ||
result != Success)
return FALSE;
@@ -1531,7 +1531,7 @@ read_rgb_icon (Window xwindow,
XFree (data);
return FALSE;
}
-
+
if (!find_best_size (data, nitems,
ideal_width, ideal_height,
&w, &h, &best))
@@ -1547,7 +1547,7 @@ read_rgb_icon (Window xwindow,
XFree (data);
return FALSE;
}
-
+
*width = w;
*height = h;
@@ -1558,7 +1558,7 @@ read_rgb_icon (Window xwindow,
argbdata_to_pixdata (best_mini, mini_w * mini_h, mini_pixdata);
XFree (data);
-
+
return TRUE;
}
@@ -1586,7 +1586,7 @@ get_pixmap_geometry (Pixmap pixmap,
*h = 1;
if (d)
*d = 1;
-
+
XGetGeometry (_wnck_get_default_display (),
pixmap, &root_ignored, &x_ignored, &y_ignored,
&width, &height, &border_width_ignored, &depth);
@@ -1610,10 +1610,10 @@ apply_mask (GdkPixbuf *pixbuf,
guchar *dest;
int src_stride;
int dest_stride;
-
+
w = MIN (gdk_pixbuf_get_width (mask), gdk_pixbuf_get_width (pixbuf));
h = MIN (gdk_pixbuf_get_height (mask), gdk_pixbuf_get_height (pixbuf));
-
+
with_alpha = gdk_pixbuf_add_alpha (pixbuf, FALSE, 0, 0, 0);
dest = gdk_pixbuf_get_pixels (with_alpha);
@@ -1621,7 +1621,7 @@ apply_mask (GdkPixbuf *pixbuf,
dest_stride = gdk_pixbuf_get_rowstride (with_alpha);
src_stride = gdk_pixbuf_get_rowstride (mask);
-
+
i = 0;
while (i < h)
{
@@ -1630,7 +1630,7 @@ apply_mask (GdkPixbuf *pixbuf,
{
guchar *s = src + i * src_stride + j * 3;
guchar *d = dest + i * dest_stride + j * 4;
-
+
/* s[0] == s[1] == s[2], they are 255 if the bit was set, 0
* otherwise
*/
@@ -1638,10 +1638,10 @@ apply_mask (GdkPixbuf *pixbuf,
d[3] = 0; /* transparent */
else
d[3] = 255; /* opaque */
-
+
++j;
}
-
+
++i;
}
@@ -1649,7 +1649,7 @@ apply_mask (GdkPixbuf *pixbuf,
}
GdkPixbuf*
-_wnck_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap)
+_wnck_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap)
{
cairo_surface_t *surface;
Display *display;
@@ -1710,11 +1710,11 @@ try_pixmap_and_mask (Pixmap src_pixmap,
if (src_pixmap == None)
return FALSE;
-
+
_wnck_error_trap_push ();
get_pixmap_geometry (src_pixmap, &w, &h, NULL);
-
+
unscaled = _wnck_gdk_pixbuf_get_from_pixmap (src_pixmap);
if (unscaled && src_mask != None)
@@ -1722,13 +1722,13 @@ try_pixmap_and_mask (Pixmap src_pixmap,
get_pixmap_geometry (src_mask, &w, &h, NULL);
mask = _wnck_gdk_pixbuf_get_from_pixmap (src_mask);
}
-
+
_wnck_error_trap_pop ();
if (mask)
{
GdkPixbuf *masked;
-
+
masked = apply_mask (unscaled, mask);
g_object_unref (G_OBJECT (unscaled));
unscaled = masked;
@@ -1736,7 +1736,7 @@ try_pixmap_and_mask (Pixmap src_pixmap,
g_object_unref (G_OBJECT (mask));
mask = NULL;
}
-
+
if (unscaled)
{
*iconp =
@@ -1752,8 +1752,8 @@ try_pixmap_and_mask (Pixmap src_pixmap,
gdk_pixbuf_get_width (unscaled),
ideal_mini_height > 0 ? ideal_mini_height :
gdk_pixbuf_get_height (unscaled),
- GDK_INTERP_BILINEAR);
-
+ GDK_INTERP_BILINEAR);
+
g_object_unref (G_OBJECT (unscaled));
return TRUE;
}
@@ -1775,7 +1775,7 @@ get_kwm_win_icon (Window xwindow,
*pixmap = None;
*mask = None;
-
+
_wnck_error_trap_push ();
icons = NULL;
result = XGetWindowProperty (_wnck_get_default_display (), xwindow,
@@ -1784,22 +1784,22 @@ get_kwm_win_icon (Window xwindow,
False,
_wnck_atom_get ("KWM_WIN_ICON"),
&type, &format, &nitems,
- &bytes_after, (void*)&icons);
+ &bytes_after, (void*)&icons);
err = _wnck_error_trap_pop ();
if (err != Success ||
result != Success)
return;
-
+
if (type != _wnck_atom_get ("KWM_WIN_ICON"))
{
XFree (icons);
return;
}
-
+
*pixmap = icons[0];
*mask = icons[1];
-
+
XFree (icons);
return;
@@ -1833,7 +1833,7 @@ struct _WnckIconCache
/* TRUE if these props have changed */
guint wm_hints_dirty : 1;
guint kwm_win_icon_dirty : 1;
- guint net_wm_icon_dirty : 1;
+ guint net_wm_icon_dirty : 1;
};
WnckIconCache*
@@ -1855,7 +1855,7 @@ _wnck_icon_cache_new (void)
icon_cache->wm_hints_dirty = TRUE;
icon_cache->kwm_win_icon_dirty = TRUE;
icon_cache->net_wm_icon_dirty = TRUE;
-
+
return icon_cache;
}
@@ -1866,7 +1866,7 @@ clear_icon_cache (WnckIconCache *icon_cache,
if (icon_cache->icon)
g_object_unref (G_OBJECT (icon_cache->icon));
icon_cache->icon = NULL;
-
+
if (icon_cache->mini_icon)
g_object_unref (G_OBJECT (icon_cache->mini_icon));
icon_cache->mini_icon = NULL;
@@ -1885,14 +1885,14 @@ void
_wnck_icon_cache_free (WnckIconCache *icon_cache)
{
clear_icon_cache (icon_cache, FALSE);
-
+
g_slice_free (WnckIconCache, icon_cache);
}
void
_wnck_icon_cache_property_changed (WnckIconCache *icon_cache,
Atom atom)
-{
+{
if (atom == _wnck_atom_get ("_NET_WM_ICON"))
icon_cache->net_wm_icon_dirty = TRUE;
else if (atom == _wnck_atom_get ("KWM_WIN_ICON"))
@@ -1945,7 +1945,7 @@ replace_cache (WnckIconCache *icon_cache,
GdkPixbuf *new_mini_icon)
{
clear_icon_cache (icon_cache, FALSE);
-
+
icon_cache->origin = origin;
if (new_icon)
@@ -1968,13 +1968,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)
@@ -1984,27 +1984,27 @@ scaled_from_pixdata (guchar *pixdata,
{
GdkPixbuf *tmp;
int size;
-
+
size = MAX (w, h);
-
+
tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, size, size);
-
+
if (tmp != NULL)
{
gdk_pixbuf_fill (tmp, 0);
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
@@ -2025,7 +2025,7 @@ _wnck_read_icons (Window xwindow,
int ideal_mini_width,
int ideal_mini_height)
{
- guchar *pixdata;
+ guchar *pixdata;
int w, h;
guchar *mini_pixdata;
int mini_w, mini_h;
@@ -2034,18 +2034,18 @@ _wnck_read_icons (Window xwindow,
XWMHints *hints;
/* Return value is whether the icon changed */
-
+
g_return_val_if_fail (icon_cache != NULL, FALSE);
-
+
*iconp = NULL;
*mini_iconp = NULL;
-
+
if (ideal_width != icon_cache->ideal_width ||
ideal_height != icon_cache->ideal_height ||
ideal_mini_width != icon_cache->ideal_mini_width ||
ideal_mini_height != icon_cache->ideal_mini_height)
clear_icon_cache (icon_cache, TRUE);
-
+
icon_cache->ideal_width = ideal_width;
icon_cache->ideal_height = ideal_height;
icon_cache->ideal_mini_width = ideal_mini_width;
@@ -2053,7 +2053,7 @@ _wnck_read_icons (Window xwindow,
if (!_wnck_icon_cache_get_icon_invalidated (icon_cache))
return FALSE; /* we have no new info to use */
-
+
pixdata = NULL;
/* Our algorithm here assumes that we can't have for example origin
@@ -2064,13 +2064,13 @@ _wnck_read_icons (Window xwindow,
* tried to read it at the current size. If it is dirty, then
* we haven't done that since the last change.
*/
-
+
if (icon_cache->origin <= USING_NET_WM_ICON &&
icon_cache->net_wm_icon_dirty)
{
icon_cache->net_wm_icon_dirty = FALSE;
-
+
if (read_rgb_icon (xwindow,
ideal_width, ideal_height,
ideal_mini_width, ideal_mini_height,
@@ -2078,7 +2078,7 @@ _wnck_read_icons (Window xwindow,
&mini_w, &mini_h, &mini_pixdata))
{
*iconp = scaled_from_pixdata (pixdata, w, h, ideal_width, ideal_height);
-
+
*mini_iconp = scaled_from_pixdata (mini_pixdata, mini_w, mini_h,
ideal_mini_width, ideal_mini_height);
@@ -2093,7 +2093,7 @@ _wnck_read_icons (Window xwindow,
icon_cache->wm_hints_dirty)
{
icon_cache->wm_hints_dirty = FALSE;
-
+
_wnck_error_trap_push ();
hints = XGetWMHints (_wnck_get_default_display (), xwindow);
_wnck_error_trap_pop ();
@@ -2137,7 +2137,7 @@ _wnck_read_icons (Window xwindow,
icon_cache->kwm_win_icon_dirty)
{
icon_cache->kwm_win_icon_dirty = FALSE;
-
+
get_kwm_win_icon (xwindow, &pixmap, &mask);
if ((pixmap != icon_cache->prev_pixmap ||
@@ -2153,12 +2153,12 @@ _wnck_read_icons (Window xwindow,
replace_cache (icon_cache, USING_KWM_WIN_ICON,
*iconp, *mini_iconp);
-
+
return TRUE;
}
}
}
-
+
if (icon_cache->want_fallback &&
icon_cache->origin < USING_FALLBACK_ICON)
{
@@ -2191,14 +2191,14 @@ _wnck_read_icons (Window xwindow,
static GdkPixbuf*
default_icon_at_size (int width,
int height)
-{
+{
GdkPixbuf *base;
-
+
base = gdk_pixbuf_new_from_inline (-1, default_icon_data,
FALSE,
NULL);
-
+
g_assert (base);
if ((width < 0 && height < 0) ||
@@ -2210,16 +2210,16 @@ default_icon_at_size (int width,
else
{
GdkPixbuf *scaled;
-
+
scaled = gdk_pixbuf_scale_simple (base,
width > 0 ? width :
gdk_pixbuf_get_width (base),
height > 0 ? height :
gdk_pixbuf_get_height (base),
GDK_INTERP_BILINEAR);
-
+
g_object_unref (G_OBJECT (base));
-
+
return scaled;
}
}
@@ -2263,14 +2263,14 @@ _wnck_get_window_geometry (Screen *screen,
height = 1;
display = DisplayOfScreen (screen);
-
+
_wnck_error_trap_push ();
XGetGeometry (display,
xwindow,
&root_window,
&x, &y, &width, &height, &bw, &depth);
-
+
_wnck_error_trap_pop ();
_wnck_get_window_position (screen, xwindow, xp, yp);
@@ -2334,7 +2334,7 @@ _wnck_get_window_position (Screen *screen,
display = DisplayOfScreen (screen);
root = RootWindowOfScreen (screen);
-
+
_wnck_error_trap_push ();
XTranslateCoordinates (display,
xwindow,
@@ -2362,7 +2362,7 @@ _wnck_set_icon_geometry (Window xwindow,
data[1] = y;
data[2] = width;
data[3] = height;
-
+
_wnck_error_trap_push ();
XChangeProperty (_wnck_get_default_display (),
@@ -2408,7 +2408,7 @@ _wnck_set_desktop_layout (Screen *xscreen,
data[1] = columns;
data[2] = rows;
data[3] = _NET_WM_TOPLEFT;
-
+
_wnck_error_trap_push ();
XChangeProperty (display,
@@ -2420,7 +2420,7 @@ _wnck_set_desktop_layout (Screen *xscreen,
_wnck_error_trap_pop ();
}
-typedef struct
+typedef struct
{
Window window;
Atom timestamp_prop_atom;
@@ -2447,9 +2447,9 @@ timestamp_predicate (Display *display,
* @window: a #Window, used for communication with the server.
* The window must have PropertyChangeMask in its
* events mask or a hang will result.
- *
- * Routine to get the current X server time stamp.
- *
+ *
+ * Routine to get the current X server time stamp.
+ *
* Return value: the time stamp.
**/
static Time
@@ -2508,19 +2508,19 @@ _wnck_try_desktop_layout_manager (Screen *xscreen,
GSList *tmp;
int number;
Time timestamp;
- XClientMessageEvent xev;
+ XClientMessageEvent xev;
char buffer[256];
LayoutManager *lm;
display = DisplayOfScreen (xscreen);
root = RootWindowOfScreen (xscreen);
number = XScreenNumberOfScreen (xscreen);
-
+
sprintf (buffer, "_NET_DESKTOP_LAYOUT_S%d", number);
selection_atom = _wnck_atom_get (buffer);
owner = XGetSelectionOwner (display, selection_atom);
-
+
tmp = layout_managers;
while (tmp != NULL)
{
@@ -2542,10 +2542,10 @@ _wnck_try_desktop_layout_manager (Screen *xscreen,
else
return WNCK_NO_MANAGER_TOKEN; /* someone else has it */
}
-
+
tmp = tmp->next;
}
-
+
if (owner != None)
return WNCK_NO_MANAGER_TOKEN; /* someone else has the selection */
@@ -2585,7 +2585,7 @@ _wnck_try_desktop_layout_manager (Screen *xscreen,
g_free (lm);
return WNCK_NO_MANAGER_TOKEN;
}
-
+
xev.type = ClientMessage;
xev.window = root;
xev.message_type = lm->manager_atom;
@@ -2595,7 +2595,7 @@ _wnck_try_desktop_layout_manager (Screen *xscreen,
xev.data.l[2] = lm->window;
xev.data.l[3] = 0; /* manager specific data */
xev.data.l[4] = 0; /* manager specific data */
-
+
_wnck_error_trap_push ();
XSendEvent (display, root,
False, StructureNotifyMask, (XEvent *)&xev);
@@ -2603,7 +2603,7 @@ _wnck_try_desktop_layout_manager (Screen *xscreen,
layout_managers = g_slist_prepend (layout_managers,
lm);
-
+
return lm->token;
}
@@ -2615,10 +2615,10 @@ _wnck_release_desktop_layout_manager (Screen *xscreen,
GSList *tmp;
int number;
LayoutManager *lm;
-
+
display = DisplayOfScreen (xscreen);
number = XScreenNumberOfScreen (xscreen);
-
+
tmp = layout_managers;
while (tmp != NULL)
{
@@ -2648,7 +2648,7 @@ _wnck_release_desktop_layout_manager (Screen *xscreen,
return;
}
}
-
+
tmp = tmp->next;
}
}
@@ -2661,7 +2661,7 @@ _wnck_desktop_layout_manager_process_event (XEvent *xev)
if (xev->type != SelectionClear)
return FALSE;
-
+
tmp = layout_managers;
while (tmp != NULL)
{
@@ -2674,7 +2674,7 @@ _wnck_desktop_layout_manager_process_event (XEvent *xev)
_wnck_free_layout_manager (lm);
return TRUE;
}
-
+
tmp = tmp->next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]