[Xfce4-commits] [xfce/xfwm4] 05/05: Cosmetic code change

noreply at xfce.org noreply at xfce.org
Tue Jan 6 22:08:37 CET 2015


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit a7983e83b37b7efc0e4cdd88ec0a70beb0b3282b
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Tue Jan 6 21:55:59 2015 +0100

    Cosmetic code change
    
    Really, just cosmetic code style reformatting.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/compositor.c |   71 +++++++++++++++++++++++++++---------------------------
 1 file changed, 36 insertions(+), 35 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index d7ed9a4..a862694 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1389,9 +1389,9 @@ paint_all (ScreenInfo *screen_info, XserverRegion region)
         g_return_if_fail (screen_info->rootBuffer != None);
 
         memset(screen_info->transform.matrix, 0, 9);
-        screen_info->transform.matrix[0][0] = 1<<16;
-        screen_info->transform.matrix[1][1] = 1<<16;
-        screen_info->transform.matrix[2][2] = 1<<16;
+        screen_info->transform.matrix[0][0] = 1 << 16;
+        screen_info->transform.matrix[1][1] = 1 << 16;
+        screen_info->transform.matrix[2][2] = 1 << 16;
         screen_info->zoomed = 0;
     }
 
@@ -1484,7 +1484,7 @@ paint_all (ScreenInfo *screen_info, XserverRegion region)
 
         if (cw->shadow)
         {
-            shadowClip = XFixesCreateRegion(dpy, NULL, 0);
+            shadowClip = XFixesCreateRegion (dpy, NULL, 0);
             XFixesSubtractRegion (dpy, shadowClip, cw->borderClip, cw->borderSize);
 
             XFixesSetPictureClipRegion (dpy, screen_info->rootBuffer, 0, 0, shadowClip);
@@ -1523,7 +1523,7 @@ paint_all (ScreenInfo *screen_info, XserverRegion region)
     }
 
     TRACE ("Copying data back to screen");
-    if(screen_info->zoomed)
+    if (screen_info->zoomed)
     {
         /* Fixme: copy back whole screen if zoomed
            It would be better to scale the clipping region if possible. */
@@ -1966,7 +1966,7 @@ map_win (CWindow *cw)
 
     if (!WIN_IS_REDIRECTED(cw))
     {
-        cw->fulloverlay = is_fullscreen(cw);
+        cw->fulloverlay = is_fullscreen (cw);
         if (cw->fulloverlay)
         {
             /*
@@ -1995,7 +1995,7 @@ map_win (CWindow *cw)
     /* Check for new windows to un-redirect. */
     if (WIN_HAS_DAMAGE(cw) && WIN_IS_OVERRIDE(cw) &&
         WIN_IS_NATIVE_OPAQUE(cw) && WIN_IS_REDIRECTED(cw) && !WIN_IS_SHAPED(cw)
-        && ((screen_info->wins_unredirected > 0) || is_fullscreen(cw)))
+        && ((screen_info->wins_unredirected > 0) || is_fullscreen (cw)))
     {
         /* Make those opaque, we don't want them to be transparent */
         cw->opacity = NET_WM_OPAQUE;
@@ -2432,25 +2432,25 @@ static void
 recenter_zoomed_area (ScreenInfo *screen_info, int x_root, int y_root)
 {
     int zf = screen_info->transform.matrix[0][0];
-    double zoom = XFixedToDouble(zf);
+    double zoom = XFixedToDouble (zf);
     Display *dpy = screen_info->display_info->dpy;
 
-    if(screen_info->zoomed)
+    if (screen_info->zoomed)
     {
-        int xp = x_root * (1-zoom);
-        int yp = y_root * (1-zoom);
-        screen_info->transform.matrix[0][2] = (xp<<16);
-        screen_info->transform.matrix[1][2] = (yp<<16);
+        int xp = x_root * (1 - zoom);
+        int yp = y_root * (1 - zoom);
+        screen_info->transform.matrix[0][2] = (xp << 16);
+        screen_info->transform.matrix[1][2] = (yp << 16);
     }
 
-    if(zf > (1<<14) && zf < (1<<16))
-        XRenderSetPictureFilter(dpy, screen_info->rootBuffer, "bilinear", NULL, 0);
+    if (zf > (1 << 14) && zf < (1 << 16))
+        XRenderSetPictureFilter (dpy, screen_info->rootBuffer, "bilinear", NULL, 0);
     else
-        XRenderSetPictureFilter(dpy, screen_info->rootBuffer, "nearest", NULL, 0);
+        XRenderSetPictureFilter (dpy, screen_info->rootBuffer, "nearest", NULL, 0);
 
-    XRenderSetPictureTransform(dpy, screen_info->rootBuffer, &screen_info->transform);
+    XRenderSetPictureTransform (dpy, screen_info->rootBuffer, &screen_info->transform);
 
-    damage_screen(screen_info);
+    damage_screen (screen_info);
 }
 
 static gboolean
@@ -2462,11 +2462,11 @@ zoom_timeout_cb (gpointer data)
     int          x_root, y_root;
     int          x_win, y_win;
     unsigned int mask;
-    static int   x_old=-1, y_old=-1;
+    static int   x_old = -1, y_old = -1;
 
     screen_info = (ScreenInfo *) data;
 
-    if(!screen_info->zoomed)
+    if (!screen_info->zoomed)
     {
         screen_info->zoom_timeout_id = 0;
         return FALSE; /* stop calling this callback */
@@ -2475,10 +2475,10 @@ zoom_timeout_cb (gpointer data)
     XQueryPointer (screen_info->display_info->dpy, screen_info->xroot,
 			    &root_return, &child_return,
 			    &x_root, &y_root, &x_win, &y_win, &mask);
-    if(x_old != x_root || y_old != y_root)
+    if (x_old != x_root || y_old != y_root)
     {
         x_old = x_root; y_old = y_root;
-        recenter_zoomed_area(screen_info, x_root, y_root);
+        recenter_zoomed_area (screen_info, x_root, y_root);
     }
     return TRUE;
 }
@@ -3050,27 +3050,28 @@ compositorZoomIn (ScreenInfo *screen_info, XButtonEvent *ev)
     screen_info->transform.matrix[0][0] -= 4096;
     screen_info->transform.matrix[1][1] -= 4096;
 
-    if(screen_info->transform.matrix[0][0] < (1<<10))
+    if (screen_info->transform.matrix[0][0] < (1 << 10))
     {
-        screen_info->transform.matrix[0][0] = (1<<10);
-        screen_info->transform.matrix[1][1] = (1<<10);
+        screen_info->transform.matrix[0][0] = (1 << 10);
+        screen_info->transform.matrix[1][1] = (1 << 10);
     }
 
     screen_info->zoomed = 1;
-    if(!screen_info->zoom_timeout_id)
+    if (!screen_info->zoom_timeout_id)
     {
         int timeout_rate = 30; /* per second */
 #ifdef HAVE_RANDR
         if (screen_info->display_info->have_xrandr)
         {
-            timeout_rate = screen_info->refresh_rate/2;
-            if(timeout_rate < 1)
+            timeout_rate = screen_info->refresh_rate / 2;
+            if (timeout_rate < 1)
                 timeout_rate = 30;
         }
 #endif /* HAVE_RANDR */
-        screen_info->zoom_timeout_id = g_timeout_add ((1000/timeout_rate), zoom_timeout_cb, screen_info);
+        screen_info->zoom_timeout_id = g_timeout_add ((1000 / timeout_rate),
+                                                      zoom_timeout_cb, screen_info);
     }
-    recenter_zoomed_area(screen_info, ev->x_root, ev->y_root);
+    recenter_zoomed_area (screen_info, ev->x_root, ev->y_root);
 #endif /* HAVE_COMPOSITOR */
 }
 
@@ -3079,20 +3080,20 @@ compositorZoomOut (ScreenInfo *screen_info, XButtonEvent *ev)
 {
 #ifdef HAVE_COMPOSITOR
     /* don't do anything if the user disabled the zoom feature */
-    if(screen_info->zoomed)
+    if (screen_info->zoomed)
     {
         screen_info->transform.matrix[0][0] += 4096;
         screen_info->transform.matrix[1][1] += 4096;
 
-        if(screen_info->transform.matrix[0][0] >= (1<<16))
+        if (screen_info->transform.matrix[0][0] >= (1 << 16))
         {
-            screen_info->transform.matrix[0][0] = (1<<16);
-            screen_info->transform.matrix[1][1] = (1<<16);
+            screen_info->transform.matrix[0][0] = (1 << 16);
+            screen_info->transform.matrix[1][1] = (1 << 16);
             screen_info->zoomed = 0;
             screen_info->transform.matrix[0][2] = 0;
             screen_info->transform.matrix[1][2] = 0;
         }
-        recenter_zoomed_area(screen_info, ev->x_root, ev->y_root);
+        recenter_zoomed_area (screen_info, ev->x_root, ev->y_root);
     }
 #endif /* HAVE_COMPOSITOR */
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list