Mercurial > sdl-ios-xcode
comparison src/video/gem/SDL_gemevents.c @ 922:7b920743ce57
Correctly set window size if resized or maximized
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Thu, 05 Aug 2004 19:40:23 +0000 |
parents | 4b1dd7691f05 |
children | 83db694556eb |
comparison
equal
deleted
inserted
replaced
921:6126849e59a6 | 922:7b920743ce57 |
---|---|
191 } | 191 } |
192 | 192 |
193 static int do_messages(_THIS, short *message) | 193 static int do_messages(_THIS, short *message) |
194 { | 194 { |
195 int quit, posted; | 195 int quit, posted; |
196 short x2,y2,w2,h2; | |
196 | 197 |
197 quit=0; | 198 quit=0; |
198 switch (message[0]) { | 199 switch (message[0]) { |
199 case WM_CLOSED: | 200 case WM_CLOSED: |
200 case AP_TERM: | 201 case AP_TERM: |
238 } | 239 } |
239 break; | 240 break; |
240 case WM_SIZED: | 241 case WM_SIZED: |
241 wind_set (message[3], WF_CURRXYWH, message[4], message[5], message[6], message[7]); | 242 wind_set (message[3], WF_CURRXYWH, message[4], message[5], message[6], message[7]); |
242 GEM_win_fulled = SDL_FALSE; /* Cancel maximized flag */ | 243 GEM_win_fulled = SDL_FALSE; /* Cancel maximized flag */ |
243 SDL_PrivateResize(message[6], message[7]); | 244 wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2); |
245 SDL_PrivateResize(w2, h2); | |
244 break; | 246 break; |
245 case WM_FULLED: | 247 case WM_FULLED: |
246 { | 248 { |
247 short x,y,w,h; | 249 short x,y,w,h; |
248 | 250 |
255 w = GEM_desk_w; | 257 w = GEM_desk_w; |
256 h = GEM_desk_h; | 258 h = GEM_desk_h; |
257 GEM_win_fulled = SDL_TRUE; | 259 GEM_win_fulled = SDL_TRUE; |
258 } | 260 } |
259 wind_set (message[3], WF_CURRXYWH, x, y, w, h); | 261 wind_set (message[3], WF_CURRXYWH, x, y, w, h); |
260 SDL_PrivateResize(w, h); | 262 wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2); |
263 SDL_PrivateResize(w2, h2); | |
261 } | 264 } |
262 break; | 265 break; |
263 case WM_BOTTOMED: | 266 case WM_BOTTOMED: |
264 case WM_UNTOPPED: | 267 case WM_UNTOPPED: |
265 SDL_PrivateAppActive(0, SDL_APPINPUTFOCUS); | 268 SDL_PrivateAppActive(0, SDL_APPINPUTFOCUS); |