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 1ddeb72f36fc20fef4483562124a534c615f192d
Author: Swagtoy <[email protected]>
AuthorDate: Tue May 12 03:51:30 2026 -0400

    ecore_evas_sdl: make resizing work
    
    but break the initial window size in the process. I will fix this later...
    
    Signed-off-by: Swagtoy <[email protected]>
---
 .../ecore_evas/engines/sdl/ecore_evas_sdl.c        | 24 ++++++++++++++--------
 1 file changed, 15 insertions(+), 9 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 9957fbfda5..852e124a4b 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -91,7 +91,7 @@ _ecore_evas_sdl_event_lost_focus(void *data EINA_UNUSED, int type EINA_UNUSED, v
 
 static Eina_Bool
 _ecore_evas_sdl_event_video_resize(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
-{ printf("%s\n", __FUNCTION__);
+{
    Ecore_Sdl_Event_Video_Resize *e;
    Ecore_Evas *ee;
    int rmethod;
@@ -106,9 +106,11 @@ _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__);
    return ECORE_CALLBACK_PASS_ON;
 }
 
@@ -126,6 +128,7 @@ _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;
 }
@@ -137,6 +140,7 @@ _ecore_evas_sdl_post_render(Ecore_Evas *ee)
    Ecore_Evas_SDL_Switch_Data *swd = (Ecore_Evas_SDL_Switch_Data*) (ee + 1);
    // XXX: this is not sufficient at all
    SDL_Surface *surface = SDL_GetWindowSurface(swd->w);
+   printf("surface: %d %d | other %d %d\n", surface->w, surface->h, info->surface->w, info->surface->h);
    if (!SDL_BlitSurface(info->surface, NULL, surface, NULL))
      ERR("Couldn't blit surface: %s", SDL_GetError());
    if (!SDL_UpdateWindowSurface(swd->w))
@@ -226,13 +230,15 @@ _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
 { printf("%s\n", __FUNCTION__);
    Ecore_Evas_SDL_Switch_Data *swd = (Ecore_Evas_SDL_Switch_Data*)(ee + 1);
 
-   if ((w == ee->w) && (h == ee->h)) return;
+   // XXX
+   //if ((w == ee->w) && (h == ee->h)) return;
    ee->req.w = w;
    ee->req.h = h;
    ee->w = w;
    ee->h = h;
 
-   SDL_SetWindowSize(swd->w, w, h);
+   // XXX
+   /* 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);
@@ -403,9 +409,9 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
    ee->prop.max.w      = 0;
    ee->prop.max.h      = 0;
    ee->prop.layer      = 0;
-   ee->prop.borderless = EINA_TRUE;
+   ee->prop.borderless = EINA_FALSE;
    ee->prop.override   = EINA_TRUE;
-   ee->prop.maximized  = EINA_TRUE;
+   ee->prop.maximized  = EINA_FALSE;
    ee->prop.fullscreen = fullscreen;
    ee->prop.withdrawn  = EINA_TRUE;
    ee->prop.sticky     = EINA_FALSE;
@@ -425,7 +431,7 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
    evas_output_method_set(ee->evas, rmethod);
    ee->can_async_render = gl ? EINA_FALSE : EINA_TRUE;
 
-   swd->w = SDL_CreateWindow(name, w+500, h+500, SDL_WINDOW_RESIZABLE);
+   swd->w = SDL_CreateWindow(name, w, h, SDL_WINDOW_RESIZABLE);
    if (!swd->w)
      {
         ERR("SDL_CreateWindow failed: %s", SDL_GetError());

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to