[Xfce4-commits] <xfwm4:xfce-4.6> Typos and type checking, thanks buildbot :)

Olivier Fourdan noreply at xfce.org
Tue Nov 17 12:54:03 CET 2009


Updating branch refs/heads/xfce-4.6
         to 9bc095506441b1a0fbe89314850dd5f0695d76df (commit)
       from 455157569524053f1383a1b6fe1fa3f162e6d5cf (commit)

commit 9bc095506441b1a0fbe89314850dd5f0695d76df
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Mon Oct 12 14:03:20 2009 +0200

    Typos and type checking, thanks buildbot :)

 src/screen.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/src/screen.c b/src/screen.c
index 4cc97de..8d8e869 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -566,6 +566,37 @@ myScreenGetClientFromWindow (ScreenInfo *screen_info, Window w, unsigned short m
     return NULL;
 }
 
+gboolean
+myScreenComputeSize (ScreenInfo *screen_info)
+{
+    gint num_monitors, i;
+    gint width, height;
+    GdkRectangle monitor;
+    gboolean changed;
+
+    g_return_val_if_fail (screen_info != NULL, FALSE);
+    g_return_val_if_fail (GDK_IS_SCREEN (screen_info->gscr), FALSE);
+    TRACE ("entering myScreenComputeSize");
+
+    width = 0;
+    height = 0;
+    num_monitors = gdk_screen_get_n_monitors (screen_info->gscr);
+
+    for (i = 0; i < num_monitors; i++)
+    {
+        gdk_screen_get_monitor_geometry (screen_info->gscr, i, &monitor);
+        width = MAX (monitor.x + monitor.width, width);
+        height = MAX (monitor.y + monitor.height, height);
+    }
+
+    changed = ((screen_info->width != width) | (screen_info->height != height));
+    screen_info->width = width;
+    screen_info->height = height;
+    TRACE ("myScreenComputeSize(): width=%i, height=%i", width, height);
+
+    return changed;
+}
+
 void
 myScreenInvalidateMonitorCache (ScreenInfo *screen_info)
 {



More information about the Xfce4-commits mailing list