summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-02-18 17:52:16 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-02-18 17:52:16 +0900
commit199fb20fe4eafacaf8d71473a472cd3739a283f0 (patch)
tree6e0757b57b0104e6116244fd4e5ba32af8a47c78
parent14c6378fc41906db14464e17aadc7d94a825fafd (diff)
ecore-evas - sdl module - limit to 1 window at a time
this should fix T693 and only allow 1 sdl window at any one time iwht the sdl ecore-evas engine/module. it's simply invalid to use more than one window with it.
-rw-r--r--src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
index ede7872317..33da51882b 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -35,8 +35,9 @@ static Ecore_Event_Handler *ecore_evas_event_handlers[4] = {
35}; 35};
36 36
37static const char *ecore_evas_sdl_default = "EFL SDL"; 37static const char *ecore_evas_sdl_default = "EFL SDL";
38static int _ecore_evas_fps_debug = 0;
39static Ecore_Poller *ecore_evas_event; 38static Ecore_Poller *ecore_evas_event;
39static int _ecore_evas_fps_debug = 0;
40static int ecore_evas_sdl_count = 0;
40 41
41static Ecore_Evas * 42static Ecore_Evas *
42_ecore_evas_sdl_match(void) 43_ecore_evas_sdl_match(void)
@@ -264,6 +265,7 @@ _ecore_evas_sdl_free(Ecore_Evas *ee)
264 ecore_event_window_unregister(0); 265 ecore_event_window_unregister(0);
265 _ecore_evas_sdl_shutdown(); 266 _ecore_evas_sdl_shutdown();
266 ecore_sdl_shutdown(); 267 ecore_sdl_shutdown();
268 ecore_evas_sdl_count--;
267} 269}
268 270
269static void 271static void
@@ -321,19 +323,17 @@ _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
321} 323}
322 324
323static void 325static void
324_ecore_evas_move_resize(Ecore_Evas *ee, int x EINA_UNUSED, int y EINA_UNUSED, int w, int h) 326_ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
325{ 327{
326 if ((w == ee->w) && (h == ee->h)) return; 328 if ((ee->x != x) || (ee->y != y))
327 ee->req.w = w; 329 {
328 ee->req.h = h; 330 ee->req.x = x;
329 ee->w = w; 331 ee->req.y = y;
330 ee->h = h; 332 ee->x = x;
331 333 ee->y = y;
332 evas_output_size_set(ee->evas, ee->w, ee->h); 334 if (ee->func.fn_move) ee->func.fn_move(ee);
333 evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); 335 }
334 evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); 336 _ecore_evas_resize(ee, w, h);
335
336 if (ee->func.fn_resize) ee->func.fn_resize(ee);
337} 337}
338 338
339static void 339static void
@@ -463,6 +463,7 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
463{ 463{
464 Ecore_Evas *ee; 464 Ecore_Evas *ee;
465 465
466 if (ecore_evas_sdl_count > 0) return NULL;
466 if (!name) 467 if (!name)
467 name = ecore_evas_sdl_default; 468 name = ecore_evas_sdl_default;
468 469
@@ -614,6 +615,7 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
614 _ecore_evas_register(ee); 615 _ecore_evas_register(ee);
615 616
616 sdl_ee = ee; 617 sdl_ee = ee;
618 ecore_evas_sdl_count++;
617 return ee; 619 return ee;
618} 620}
619 621