summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2020-10-10 13:56:03 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-10-10 13:56:03 +0100
commit0742a6c78eb34373842e3927e832e733bdc7e293 (patch)
treedf985f8bfa949ef2c61efd4b8aa20400c9a2f130 /src/modules
parent6bc22474bdcf32d815787b9813f6c47d92064e6d (diff)
Ecore_Evas win32 module: do not set evas viewport size to 0
Summary: When a window is iconified, its size is 0x0 and is passed to evas viewport. Set the size to 1x1 in that case Test Plan: Elementary "windows states" test Reviewers: raster, jpcordovae, felipealmeida, jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12171
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
index debb7f263c..4f2f5c3d6e 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -54,6 +54,8 @@
54 54
55#define ECORE_EVAS_EVENT_COUNT 11 55#define ECORE_EVAS_EVENT_COUNT 11
56 56
57#define EE_SZ(sz_) (ee->sz_ == 0) ? 1 : (ee->sz_)
58
57static int _ecore_evas_init_count = 0; 59static int _ecore_evas_init_count = 0;
58 60
59static Ecore_Event_Handler *ecore_evas_event_handlers[ECORE_EVAS_EVENT_COUNT]; 61static Ecore_Event_Handler *ecore_evas_event_handlers[ECORE_EVAS_EVENT_COUNT];
@@ -374,13 +376,13 @@ _ecore_evas_win32_event_window_configure(void *data EINA_UNUSED, int type EINA_U
374 376
375 if (ECORE_EVAS_PORTRAIT(ee)) 377 if (ECORE_EVAS_PORTRAIT(ee))
376 { 378 {
377 evas_output_size_set(ee->evas, ee->w, ee->h); 379 evas_output_size_set(ee->evas, EE_SZ(w), EE_SZ(h));
378 evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); 380 evas_output_viewport_set(ee->evas, 0, 0, EE_SZ(w), EE_SZ(h));
379 } 381 }
380 else 382 else
381 { 383 {
382 evas_output_size_set(ee->evas, ee->h, ee->w); 384 evas_output_size_set(ee->evas, EE_SZ(h), EE_SZ(w));
383 evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); 385 evas_output_viewport_set(ee->evas, 0, 0, EE_SZ(h), EE_SZ(w));
384 } 386 }
385 if (ee->prop.avoid_damage) 387 if (ee->prop.avoid_damage)
386 { 388 {
@@ -603,13 +605,13 @@ _ecore_evas_win32_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
603 x, y, width, height); 605 x, y, width, height);
604 if (ECORE_EVAS_PORTRAIT(ee)) 606 if (ECORE_EVAS_PORTRAIT(ee))
605 { 607 {
606 evas_output_size_set(ee->evas, ee->w, ee->h); 608 evas_output_size_set(ee->evas, EE_SZ(w), EE_SZ(h));
607 evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); 609 evas_output_viewport_set(ee->evas, 0, 0, EE_SZ(w), EE_SZ(h));
608 } 610 }
609 else 611 else
610 { 612 {
611 evas_output_size_set(ee->evas, ee->h, ee->w); 613 evas_output_size_set(ee->evas, EE_SZ(h), EE_SZ(w));
612 evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); 614 evas_output_viewport_set(ee->evas, 0, 0, EE_SZ(h), EE_SZ(w));
613 } 615 }
614 if (ee->prop.avoid_damage) 616 if (ee->prop.avoid_damage)
615 { 617 {
@@ -668,13 +670,13 @@ _ecore_evas_win32_rotation_set_internal(Ecore_Evas *ee, int rotation)
668 h, w); 670 h, w);
669 if (ECORE_EVAS_PORTRAIT(ee)) 671 if (ECORE_EVAS_PORTRAIT(ee))
670 { 672 {
671 evas_output_size_set(ee->evas, ee->w, ee->h); 673 evas_output_size_set(ee->evas, EE_SZ(w), EE_SZ(h));
672 evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); 674 evas_output_viewport_set(ee->evas, 0, 0, EE_SZ(w), EE_SZ(h));
673 } 675 }
674 else 676 else
675 { 677 {
676 evas_output_size_set(ee->evas, ee->h, ee->w); 678 evas_output_size_set(ee->evas, EE_SZ(h), EE_SZ(w));
677 evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); 679 evas_output_viewport_set(ee->evas, 0, 0, EE_SZ(h), EE_SZ(w));
678 } 680 }
679 if (ee->func.fn_resize) ee->func.fn_resize(ee); 681 if (ee->func.fn_resize) ee->func.fn_resize(ee);
680 } 682 }