comparison src/video/directfb/SDL_DirectFB_window.c @ 3013:8cc00819c8d6

Reverted Bob's indent checkin
author Sam Lantinga <slouken@libsdl.org>
date Sat, 10 Jan 2009 21:50:26 +0000
parents 8f4ed5ec2b06
children d72a0dd80e8b
comparison
equal deleted inserted replaced
3012:7e30c2dc7783 3013:8cc00819c8d6
41 window->w, window->h); 41 window->w, window->h);
42 window->driverdata = NULL; 42 window->driverdata = NULL;
43 SDL_DFB_CALLOC(window->driverdata, 1, sizeof(DFB_WindowData)); 43 SDL_DFB_CALLOC(window->driverdata, 1, sizeof(DFB_WindowData));
44 windata = (DFB_WindowData *) window->driverdata; 44 windata = (DFB_WindowData *) window->driverdata;
45 45
46 SDL_DFB_CHECKERR(devdata-> 46 SDL_DFB_CHECKERR(devdata->dfb->
47 dfb->SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL)); 47 SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL));
48 SDL_DFB_CHECKERR(dispdata-> 48 SDL_DFB_CHECKERR(dispdata->layer->
49 layer->SetCooperativeLevel(dispdata->layer, 49 SetCooperativeLevel(dispdata->layer,
50 DLSCL_ADMINISTRATIVE)); 50 DLSCL_ADMINISTRATIVE));
51 51
52 /* Fill the window description. */ 52 /* Fill the window description. */
53 if (window->x == SDL_WINDOWPOS_CENTERED) { 53 if (window->x == SDL_WINDOWPOS_CENTERED) {
54 x = (dispdata->cw - window->w) / 2; 54 x = (dispdata->cw - window->w) / 2;
55 } else if (window->x == SDL_WINDOWPOS_UNDEFINED) { 55 } else if (window->x == SDL_WINDOWPOS_UNDEFINED) {
98 #endif 98 #endif
99 desc.surface_caps = DSCAPS_PREMULTIPLIED; 99 desc.surface_caps = DSCAPS_PREMULTIPLIED;
100 /* DSCAPS_VIDEOONLY has negative impact on performance */ 100 /* DSCAPS_VIDEOONLY has negative impact on performance */
101 101
102 /* Create the window. */ 102 /* Create the window. */
103 SDL_DFB_CHECKERR(dispdata-> 103 SDL_DFB_CHECKERR(dispdata->layer->
104 layer->CreateWindow(dispdata->layer, &desc, 104 CreateWindow(dispdata->layer, &desc, &windata->window));
105 &windata->window));
106 105
107 windata->window->GetOptions(windata->window, &wopts); 106 windata->window->GetOptions(windata->window, &wopts);
108 #if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 0) 107 #if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 0)
109 108
110 if (window->flags & SDL_WINDOW_RESIZABLE) 109 if (window->flags & SDL_WINDOW_RESIZABLE)
118 if (window->flags & SDL_WINDOW_FULLSCREEN) 117 if (window->flags & SDL_WINDOW_FULLSCREEN)
119 wopts |= DWOP_KEEP_POSITION | DWOP_KEEP_STACKING | DWOP_KEEP_SIZE; 118 wopts |= DWOP_KEEP_POSITION | DWOP_KEEP_STACKING | DWOP_KEEP_SIZE;
120 119
121 windata->window->SetOptions(windata->window, wopts); 120 windata->window->SetOptions(windata->window, wopts);
122 /* Get the window's surface. */ 121 /* Get the window's surface. */
123 SDL_DFB_CHECKERR(windata-> 122 SDL_DFB_CHECKERR(windata->window->
124 window->GetSurface(windata->window, &windata->surface)); 123 GetSurface(windata->window, &windata->surface));
125 windata->window->SetOpacity(windata->window, 0xFF); 124 windata->window->SetOpacity(windata->window, 0xFF);
126 SDL_DFB_CHECKERR(windata->window->CreateEventBuffer(windata->window, 125 SDL_DFB_CHECKERR(windata->window->
127 &(windata-> 126 CreateEventBuffer(windata->window,
128 eventbuffer))); 127 &(windata->eventbuffer)));
129 SDL_DFB_CHECKERR(windata-> 128 SDL_DFB_CHECKERR(windata->window->
130 window->EnableEvents(windata->window, DWET_ALL)); 129 EnableEvents(windata->window, DWET_ALL));
131 130
132 if (window->flags & SDL_WINDOW_FULLSCREEN) 131 if (window->flags & SDL_WINDOW_FULLSCREEN)
133 windata->window->SetStackingClass(windata->window, DWSC_UPPER); 132 windata->window->SetStackingClass(windata->window, DWSC_UPPER);
134 /* Make it the top most window. */ 133 /* Make it the top most window. */
135 windata->window->RaiseToTop(windata->window); 134 windata->window->RaiseToTop(windata->window);
201 #if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 0) 200 #if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 0)
202 int cw; 201 int cw;
203 int ch; 202 int ch;
204 203
205 /* Make sure all events are disabled for this operation ! */ 204 /* Make sure all events are disabled for this operation ! */
206 SDL_DFB_CHECKERR(windata-> 205 SDL_DFB_CHECKERR(windata->window->
207 window->DisableEvents(windata->window, DWET_ALL)); 206 DisableEvents(windata->window, DWET_ALL));
208 207
209 SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &cw, &ch)); 208 SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &cw, &ch));
210 if (cw != window->w || ch != window->h) 209 if (cw != window->w || ch != window->h)
211 SDL_DFB_CHECKERR(windata-> 210 SDL_DFB_CHECKERR(windata->window->
212 window->Resize(windata->window, window->w, 211 Resize(windata->window, window->w, window->h));
213 window->h)); 212 SDL_DFB_CHECKERR(windata->window->
214 SDL_DFB_CHECKERR(windata-> 213 EnableEvents(windata->window, DWET_ALL));
215 window->EnableEvents(windata->window, DWET_ALL));
216 214
217 #else 215 #else
218 SDL_DFB_CHECKERR(windata-> 216 SDL_DFB_CHECKERR(windata->window->
219 window->Resize(windata->window, window->w, 217 Resize(windata->window, window->w, window->h));
220 window->h));
221 #endif 218 #endif
222 SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &window->w, &window->h)); /* if a window manager should have decided otherwise */ 219 SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &window->w, &window->h)); /* if a window manager should have decided otherwise */
223 220
224 SDL_OnWindowResized(window); 221 SDL_OnWindowResized(window);
225 } 222 }