diff src/video/x11/SDL_x11window.c @ 2876:3fcb0d447bcd

indent
author Sam Lantinga <slouken@libsdl.org>
date Wed, 17 Dec 2008 07:19:55 +0000
parents 91a7e08cd238
children e705adf6f3dc
line wrap: on
line diff
--- a/src/video/x11/SDL_x11window.c	Wed Dec 17 07:17:54 2008 +0000
+++ b/src/video/x11/SDL_x11window.c	Wed Dec 17 07:19:55 2008 +0000
@@ -287,7 +287,8 @@
                             visual, AllocNone);
     }
 
-    if ((window->flags & SDL_WINDOW_FULLSCREEN) || window->x == SDL_WINDOWPOS_CENTERED) {
+    if ((window->flags & SDL_WINDOW_FULLSCREEN)
+        || window->x == SDL_WINDOWPOS_CENTERED) {
         x = (DisplayWidth(data->display, displaydata->screen) -
              window->w) / 2;
     } else if (window->x == SDL_WINDOWPOS_UNDEFINED) {
@@ -295,7 +296,8 @@
     } else {
         x = window->x;
     }
-    if ((window->flags & SDL_WINDOW_FULLSCREEN) || window->y == SDL_WINDOWPOS_CENTERED) {
+    if ((window->flags & SDL_WINDOW_FULLSCREEN)
+        || window->y == SDL_WINDOWPOS_CENTERED) {
         y = (DisplayHeight(data->display, displaydata->screen) -
              window->h) / 2;
     } else if (window->y == SDL_WINDOWPOS_UNDEFINED) {
@@ -321,7 +323,8 @@
 
     sizehints = XAllocSizeHints();
     if (sizehints) {
-        if ((window->flags & SDL_WINDOW_RESIZABLE) && !(window->flags & SDL_WINDOW_FULLSCREEN)) {
+        if ((window->flags & SDL_WINDOW_RESIZABLE)
+            && !(window->flags & SDL_WINDOW_FULLSCREEN)) {
             sizehints->min_width = 32;
             sizehints->min_height = 32;
             sizehints->max_height = 4096;
@@ -342,7 +345,7 @@
         XFree(sizehints);
     }
 
-    if (window->flags & (SDL_WINDOW_BORDERLESS|SDL_WINDOW_FULLSCREEN)) {
+    if (window->flags & (SDL_WINDOW_BORDERLESS | SDL_WINDOW_FULLSCREEN)) {
         SDL_bool set;
         Atom WM_HINTS;
 
@@ -603,12 +606,14 @@
     Display *display = data->videodata->display;
     int x, y;
 
-    if ((window->flags & SDL_WINDOW_FULLSCREEN) || window->x == SDL_WINDOWPOS_CENTERED) {
+    if ((window->flags & SDL_WINDOW_FULLSCREEN)
+        || window->x == SDL_WINDOWPOS_CENTERED) {
         x = (DisplayWidth(display, displaydata->screen) - window->w) / 2;
     } else {
         x = window->x;
     }
-    if ((window->flags & SDL_WINDOW_FULLSCREEN) || window->y == SDL_WINDOWPOS_CENTERED) {
+    if ((window->flags & SDL_WINDOW_FULLSCREEN)
+        || window->y == SDL_WINDOWPOS_CENTERED) {
         y = (DisplayHeight(display, displaydata->screen) - window->h) / 2;
     } else {
         y = window->y;
@@ -676,12 +681,14 @@
     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
     Display *display = data->videodata->display;
 
-    if ((window->flags & (SDL_WINDOW_INPUT_GRABBED|SDL_WINDOW_FULLSCREEN)) &&
-        (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
+    if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
+        && (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
         /* Try to grab the mouse */
-        for ( ; ; ) {
-            int result = XGrabPointer(display, data->window, True, 0, GrabModeAsync, GrabModeAsync, data->window, None, CurrentTime);
-            if ( result == GrabSuccess ) {
+        for (;;) {
+            int result =
+                XGrabPointer(display, data->window, True, 0, GrabModeAsync,
+                             GrabModeAsync, data->window, None, CurrentTime);
+            if (result == GrabSuccess) {
                 break;
             }
             SDL_Delay(100);
@@ -691,7 +698,8 @@
         XRaiseWindow(display, data->window);
 
         /* Now grab the keyboard */
-        XGrabKeyboard(display, data->window, True, GrabModeAsync, GrabModeAsync, CurrentTime);
+        XGrabKeyboard(display, data->window, True, GrabModeAsync,
+                      GrabModeAsync, CurrentTime);
     } else {
         XUngrabPointer(display, CurrentTime);
         XUngrabKeyboard(display, CurrentTime);