summaryrefslogtreecommitdiff
path: root/src/ui/draw-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/ui/draw-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/ui/draw-workspace.c')
-rw-r--r--src/ui/draw-workspace.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/ui/draw-workspace.c b/src/ui/draw-workspace.c
index 2a6e7675..a4ad240e 100644
--- a/src/ui/draw-workspace.c
+++ b/src/ui/draw-workspace.c
@@ -6,9 +6,9 @@
* libwnck or marco, since it's used in both of them
*/
-/*
+/*
* Copyright (C) 2002 Red Hat Inc.
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -18,7 +18,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
@@ -37,23 +37,23 @@ get_window_rect (const WnckWindowDisplayInfo *win,
{
double width_ratio, height_ratio;
int x, y, width, height;
-
+
width_ratio = (double) workspace_rect->width / (double) screen_width;
height_ratio = (double) workspace_rect->height / (double) screen_height;
-
+
x = win->x;
y = win->y;
width = win->width;
height = win->height;
-
+
x *= width_ratio;
y *= height_ratio;
width *= width_ratio;
height *= height_ratio;
-
+
x += workspace_rect->x;
y += workspace_rect->y;
-
+
if (width < 3)
width = 3;
if (height < 3)
@@ -90,7 +90,7 @@ draw_window (GtkWidget *widget,
#if GTK_CHECK_VERSION(3, 0, 0)
cairo_save(cr);
- #else
+ #else
cr = gdk_cairo_create (drawable);
#endif
@@ -116,9 +116,9 @@ draw_window (GtkWidget *widget,
icon = win->icon;
icon_w = icon_h = 0;
-
+
if (icon)
- {
+ {
icon_w = gdk_pixbuf_get_width (icon);
icon_h = gdk_pixbuf_get_height (icon);
@@ -134,7 +134,7 @@ draw_window (GtkWidget *widget,
{
icon_w = gdk_pixbuf_get_width (icon);
icon_h = gdk_pixbuf_get_height (icon);
-
+
/* Give up. */
if (icon_w > (winrect->width - 2) ||
icon_h > (winrect->height - 2))
@@ -147,7 +147,7 @@ draw_window (GtkWidget *widget,
{
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);
@@ -155,7 +155,7 @@ draw_window (GtkWidget *widget,
cairo_paint (cr);
cairo_restore (cr);
}
-
+
if (is_active)
color = &style->fg[state];
else
@@ -170,7 +170,7 @@ draw_window (GtkWidget *widget,
winrect->x + 0.5, winrect->y + 0.5,
MAX (0, winrect->width - 1), MAX (0, winrect->height - 1));
cairo_stroke (cr);
-
+
#if GTK_CHECK_VERSION(3, 0, 0)
cairo_restore(cr);
#else
@@ -210,7 +210,7 @@ wnck_draw_workspace (GtkWidget *widget,
if (is_active)
state = GTK_STATE_SELECTED;
- else if (workspace_background)
+ else if (workspace_background)
state = GTK_STATE_PRELIGHT;
else
state = GTK_STATE_NORMAL;
@@ -220,7 +220,7 @@ wnck_draw_workspace (GtkWidget *widget,
#else
cr = gdk_cairo_create (drawable);
#endif
-
+
if (workspace_background)
{
gdk_cairo_set_source_pixbuf (cr, workspace_background, x, y);
@@ -236,16 +236,16 @@ wnck_draw_workspace (GtkWidget *widget,
#if !GTK_CHECK_VERSION(3, 0, 0)
cairo_destroy (cr);
#endif
-
+
i = 0;
while (i < n_windows)
{
const WnckWindowDisplayInfo *win = &windows[i];
GdkRectangle winrect;
-
+
get_window_rect (win, screen_width,
screen_height, &workspace_rect, &winrect);
-
+
draw_window (widget,
#if GTK_CHECK_VERSION(3, 0, 0)
cr,
@@ -255,7 +255,7 @@ wnck_draw_workspace (GtkWidget *widget,
win,
&winrect,
state);
-
+
++i;
}