Closed totaam closed 5 years ago
First, as I keep having to repeat this, I really hope that you already know that you should not be using the form:
DISPLAY=:NN someapp
To start applications on the xpra display, always use
xpra start --start=someapp
instead. If the command is a shell command, you can wrap it:--start="sh -c 'whatever shell command goes here'"
As for the bug. Running the client with
-d metadata
, we can see the kaptain window coming up:process_new_common: [4, 0, 0, 104, 97, {b'xid': b'0xc00003', b'client-machine': b'desktop', b'pid': 25991, b'title': b'kaptain', \ b'class-instance': (b'kaptain', b'Kaptain'), b'group-leader-xid': 12582917, b'window-type': (b'DIALOG', b'NORMAL'), \ b'size-constraints': {b'gravity': 1, b'minimum-size': (104, 97)}, b'icon-title': b'', b'decorations': 30, b'modal': True, \ b'iconic': False}], ..., OR=False
It is a
DIALOG
modal
window, and so it will capture all input until dismissed. For details see #1895.When forwarding multiple applications through the same xpra connection and one of the windows is modal, you need to tell xpra not to honour the modal flag for that session:
xpra attach --modal-windows=no
FYI: the latest GTK API (Gtk.Window.set_modal) still does not allow more fine grained settings than just on and off. (qt does: WindowModality but even then we wouldn't be able to specify which windows this needs to apply to).
Great, thank you! --modal-windows=no fixed it for me.
First, as I keep having to repeat this, I really hope that you already know that you should not be using the form: DISPLAY=:NN someapp
I am aware of that. However, in the context of x11docker that is not possible because the applications run in an isolated container that xpra cannot access. At least x11docker sets the environment variables that xpra sets for its clients.
Thank you for giving some insight, too! It helps me to understand what is going on.
Though, I am wondering why the issue does not appear if I run kaptain on other X servers or on display :0. I've also tried a few different window managers (kwin, xfwm4, openbox). Maybe it is common to ignore the modal flag, and only xpra honours it by default.
Just an idea: You could allow XPRA_MODAL_WINDOWS=0 to set --modal-windows=no.
Maybe it is common to ignore the modal flag, and only xpra honours it by default. They do honour it, but this modal flag is per application - it just so happens that xpra ends up being multiple applications that the window manager sees as just one.
Just an idea: You could allow XPRA_MODAL_WINDOWS=0 to set --modal-windows=no.
XPRA_MODAL_WINDOWS
has been removed earlier today.
They do honour it.. Looking at the GTK source code, they're not actually given the choice: the "modal" behaviour is enforced by GTK, it uses X11 grabs to do so.
gtk_grab_add
: Makes @widget the current grabbed widget. This means that interaction with other widgets in the same application is blocked and mouse as well as keyboard events are delivered to this widget. If @widget is not sensitive, it is not set as the current grabbed widget and this function does nothing.
Thanks for the additional information.
They do honour it, but this modal flag is per application - it just so happens that xpra ends up being multiple applications that the window manager sees as just one.
That makes sense, good to know.
Just a note:
man xpra
does not show option--modal-windows
.
xpra --help
shows:--modal-windows=MODAL_WINDOWS Honour modal windows. Default: 'True'.
Issue migrated from trac ticket # 2255
component: client | priority: minor | resolution: invalid
2019-04-04 17:17:50: mviereck created the issue