src/video/directfb/SDL_DirectFB_window.c
changeset 7191 75360622e65f
parent 7037 3fedf1f25b94
child 7678 286c42d7c5ed
     1.1 --- a/src/video/directfb/SDL_DirectFB_window.c	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/src/video/directfb/SDL_DirectFB_window.c	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -57,10 +57,10 @@
     1.4      SDL_DFB_CHECKERR(dispdata->layer->SetCooperativeLevel(dispdata->layer,
     1.5                                                            DLSCL_ADMINISTRATIVE));
     1.6  #endif
     1.7 -	/* FIXME ... ughh, ugly */
     1.8 -	if (window->x == -1000 && window->y == -1000)
     1.9 -		bshaped = 1;
    1.10 -	
    1.11 +    /* FIXME ... ughh, ugly */
    1.12 +    if (window->x == -1000 && window->y == -1000)
    1.13 +        bshaped = 1;
    1.14 +
    1.15      /* Fill the window description. */
    1.16      x = window->x;
    1.17      y = window->y;
    1.18 @@ -68,21 +68,21 @@
    1.19      DirectFB_WM_AdjustWindowLayout(window, window->flags, window->w, window->h);
    1.20  
    1.21      /* Create Window */
    1.22 -	desc.caps = 0;
    1.23 +    desc.caps = 0;
    1.24      desc.flags =
    1.25          DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY | DWDESC_SURFACE_CAPS;
    1.26  
    1.27      if (bshaped) {
    1.28 -    	desc.flags |= DWDESC_CAPS;
    1.29 -    	desc.caps |= DWCAPS_ALPHACHANNEL;
    1.30 +        desc.flags |= DWDESC_CAPS;
    1.31 +        desc.caps |= DWCAPS_ALPHACHANNEL;
    1.32      }
    1.33      else
    1.34      {
    1.35 -    	desc.flags |= DWDESC_PIXELFORMAT;
    1.36 +        desc.flags |= DWDESC_PIXELFORMAT;
    1.37      }
    1.38  
    1.39      if (!(window->flags & SDL_WINDOW_BORDERLESS))
    1.40 -		desc.caps |= DWCAPS_NODECORATION;
    1.41 +        desc.caps |= DWCAPS_NODECORATION;
    1.42  
    1.43      desc.posx = x;
    1.44      desc.posy = y;
    1.45 @@ -116,7 +116,7 @@
    1.46          wopts |= DWOP_KEEP_POSITION | DWOP_KEEP_STACKING | DWOP_KEEP_SIZE;
    1.47          SDL_DFB_CHECK(windata->dfbwin->SetStackingClass(windata->dfbwin, DWSC_UPPER));
    1.48      }
    1.49 -    
    1.50 +
    1.51      if (bshaped) {
    1.52          wopts |= DWOP_SHAPED | DWOP_ALPHACHANNEL;
    1.53          wopts &= ~DWOP_OPAQUE_REGION;
    1.54 @@ -155,7 +155,7 @@
    1.55      SDL_DFB_CHECK(windata->dfbwin->RaiseToTop(windata->dfbwin));
    1.56  
    1.57      /* remember parent */
    1.58 -    //windata->sdlwin = window;
    1.59 +    /*windata->sdlwin = window; */
    1.60  
    1.61      /* Add to list ... */
    1.62  
    1.63 @@ -168,7 +168,7 @@
    1.64  
    1.65      return 0;
    1.66    error:
    1.67 -	SDL_DFB_RELEASE(windata->surface);
    1.68 +    SDL_DFB_RELEASE(windata->surface);
    1.69      SDL_DFB_RELEASE(windata->dfbwin);
    1.70      return -1;
    1.71  }
    1.72 @@ -275,7 +275,7 @@
    1.73  
    1.74          if (cw != window->w || ch != window->h) {
    1.75  
    1.76 -		    DirectFB_WM_AdjustWindowLayout(window, window->flags, window->w, window->h);
    1.77 +            DirectFB_WM_AdjustWindowLayout(window, window->flags, window->w, window->h);
    1.78              SDL_DFB_CHECKERR(windata->dfbwin->Resize(windata->dfbwin,
    1.79                                                       windata->size.w,
    1.80                                                       windata->size.h));
    1.81 @@ -367,7 +367,7 @@
    1.82  
    1.83      /* Window layout */
    1.84      DirectFB_WM_AdjustWindowLayout(window, window->flags & ~(SDL_WINDOW_MAXIMIZED | SDL_WINDOW_MINIMIZED),
    1.85 -    	windata->restore.w, windata->restore.h);
    1.86 +        windata->restore.w, windata->restore.h);
    1.87      SDL_DFB_CHECK(windata->dfbwin->Resize(windata->dfbwin, windata->restore.w,
    1.88                              windata->restore.h));
    1.89      SDL_DFB_CHECK(windata->dfbwin->MoveTo(windata->dfbwin, windata->restore.x,
    1.90 @@ -393,8 +393,8 @@
    1.91      if ((window->flags & SDL_WINDOW_INPUT_GRABBED)) {
    1.92          if (gwindata != NULL)
    1.93          {
    1.94 -		    SDL_DFB_CHECK(gwindata->dfbwin->UngrabPointer(gwindata->dfbwin));
    1.95 -		    SDL_DFB_CHECK(gwindata->dfbwin->UngrabKeyboard(gwindata->dfbwin));
    1.96 +            SDL_DFB_CHECK(gwindata->dfbwin->UngrabPointer(gwindata->dfbwin));
    1.97 +            SDL_DFB_CHECK(gwindata->dfbwin->UngrabKeyboard(gwindata->dfbwin));
    1.98          }
    1.99          SDL_DFB_CHECK(windata->dfbwin->GrabPointer(windata->dfbwin));
   1.100          SDL_DFB_CHECK(windata->dfbwin->GrabKeyboard(windata->dfbwin));
   1.101 @@ -418,22 +418,22 @@
   1.102      SDL_DFB_CHECK(windata->dfbwin->UngrabKeyboard(windata->dfbwin));
   1.103  
   1.104  #if SDL_DIRECTFB_OPENGL
   1.105 -	DirectFB_GL_DestroyWindowContexts(_this, window);
   1.106 +    DirectFB_GL_DestroyWindowContexts(_this, window);
   1.107  #endif
   1.108  
   1.109 -	if (window->shaper)
   1.110 -	{
   1.111 -	    SDL_ShapeData *data = window->shaper->driverdata;
   1.112 -	    SDL_DFB_CHECK(data->surface->ReleaseSource(data->surface));
   1.113 -    	SDL_DFB_RELEASE(data->surface);
   1.114 -    	SDL_DFB_FREE(data);
   1.115 -    	SDL_DFB_FREE(window->shaper);
   1.116 -	}
   1.117 +    if (window->shaper)
   1.118 +    {
   1.119 +        SDL_ShapeData *data = window->shaper->driverdata;
   1.120 +        SDL_DFB_CHECK(data->surface->ReleaseSource(data->surface));
   1.121 +        SDL_DFB_RELEASE(data->surface);
   1.122 +        SDL_DFB_FREE(data);
   1.123 +        SDL_DFB_FREE(window->shaper);
   1.124 +    }
   1.125  
   1.126      SDL_DFB_CHECK(windata->window_surface->SetFont(windata->window_surface, NULL));
   1.127      SDL_DFB_CHECK(windata->surface->ReleaseSource(windata->surface));
   1.128      SDL_DFB_CHECK(windata->window_surface->ReleaseSource(windata->window_surface));
   1.129 -  	SDL_DFB_RELEASE(windata->icon);
   1.130 +    SDL_DFB_RELEASE(windata->icon);
   1.131      SDL_DFB_RELEASE(windata->font);
   1.132      SDL_DFB_RELEASE(windata->eventbuffer);
   1.133      SDL_DFB_RELEASE(windata->surface);
   1.134 @@ -494,7 +494,7 @@
   1.135  
   1.136      if (adjust) {
   1.137  #if SDL_DIRECTFB_OPENGL
   1.138 -		DirectFB_GL_FreeWindowContexts(SDL_GetVideoDevice(), window);
   1.139 +        DirectFB_GL_FreeWindowContexts(SDL_GetVideoDevice(), window);
   1.140  #endif
   1.141  
   1.142  #if (DFB_VERSION_ATLEAST(1,2,1))
   1.143 @@ -521,9 +521,9 @@
   1.144                                         &windata->client, &windata->surface));
   1.145  #endif
   1.146          DirectFB_WM_RedrawLayout(SDL_GetVideoDevice(), window);
   1.147 -        
   1.148 +
   1.149  #if SDL_DIRECTFB_OPENGL
   1.150 -		DirectFB_GL_ReAllocWindowContexts(SDL_GetVideoDevice(), window);
   1.151 +        DirectFB_GL_ReAllocWindowContexts(SDL_GetVideoDevice(), window);
   1.152  #endif
   1.153     }
   1.154    error: