Re: [hatari-devel] Hatari window embedding issue

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 12/19/20 5:14 PM, Jens Guenther wrote:
Eero Tamminen <oak@xxxxxxxxxxxxxx> wrote:
Unfortunately I cannot reproduce it.

After testing various distros and SDL2 versions (2.0.5 - 2.0.12) on the
same machine (no VMs), it seems that the issue is reproducible when the
OpenBox window manager is used (default on "ArcoLinux" & "BunsenLabs").

With Desktop Environments like Cinnamon, MATE and Xfce it works without
showing the black area in "hatariui" when toggling fullscreen mode. But
sometimes "hatariui" loses focus and ignores key input events ...

Isn't it enough to click hatariui window again to
get it focused again?


To me this looks like some "synchronisation issue" when using XReparent
Window. On one machine an additional "XSync(display, false)" before the
XReparentWindow function seems to help ...

Could you try with the attached patch?

On my setup, SDL2 doesn't map its window any more
to screen before its reparented (which looked ugly) with it, Hatari window becomes visible only
when its inserted to GtkSocket.

I.e. even on my setup its improvement to how
things work now.

If that doesn't help, enable also the other option
listed in the patch (Popup = override redirect
window i.e. something WM shouldn't touch).


While testing, "Trisquel Flidas" (Ubuntu 16.04 LTS based) complains on:
monitor  = Gdk.Display.get_default().get_primary_monitor()

What's the complaint?


	- Eero
diff --git a/src/screen.c b/src/screen.c
index b762f1e2..8d7f8933 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -451,7 +451,7 @@ bool Screen_SetSDLVideoSize(int width, int height, int bitdepth, bool bForceChan
 	{
 		int deskw, deskh;
 		if (getenv("PARENT_WIN_ID") != NULL)	/* Embedded window? */
-			sdlVideoFlags = SDL_WINDOW_BORDERLESS;
+			sdlVideoFlags = SDL_WINDOW_BORDERLESS|SDL_WINDOW_HIDDEN; //|SDL_WINDOW_POPUP_MENU;
 		else if (ConfigureParams.Screen.bResizable && bUseSdlRenderer)
 			sdlVideoFlags = SDL_WINDOW_RESIZABLE;
 		else


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/