Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rtlprmft

Pages: [1]
1
Window / Re: How to 'suspend' fullscreen mode?
« on: May 14, 2024, 10:42:05 am »
Thanks for the reply. I am using Ubuntu 22.04 with KDE Plasma 5 and Qt 5 on X11.

I actually have another strange problem with the mouse. I use a hotkey to enable mouse grabbing and make it invisible, and the another hot key to release mouse grabbing and make it visible again. Turning this feature (invisible/grabbed) on and off works perfectly when used the first time. The second time I turn it on, the mouse becomes invisible but is not grabbed (so moves visibly out of the window once the window border is crossed, although invisible in the window).

I have tried many different ways to solve that (different order of the calls to setVisible and setMouseCursorGrabbed), doing it in Gained-/LostFocus instead of the hotkey handler. The only thing that made the mousegrab feature work again, was to minimize the window in between turning it off an on again.

I am mentioning that because it might be related.

2
Window / How to 'suspend' fullscreen mode?
« on: May 13, 2024, 08:35:32 pm »
I have switched my SFML window to fullscreen mode (desktop resolution). If, for example, I switch application (Alt-Tab), my application is still visible in the background, but the window of the new application overlays it and is usable. Now instead of switching away, I want to switch to a gkt2 window (gtk native file dialog) from my SFML application.  The gtk2 window is properly displayed and I can use the keyboard to interact with it, however, it does not see any mouse events. This make a file selection dialog quite unusable. The most obvious solution is to switch back to windowed mode, but this seem a lot of code for not real purpose. Instead, I would prefer to have an option to "suspend" fullscreen mode properly, either (like in the alt-tab case) with my application still in the background or by minimizing my application until the modal gtk2 dialog has finished. I tried to use setVisible(false), but the only difference is that now the task-bar overlaps the SFML application graphics in the background - but there is still no mouse event passed through to the gtk2 dialog window.

I read in the docs, that in fullscreen the mouse is always grabbed. I assume that this is what interferes here. So if there is no way to minimize a fullscreen window (setVisible(false)), maybe there could be a way to suspend mouse grabbing in fullscreen mode. Using setMouseCursorGrabbed(false) obviously won't work, because it is ignored in fullscreen mode.

Pages: [1]