xpra icon
Bug tracker and wiki

Opened 8 months ago

Last modified 2 days ago

#2703 new defect

"Small windows" end up unrelated to window parent

Reported by: stdedos Owned by: stdedos
Priority: minor Milestone: 4.1
Component: server Version: 3.0.x
Keywords: Cc:

Description (last modified by stdedos)

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.

Change History (17)

Changed 8 months ago by stdedos

comment:1 Changed 8 months ago by stdedos

Description: modified (diff)

comment:2 Changed 8 months ago by stdedos

Description: modified (diff)

comment:3 Changed 8 months ago by Antoine Martin

Owner: changed from Antoine Martin to stdedos

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

comment:4 Changed 8 months ago by stdedos

Owner: changed from stdedos to Antoine Martin

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

Last edited 8 months ago by stdedos (previous) (diff)

comment:5 Changed 7 months ago by Antoine Martin

Milestone: 4.04.1
Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned

comment:6 Changed 7 months ago by Antoine Martin

Owner: changed from Antoine Martin to stdedos
Status: assignednew

Sounds like a duplicate of #2595.

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

comment:7 Changed 2 days ago by Antoine Martin

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

(from the latest of the v3 branch)

Bump.

comment:8 Changed 2 days ago by 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?

comment:9 Changed 2 days ago by 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.

comment:10 Changed 2 days ago by 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

comment:11 Changed 2 days ago by 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
Last edited 2 days ago by stdedos (previous) (diff)

comment:12 Changed 2 days ago by 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

comment:13 Changed 2 days ago by stdedos

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

Some comments:

  • It also happens when I have one window of the app open similarly
  • As with the original screenshot, some small windows (toasts) follow / are anchored to the parent, the "extended progress bar" doesn't/isn't
  • It is interesting/nice that the app remembers exactly in which monitor and with what dimensions it was open last time with (although I don't know if that's somehow your doing or the app's)

Changed 2 days ago by stdedos

Note: See TracTickets for help on using tickets.