Xpra: Ticket #378: JBidWatcher with xpra 0.9.6 not fully working

I'm using the latest version of JBidWatcher with 0.9.6 server, trunk client.

When clicking on the "test login" button, I suspect this is supposed to display a window. Instead, what I get is the following error message in the client's console:

Traceback (most recent call last):
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/ui_client_base.py", line 988, in _process_new_window
    self._process_new_common(packet, False)
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/ui_client_base.py", line 965, in _process_new_common
    self.make_new_window(wid, x, y, w, h, metadata, override_redirect, client_properties, auto_refresh_delay)
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/ui_client_base.py", line 973, in make_new_window
    window = ClientWindowClass(self, group_leader_window, wid, x, y, w, h, metadata, override_redirect, client_properties, auto_refresh_delay)
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/client_window_base.py", line 41, in __init__
    self.init_window(metadata)
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/gtk2/client_window.py", line 72, in init_window
    GTKClientWindowBase.init_window(self, metadata)
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/gtk_base/gtk_client_window_base.py", line 50, in init_window
    ClientWindowBase.init_window(self, metadata)
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/client_window_base.py", line 54, in init_window
    self.update_metadata(metadata)
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/client_window_base.py", line 183, in update_metadata
    self.set_window_type(window_types)
  File "/mnt/data/src/xpra/src/build/lib.linux-x86_64-2.7/xpra/client/client_window_base.py", line 216, in set_window_type
    self.set_type_hint(hint)
TypeError: enum values must be strings or ints

The server's log doesn't have any error message.

Help appreciated.



Fri, 12 Jul 2013 15:59:39 GMT - ahuillet: description changed


Fri, 12 Jul 2013 16:01:12 GMT - ahuillet:

With debug log, this is what is being attempted on the window:

2013-07-12 18:00:47,588 setting window type to NORMAL - <enum GDK_WINDOW_TYPE_HINT_NORMAL of type GdkWindowTypeHint>
2013-07-12 18:00:47,592 setting window type to NORMAL - <enum GDK_WINDOW_TYPE_HINT_NORMAL of type GdkWindowTypeHint>
2013-07-12 18:00:47,634 setting window type to _NET_WM_TYPE_DIALOG - None

Fri, 12 Jul 2013 16:03:41 GMT - ahuillet:

Worked around with the following patch:

diff --git a/src/xpra/client/client_window_base.py b/src/xpra/client/client_window_base.py
index 2d57c7c..3526e0e 100644
--- a/src/xpra/client/client_window_base.py
+++ b/src/xpra/client/client_window_base.py
@@ -213,6 +213,8 @@ class ClientWindowBase(ClientWidgetBase):
             if hint:
                 hints |= hint
         self.debug("setting window type to %s - %s", window_type, hint)
+        if hint == None:
+                return
         self.set_type_hint(hint)
     def set_fullscreen(self, fullscreen):

Sat, 13 Jul 2013 04:32:38 GMT - Antoine Martin: owner changed

Please read: r3844 (more complicated than it seems)

Did this also occur with trunk before this change? If this change fixes it, I will backport, please confirm.

Note: very hard to test here because of the DPI issue with Java apps, how did you workaround that for testing?


Sat, 13 Jul 2013 08:04:10 GMT - ahuillet:

r3844 confirmed working. I didn't have to do anything related to DPI - things worked out of the box.


Sat, 13 Jul 2013 08:12:43 GMT - ahuillet:

By the way, your commit message in r3844 suggests that jbidwatcher might be using a wrong atom - but _NET_WM doesn't even appear in jbidwatcher. I thought I could patch jbidwatcher but I'm not sure it's really to blame. I think the function call is:

src/com/jbidwatcher/ui/util/OptionUI.java:    otherFrame.getRootPane().setWindowDecorationStyle(JRootPane.QUESTION_DIALOG);

I think it calls into a java lib, not the app itself.


Sat, 13 Jul 2013 11:14:17 GMT - Antoine Martin: status changed; resolution, milestone set

Thanks - will backport to v0.9.x


jbidwatcher is using a java toolkit (looks like "swing"), so the toolkit will translate QUESTION_DIALOG into whatever platform-specific value is required, in this case it should be using _NET_WM_WINDOW_TYPE_DIALOG for X11, but seems to be using _NET_WM_TYPE_DIALOG.
I cannot find anywhere in the spec that this value is acceptable, see EWMH _NET_WM_WINDOW_TYPE. In fact, a google search turns up next to nothing when using _NET_WM_TYPE instead of _NET_WM_WINDOW_TYPE. (there is one mention in the spec of _NET_WM_TYPE_DESKTOP but it looks like a typo, or maybe an old version of the spec)


In any case, our latest code will accept both.


Sat, 23 Jan 2021 04:53:34 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/378