summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-10-19 10:16:29 +0900
committerHermet Park <chuneon.park@samsung.com>2020-10-19 10:16:29 +0900
commitae8f741c7134a6e8b730dca6a32c9b02d7bab6bd (patch)
tree67a67c37c5957f526c776e5c65ff921fac7a8d70 /src/modules
parent14c076f4393be05979f90f1fdbaa84c0b0f6fc3d (diff)
parent3274390f7324b561739bdf2b620c939b6e0508fd (diff)
Merge branch 'master' into devs/hermet/lottie
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c47
-rw-r--r--src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c4
2 files changed, 46 insertions, 5 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 4f2f5c3d6e..623515da95 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -73,6 +73,7 @@ struct _Ecore_Evas_Engine_Data_Win32
73 { 73 {
74 unsigned char region : 1; 74 unsigned char region : 1;
75 unsigned char fullscreen : 1; 75 unsigned char fullscreen : 1;
76 unsigned char maximized : 1;
76 } state; 77 } state;
77}; 78};
78 79
@@ -100,6 +101,7 @@ static Eina_Bool _ecore_evas_win32_event_window_delete_request(void *data EINA_U
100 101
101static Eina_Bool _ecore_evas_win32_event_window_property_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event); 102static Eina_Bool _ecore_evas_win32_event_window_property_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
102 103
104
103/* Private functions */ 105/* Private functions */
104 106
105static int 107static int
@@ -433,9 +435,11 @@ _ecore_evas_win32_event_window_property_change(void *data EINA_UNUSED, int type
433{ 435{
434 struct { 436 struct {
435 struct { 437 struct {
438 unsigned char maximized : 1;
436 unsigned char fullscreen : 1; 439 unsigned char fullscreen : 1;
437 } win32; 440 } win32;
438 struct { 441 struct {
442 Eina_Bool maximized : 1;
439 Eina_Bool fullscreen : 1; 443 Eina_Bool fullscreen : 1;
440 } prop; 444 } prop;
441 } prev; 445 } prev;
@@ -455,12 +459,16 @@ _ecore_evas_win32_event_window_property_change(void *data EINA_UNUSED, int type
455 wdata = ee->engine.data; 459 wdata = ee->engine.data;
456 460
457 prev.win32.fullscreen = wdata->state.fullscreen; 461 prev.win32.fullscreen = wdata->state.fullscreen;
462 prev.win32.maximized = wdata->state.maximized;
458 463
459 prev.prop.fullscreen = ee->prop.fullscreen; 464 prev.prop.fullscreen = ee->prop.fullscreen;
465 prev.prop.maximized = ee->prop.maximized;
460 466
461 wdata->state.fullscreen = 0; 467 wdata->state.fullscreen = 0;
468 wdata->state.maximized = 0;
462 469
463 ee->prop.fullscreen = EINA_FALSE; 470 ee->prop.fullscreen = EINA_FALSE;
471 ee->prop.maximized = EINA_FALSE;
464 472
465 /* we get the states status */ 473 /* we get the states status */
466 ecore_win32_window_state_get(e->window, &state, &num); 474 ecore_win32_window_state_get(e->window, &state, &num);
@@ -474,6 +482,10 @@ _ecore_evas_win32_event_window_property_change(void *data EINA_UNUSED, int type
474 ee->prop.fullscreen = 1; 482 ee->prop.fullscreen = 1;
475 wdata->state.fullscreen = 1; 483 wdata->state.fullscreen = 1;
476 break; 484 break;
485 case ECORE_WIN32_WINDOW_STATE_MAXIMIZED:
486 ee->prop.maximized = 1;
487 wdata->state.maximized = 1;
488 break;
477 default: 489 default:
478 break; 490 break;
479 } 491 }
@@ -482,7 +494,9 @@ _ecore_evas_win32_event_window_property_change(void *data EINA_UNUSED, int type
482 } 494 }
483 495
484 if ((prev.win32.fullscreen != wdata->state.fullscreen) || 496 if ((prev.win32.fullscreen != wdata->state.fullscreen) ||
485 (prev.prop.fullscreen != ee->prop.fullscreen)) 497 (prev.prop.fullscreen != ee->prop.fullscreen) ||
498 (prev.win32.maximized != wdata->state.maximized) ||
499 (prev.prop.maximized != ee->prop.maximized))
486 { 500 {
487 if (ee->func.fn_state_change) 501 if (ee->func.fn_state_change)
488 ee->func.fn_state_change(ee); 502 ee->func.fn_state_change(ee);
@@ -507,6 +521,8 @@ _ecore_evas_win32_state_update(Ecore_Evas *ee)
507 state[num++] = ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT; 521 state[num++] = ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT;
508 if (ee->prop.maximized) 522 if (ee->prop.maximized)
509 state[num++] = ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ; 523 state[num++] = ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ;
524 if (ee->prop.maximized)
525 state[num++] = ECORE_WIN32_WINDOW_STATE_MAXIMIZED;
510// if (bd->client.netwm.state.shaded) 526// if (bd->client.netwm.state.shaded)
511// state[num++] = ECORE_WIN32_WINDOW_STATE_SHADED; 527// state[num++] = ECORE_WIN32_WINDOW_STATE_SHADED;
512 /* if (ee->prop.focus_skip) */ 528 /* if (ee->prop.focus_skip) */
@@ -830,7 +846,8 @@ _ecore_evas_win32_activate(Ecore_Evas *ee)
830{ 846{
831 INF("ecore evas activate"); 847 INF("ecore evas activate");
832 848
833 ecore_win32_window_focus((Ecore_Win32_Window *)ee->prop.window); 849 ecore_evas_show(ee);
850 ecore_win32_window_activate((Ecore_Win32_Window *)ee->prop.window);
834} 851}
835 852
836static void 853static void
@@ -973,6 +990,30 @@ _ecore_evas_win32_override_set(Ecore_Evas *ee, Eina_Bool on)
973} 990}
974 991
975static void 992static void
993_ecore_evas_win32_maximized_set(Ecore_Evas *ee, Eina_Bool on)
994{
995 Ecore_Evas_Engine_Data_Win32 *wdata = ee->engine.data;
996
997 INF("ecore evas maximized set");
998
999 wdata->state.maximized = !!on;
1000 if (ee->should_be_visible)
1001 {
1002 struct _Ecore_Win32_Window *window;
1003
1004 window = (Ecore_Win32_Window *)ee->prop.window;
1005 ecore_win32_window_maximized_set(window, on);
1006 }
1007 else
1008 {
1009 if (ee->prop.maximized == on) return;
1010 ee->prop.maximized = on;
1011 wdata->state.maximized = on;
1012 _ecore_evas_win32_state_update(ee);
1013 }
1014}
1015
1016static void
976_ecore_evas_win32_fullscreen_set(Ecore_Evas *ee, Eina_Bool on) 1017_ecore_evas_win32_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
977{ 1018{
978 Ecore_Evas_Engine_Data_Win32 *wdata = ee->engine.data; 1019 Ecore_Evas_Engine_Data_Win32 *wdata = ee->engine.data;
@@ -1371,7 +1412,7 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
1371 _ecore_evas_win32_iconified_set, 1412 _ecore_evas_win32_iconified_set,
1372 _ecore_evas_win32_borderless_set, 1413 _ecore_evas_win32_borderless_set,
1373 _ecore_evas_win32_override_set, 1414 _ecore_evas_win32_override_set,
1374 NULL, 1415 _ecore_evas_win32_maximized_set,
1375 _ecore_evas_win32_fullscreen_set, 1416 _ecore_evas_win32_fullscreen_set,
1376 NULL, /* _ecore_evas_x_avoid_damage_set */ 1417 NULL, /* _ecore_evas_x_avoid_damage_set */
1377 NULL, /* _ecore_evas_x_withdrawn_set */ 1418 NULL, /* _ecore_evas_x_withdrawn_set */
diff --git a/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c b/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
index bac3d08808..e68edbb0c9 100644
--- a/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
+++ b/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
@@ -1734,12 +1734,12 @@ _copy_attribute(Svg_Node *to, Svg_Node *from)
1734 break; 1734 break;
1735 case SVG_NODE_POLYGON: 1735 case SVG_NODE_POLYGON:
1736 to->node.polygon.points_count = from->node.polygon.points_count; 1736 to->node.polygon.points_count = from->node.polygon.points_count;
1737 to->node.polygon.points = calloc(to->node.polygon.points_count, sizeof(double)); 1737 to->node.polygon.points = malloc(to->node.polygon.points_count * sizeof(double));
1738 memcpy(to->node.polygon.points, from->node.polygon.points, to->node.polygon.points_count * sizeof(double)); 1738 memcpy(to->node.polygon.points, from->node.polygon.points, to->node.polygon.points_count * sizeof(double));
1739 break; 1739 break;
1740 case SVG_NODE_POLYLINE: 1740 case SVG_NODE_POLYLINE:
1741 to->node.polyline.points_count = from->node.polyline.points_count; 1741 to->node.polyline.points_count = from->node.polyline.points_count;
1742 to->node.polyline.points = calloc(to->node.polyline.points_count, sizeof(double)); 1742 to->node.polyline.points = malloc(to->node.polyline.points_count * sizeof(double));
1743 memcpy(to->node.polyline.points, from->node.polyline.points, to->node.polyline.points_count * sizeof(double)); 1743 memcpy(to->node.polyline.points, from->node.polyline.points, to->node.polyline.points_count * sizeof(double));
1744 break; 1744 break;
1745 default: 1745 default: