Xpra: Ticket #2703: "Small windows" end up unrelated to window parent

Same looking ticket as #2697, but somewhat different

With monitor layout

Small windows open outside of their parent. See the other attachment for explanation (it's too big to display here).

This happens for all sorts of actions (background indexing, Find Action/File/Module/Find in Path), sometimes (sometimes they are closer to their original position, but not quite). Their original intent is to pop upwards/downwards (depending on window boundaries, e.g. for background indexing) of at window's center \(for the rest). Note that this centers the window (which starts as one toolbar with one textbox), according to its "maximum size", so that it won't look awkward when it's populated with results (1).

Also sometimes it happens that the small windows might open in-between monitor borders - I assume this is because you create the server as one big monitor, which is the bounding box of the monitors. Because Windows "think" they are maximized (#2643, #2651), the center-ish position (1) is at monitor's intersection.



Thu, 02 Apr 2020 08:10:29 GMT - stdedos: attachment set


Thu, 02 Apr 2020 08:10:42 GMT - stdedos: attachment set


Thu, 02 Apr 2020 08:17:20 GMT - stdedos: attachment set


Thu, 02 Apr 2020 08:22:21 GMT - stdedos: description changed


Thu, 02 Apr 2020 08:23:58 GMT - stdedos: description changed


Fri, 03 Apr 2020 08:15:02 GMT - Antoine Martin: owner changed

Assuming that this is one of the problematic windows from your log, this looks a little bit suspicious:

10:13:00,156 WindowModel.do_xpra_configure_event(<X11:ConfigureNotify \
    {'serial': '0x1588e', 'y': '31', 'x': '1608', 'border_width': '0', \
     'above': '2098754', 'delivered_to': '0x400029', 'height': '668', \
     'window': '0x400029', 'width': '1278', 'send_event': '0'}>) \
    corral=0x400029, client=0x20004d, managed=True
10:13:00,156 WindowModel.do_xpra_configure_event: event is on the corral window 0x400029, ignored

Then the client honours the original position:

10:13:01,134 transient-for=3 : WindowModel(0x20004d), ws=WindowVideoSource(3 : (1278, 668)), pos=(1608, 31)
10:13:01,165 client   4 @28.180 process_new_common: wid=47, OR=True, geometry([2235, 383, 325, 221])=(2235, 383, 325, 221) / (325, 221)
10:13:01,178 client   4 @28.187 set_decorated(True) re-adjusting window location using {'normal': (8, 8), 'fixed': (3, 3), 'minimum': (136, 39), 'menu-bar': 20, 'border': 1, 'caption': 23, 'offset': (8, 31), 'frame': (8, 8, 31, 8)}
10:13:01,179 client   4 @28.190 setup_window() position=(2235, 383), set_initial_position=False, OR=True, decorated=True
10:13:01,181 client   4 @28.193 after removing areas visible on (Standard monitor types) Generic PnP Monitor from [R(2235, 383, 325, 221)]: [R(2235, 383, 325, 221)]
10:13:01,181 client   4 @28.197 after removing areas visible on (Standard monitor types) C32JG5x from [R(2235, 383, 325, 221)]: []
10:13:01,185 client   4 @28.198 OR offsets=None

So the client is just doing what it's told. The server is ignoring configure events on other windows since r5804 (6 years ago!).

You could try removing the checks to see if that helps:

Index: xpra/x11/models/window.py
===================================================================
--- xpra/x11/models/window.py	(revision 25905)
+++ xpra/x11/models/window.py	(working copy)
@@ -480,15 +480,6 @@
                 event, cxid, self.xid, self._managed)
         if not self._managed:
             return
-        if event.window==self.corral_window:
-            #we only care about events on the client window
-            geomlog("WindowModel.do_xpra_configure_event: event is on the corral window %#x, ignored", cxid)
-            return
-        if event.window!=self.client_window:
-            #we only care about events on the client window
-            geomlog("WindowModel.do_xpra_configure_event: event is not on the client window but on %#x, ignored",
-                    event.window.get_xid())
-            return
         if self.corral_window is None or not self.corral_window.is_visible():
             geomlog("WindowModel.do_xpra_configure_event: corral window is not visible")
             return

Fri, 03 Apr 2020 20:21:00 GMT - stdedos: owner changed

That causes too many bad things: one of them looks like this:

http://xpra.org/trac/raw-attachment/ticket/2455/Xpra_cmd_2019-10-19_12-25-26.png (the "filling" on the right side)

and the windows are inoperable in general.

Apart from that, the patch does not apply at all on v3/Xenial


Fri, 08 May 2020 14:22:01 GMT - Antoine Martin: owner, status, milestone changed


Sat, 09 May 2020 05:54:37 GMT - Antoine Martin: owner, status changed

Sounds like a duplicate of #2595.

Does the problem occur when using the python2 / GTK2 builds?


Tue, 01 Dec 2020 09:18:55 GMT - Antoine Martin:

Does the problem occur when using the python2 / GTK2 builds?

(from the latest of the v3 branch)

Bump.


Tue, 01 Dec 2020 09:21:48 GMT - stdedos:

Oops 😅

Do you have any recent builds with Py2? Or should I just downgrade? I assume we are talking about the client ... right? "Should I expect" that downgrading the client will mess something on the server?


Tue, 01 Dec 2020 09:32:09 GMT - Antoine Martin:

Do you have any recent builds with Py2? Or should I just downgrade?

You have to use the latest release from the 3.0.x branch, ie at time of writing: Xpra-Client-Python2-x86_64_3.0.12-r27627.zip.

I assume we are talking about the client ... right?

Yes

"Should I expect" that downgrading the client will mess something on the server?

I don't see how it could.


Tue, 01 Dec 2020 09:36:29 GMT - stdedos:

FYI client builds have no signatures or hashes. You may want to add them at least for the latest one.

Going testing, but don't hold your breath :-D


Tue, 01 Dec 2020 10:42:14 GMT - stdedos:

"Xpra-Client-Python2-x86_64_3.0.12-r27627\xpra_cmd" attach ssh://user@ip/3 --ssh="plink -ssh -agent" --modal-windows=no --title="@title@ on @@/@server-display@" --headerbar=off --opengl=no --bandwidth-limit=6Mbps
XPRA_CUSTOM_TITLE_BAR=0
XPRA_EXECUTABLE=Xpra-Client-Python2-x86_64_3.0.12-r27627
XPRA_REPAINT_ALL=1
XPRA_SCROLL_ENCODING=0
xpra initialization error:
 no such option: --headerbar

But I guess that's expected, right?

Also:

"Xpra-Client-Python2-x86_64_3.0.12-r27627\xpra_cmd" attach ssh://user@ip/3 --ssh="plink -ssh -agent" --modal-windows=no --title="@title@ on @@/@server-display@" --opengl=no --bandwidth-limit=6Mbps
XPRA_CUSTOM_TITLE_BAR=0
XPRA_EXECUTABLE=Xpra-Client-Python2-x86_64_3.0.12-r27627
XPRA_REPAINT_ALL=1
XPRA_SCROLL_ENCODING=0
2020-12-01 12:42:37,837 Xpra GTK2 client version 3.0.12-r27627 64-bit
2020-12-01 12:42:37,845  running on Microsoft Windows 10
2020-12-01 12:42:37,901 Warning: failed to import opencv:
2020-12-01 12:42:37,902  No module named cv2
2020-12-01 12:42:37,902  webcam forwarding is disabled
Warning: failed to import GStreamer 1.x:
 cannot import name _gi
2020-12-01 12:42:38,867 Error: failed to query sound subsystem:
2020-12-01 12:42:38,867  query did not return any data
2020-12-01 12:42:39,110 keyboard layout code 0x409

Tue, 01 Dec 2020 11:33:29 GMT - Antoine Martin:

no such option: --headerbar But I guess that's expected, right?

Correct.

Warning: failed to import GStreamer 1.x:

Known issue, now with its own ticket: #2961


Tue, 01 Dec 2020 13:13:02 GMT - stdedos:

Still happens, although I replicated it a little differently (check attachment).

Some comments:


Tue, 01 Dec 2020 13:13:19 GMT - stdedos: attachment set


Mon, 28 Dec 2020 14:40:22 GMT - Antoine Martin: owner, status, milestone changed


Sat, 23 Jan 2021 05:58:31 GMT - migration script:

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