This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch evas-sdl3-rewrite
in repository efl.
View the commit online.
commit 4c5bdb9e511ef032ea1bd4db2b27432783ace69b
Author: Swagtoy <[email protected]>
AuthorDate: Thu May 14 02:09:03 2026 -0400
ecore_evas_sdl: Fix resizing
Misuse of ecore_evas_resize. Just need to call the canvas func.
---
.../ecore_evas/engines/sdl/ecore_evas_sdl.c | 50 ++++++++++------------
1 file changed, 22 insertions(+), 28 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 78f7520c58..644d218358 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -64,7 +64,7 @@ _ecore_evas_sdl_match(unsigned int windowID)
static Eina_Bool
_ecore_evas_sdl_event_got_focus(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
-{ printf("%s\n", __FUNCTION__); // yes im too lazy to use ecore
+{ puts(__FUNCTION__);
Ecore_Sdl_Event_Window *ev = event;
Ecore_Evas *ee;
@@ -77,7 +77,7 @@ _ecore_evas_sdl_event_got_focus(void *data EINA_UNUSED, int type EINA_UNUSED, vo
static Eina_Bool
_ecore_evas_sdl_event_lost_focus(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
-{ printf("%s\n", __FUNCTION__);
+{ puts(__FUNCTION__);
Ecore_Sdl_Event_Window *ev = event;
Ecore_Evas *ee;
@@ -106,17 +106,17 @@ _ecore_evas_sdl_event_video_resize(void *data EINA_UNUSED, int type EINA_UNUSED,
ee->req.w = e->w;
ee->req.h = e->h;
- //evas_output_size_set(ee->evas, e->w, e->h);
- //evas_output_viewport_set(ee->evas, 0, 0, e->w, e->h);
+ evas_output_size_set(ee->evas, e->w, e->h);
+ evas_output_viewport_set(ee->evas, 0, 0, e->w, e->h);
evas_damage_rectangle_add(ee->evas, 0, 0, e->w, e->h);
- ecore_evas_resize(ee, e->w, e->h);
- printf("%s\n", __FUNCTION__);
+
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_ecore_evas_sdl_event_video_expose(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
-{ printf("%s\n", __FUNCTION__);
+{ puts(__FUNCTION__);
Ecore_Sdl_Event_Window *ev = event;
Ecore_Evas *ee;
int w;
@@ -128,7 +128,6 @@ _ecore_evas_sdl_event_video_expose(void *data EINA_UNUSED, int type EINA_UNUSED,
evas_output_size_get(ee->evas, &w, &h);
evas_damage_rectangle_add(ee->evas, 0, 0, w, h);
- ecore_evas_resize(ee, w, h);
return ECORE_CALLBACK_PASS_ON;
}
@@ -159,7 +158,7 @@ _ecore_evas_sdl_event(void *data EINA_UNUSED)
static Eina_Bool
_ecore_evas_sdl_event_window_close(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
-{ printf("%s\n", __FUNCTION__);
+{
Ecore_Sdl_Event_Window *ev = event;
Ecore_Evas *ee;
ee = _ecore_evas_sdl_match(ev->windowID);
@@ -172,7 +171,7 @@ _ecore_evas_sdl_event_window_close(void *data EINA_UNUSED, int type EINA_UNUSED,
static int
_ecore_evas_sdl_init(void* data, int w EINA_UNUSED, int h EINA_UNUSED)
-{ printf("%s\n", __FUNCTION__);
+{
_ecore_evas_init_count++;
// this is pretty bad: poller? and set poll time? pol time is meant to be
// adjustable for things like polling battery state, or amoutn of spare
@@ -222,23 +221,21 @@ _ecore_evas_sdl_free(Ecore_Evas *ee)
_ecore_evas_sdl_shutdown();
ecore_sdl_shutdown();
-
}
static void
_ecore_evas_resize(Ecore_Evas *ee, int w, int h)
-{ printf("%s\n", __FUNCTION__);
+{ puts(__FUNCTION__);
Ecore_Evas_SDL_Switch_Data *swd = (Ecore_Evas_SDL_Switch_Data*)(ee + 1);
- // XXX
- //if ((w == ee->w) && (h == ee->h)) return;
+ if ((w == ee->w) && (h == ee->h))
+ return;
ee->req.w = w;
ee->req.h = h;
ee->w = w;
ee->h = h;
- // XXX
- /* SDL_SetWindowSize(swd->w, w, h); */
+ SDL_SetWindowSize(swd->w, w, h);
evas_output_size_set(ee->evas, ee->w, ee->h);
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
@@ -249,26 +246,23 @@ _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
static void
_ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
{
- if ((ee->x != x) || (ee->y != y))
- {
- ee->req.x = x;
- ee->req.y = y;
- ee->x = x;
- ee->y = y;
- if (ee->func.fn_move) ee->func.fn_move(ee);
- }
+ if ((ee->x == x) && (ee->y == y))
+ return;
+
+ ee->req.x = x;
+ ee->req.y = y;
+ ee->x = x;
+ ee->y = y;
+ if (ee->func.fn_move) ee->func.fn_move(ee);
_ecore_evas_resize(ee, w, h);
}
static void
_ecore_evas_show(Ecore_Evas *ee)
-{ printf("%s\n", __FUNCTION__);
-
+{
ee->prop.withdrawn = EINA_FALSE;
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
- printf("show %d %d\n", ee->w, ee->h);
-
if (ecore_evas_focus_device_get(ee, NULL)) return;
_ecore_evas_focus_device_set(ee, NULL, EINA_TRUE);
evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.