summaryrefslogtreecommitdiff
path: root/src/core/workspace.c
diff options
context:
space:
mode:
authorJoaquín Ignacio Aramendía <[email protected]>2014-06-25 19:06:17 -0300
committerJoaquín Ignacio Aramendía <[email protected]>2014-06-26 20:03:32 -0300
commita65a66d49bd0d6ec6c94b8e3ecd551cb570cec95 (patch)
treeb451afa6025e587f0ee287601427e572712e3428 /src/core/workspace.c
parent32050fd47713d9254e05344a6afd87202fa45d11 (diff)
downloadmarco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.bz2
marco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.xz
Remove all trailing whitespaces in the code tree
Just run: $ find -name '*.c' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i $ find -name '*.h' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
Diffstat (limited to 'src/core/workspace.c')
-rw-r--r--src/core/workspace.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/core/workspace.c b/src/core/workspace.c
index a0a8ad1e..ef7ee1dd 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -2,11 +2,11 @@
/* Marco Workspaces */
-/*
+/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2003 Rob Adams
* Copyright (C) 2004, 2005 Elijah Newren
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -16,7 +16,7 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
@@ -79,7 +79,7 @@ meta_workspace_new (MetaScreen *screen)
workspace->all_struts = NULL;
workspace->showing_desktop = FALSE;
-
+
return workspace;
}
@@ -100,7 +100,7 @@ workspace_free_struts (MetaWorkspace *workspace)
{
if (workspace->all_struts == NULL)
return;
-
+
g_slist_foreach (workspace->all_struts, free_this, NULL);
g_slist_free (workspace->all_struts);
workspace->all_struts = NULL;
@@ -118,7 +118,7 @@ meta_workspace_free (MetaWorkspace *workspace)
/* Here we assume all the windows are already on another workspace
* as well, so they won't be "orphaned"
*/
-
+
tmp = workspace->windows;
while (tmp != NULL)
{
@@ -136,10 +136,10 @@ meta_workspace_free (MetaWorkspace *workspace)
g_assert (workspace->windows == NULL);
screen = workspace->screen;
-
+
workspace->screen->workspaces =
g_list_remove (workspace->screen->workspaces, workspace);
-
+
g_free (workspace->work_area_xinerama);
g_list_free (workspace->mru_list);
@@ -175,11 +175,11 @@ meta_workspace_add_window (MetaWorkspace *workspace,
MetaWindow *window)
{
g_return_if_fail (window->workspace == NULL);
-
+
/* If the window is on all workspaces, we want to add it to all mru
* lists, otherwise just add it to this workspaces mru list
*/
- if (window->on_all_workspaces)
+ if (window->on_all_workspaces)
{
if (window->workspace == NULL)
{
@@ -204,7 +204,7 @@ meta_workspace_add_window (MetaWorkspace *workspace,
window->workspace = workspace;
meta_window_set_current_workspace_hint (window);
-
+
if (window->struts)
{
meta_topic (META_DEBUG_WORKAREA,
@@ -229,10 +229,10 @@ meta_workspace_remove_window (MetaWorkspace *workspace,
window->workspace = NULL;
/* If the window is on all workspaces, we don't want to remove it
- * from the MRU list unless this causes it to be removed from all
+ * from the MRU list unless this causes it to be removed from all
* workspaces
*/
- if (window->on_all_workspaces)
+ if (window->on_all_workspaces)
{
GList* tmp = window->screen->workspaces;
while (tmp)
@@ -250,7 +250,7 @@ meta_workspace_remove_window (MetaWorkspace *workspace,
}
meta_window_set_current_workspace_hint (window);
-
+
if (window->struts)
{
meta_topic (META_DEBUG_WORKAREA,
@@ -271,12 +271,12 @@ meta_workspace_relocate_windows (MetaWorkspace *workspace,
{
GList *tmp;
GList *copy;
-
+
g_return_if_fail (workspace != new_home);
/* can't modify list we're iterating over */
copy = g_list_copy (workspace->windows);
-
+
tmp = copy;
while (tmp != NULL)
{
@@ -284,12 +284,12 @@ meta_workspace_relocate_windows (MetaWorkspace *workspace,
meta_workspace_remove_window (workspace, window);
meta_workspace_add_window (new_home, window);
-
+
tmp = tmp->next;
}
g_list_free (copy);
-
+
g_assert (workspace->windows == NULL);
}
@@ -372,10 +372,10 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
{
MetaWorkspace *old;
MetaWindow *move_window;
-
+
meta_verbose ("Activating workspace %d\n",
meta_workspace_index (workspace));
-
+
if (workspace->screen->active_workspace == workspace)
return;
@@ -406,7 +406,7 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
if (workspace->screen->display->grab_op == META_GRAB_OP_MOVING ||
workspace->screen->display->grab_op == META_GRAB_OP_KEYBOARD_MOVING)
move_window = workspace->screen->display->grab_window;
-
+
if (move_window != NULL)
{
if (move_window->on_all_workspaces)
@@ -479,7 +479,7 @@ meta_workspace_list_windows (MetaWorkspace *workspace)
GSList *display_windows;
GSList *tmp;
GList *workspace_windows;
-
+
display_windows = meta_display_list_windows (workspace->screen->display);
workspace_windows = NULL;
@@ -513,11 +513,11 @@ set_active_space_hint (MetaScreen *screen)
*/
if (screen->closing > 0)
return;
-
+
data[0] = meta_workspace_index (screen->active_workspace);
meta_verbose ("Setting _NET_CURRENT_DESKTOP to %lu\n", data[0]);
-
+
meta_error_trap_push (screen->display);
XChangeProperty (screen->display->xdisplay, screen->xroot,
screen->display->atom__NET_CURRENT_DESKTOP,
@@ -532,7 +532,7 @@ meta_workspace_invalidate_work_area (MetaWorkspace *workspace)
GList *tmp;
GList *windows;
int i;
-
+
if (workspace->work_areas_invalid)
{
meta_topic (META_DEBUG_WORKAREA,
@@ -547,7 +547,7 @@ meta_workspace_invalidate_work_area (MetaWorkspace *workspace)
g_free (workspace->work_area_xinerama);
workspace->work_area_xinerama = NULL;
-
+
workspace_free_struts (workspace);
for (i = 0; i < workspace->screen->n_xinerama_infos; i++)
@@ -560,7 +560,7 @@ meta_workspace_invalidate_work_area (MetaWorkspace *workspace)
workspace->screen_region = NULL;
workspace->screen_edges = NULL;
workspace->xinerama_edges = NULL;
-
+
workspace->work_areas_invalid = TRUE;
/* redo the size/position constraints on all windows */
@@ -571,7 +571,7 @@ meta_workspace_invalidate_work_area (MetaWorkspace *workspace)
MetaWindow *w = tmp->data;
meta_window_queue (w, META_QUEUE_MOVE_RESIZE);
-
+
tmp = tmp->next;
}
@@ -597,7 +597,7 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
g_assert (workspace->screen_edges == NULL);
g_assert (workspace->xinerama_edges == NULL);
- /* STEP 1: Get the list of struts */
+ /* STEP 1: Get the list of struts */
windows = meta_workspace_list_windows (workspace);
for (tmp = windows; tmp != NULL; tmp = tmp->next)
{
@@ -615,7 +615,7 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
/* STEP 2: Get the maximal/spanning rects for the onscreen and
* on-single-xinerama regions
- */
+ */
g_assert (workspace->xinerama_region == NULL);
g_assert (workspace->screen_region == NULL);
@@ -687,7 +687,7 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
workspace->work_area_screen.x,
workspace->work_area_screen.y,
workspace->work_area_screen.width,
- workspace->work_area_screen.height);
+ workspace->work_area_screen.height);
/* Now find the work areas for each xinerama */
g_free (workspace->work_area_xinerama);
@@ -722,7 +722,7 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
/* STEP 4: Make sure the screen_region is nonempty (separate from step 2
* since it relies on step 3).
- */
+ */
if (workspace->screen_region == NULL)
{
MetaRectangle *nonempty_region;
@@ -758,7 +758,7 @@ meta_workspace_get_work_area_for_xinerama (MetaWorkspace *workspace,
ensure_work_areas_validated (workspace);
g_assert (which_xinerama < workspace->screen->n_xinerama_infos);
-
+
*area = workspace->work_area_xinerama[which_xinerama];
}
@@ -767,7 +767,7 @@ meta_workspace_get_work_area_all_xineramas (MetaWorkspace *workspace,
MetaRectangle *area)
{
ensure_work_areas_validated (workspace);
-
+
*area = workspace->work_area_screen;
}
@@ -987,7 +987,7 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
}
if (workspace->screen->display->autoraise_window != window &&
- meta_prefs_get_auto_raise ())
+ meta_prefs_get_auto_raise ())
{
meta_display_queue_autoraise_callback (workspace->screen->display,
window);
@@ -1036,7 +1036,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
meta_topic (META_DEBUG_FOCUS,
"Focusing MRU window\n");
- /* First, check to see if we need to focus an ancestor of a window */
+ /* First, check to see if we need to focus an ancestor of a window */
if (not_this_one)
{
MetaWindow *ancestor;
@@ -1045,9 +1045,9 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
if (ancestor != NULL)
{
meta_topic (META_DEBUG_FOCUS,
- "Focusing %s, ancestor of %s\n",
+ "Focusing %s, ancestor of %s\n",
ancestor->desc, not_this_one->desc);
-
+
meta_window_focus (ancestor, timestamp);
/* Also raise the window if in click-to-focus */
@@ -1059,7 +1059,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
}
/* No ancestor, look for the MRU window */
- tmp = workspace->mru_list;
+ tmp = workspace->mru_list;
while (tmp)
{
@@ -1093,7 +1093,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
{
meta_topic (META_DEBUG_FOCUS,
"Focusing workspace MRU window %s\n", window->desc);
-
+
meta_window_focus (window, timestamp);
/* Also raise the window if in click-to-focus */