Xpra: Ticket #2486: macos client: connection form and password dialog usually open behind other windows

Using macos client, xpra v3.0.2-r24371 python2.7 64bit on macos 10.13.6 (High Sierra) and server version on centos-6, xpra v1.0.14-r24088 (xpra.x86_64 1.0.14-1.r24088.el6_6).

I launch client connection-form from a dot-xpra file in the Dock (without autoconnect). The form typically displays behind other windows. I usually just click the dock-icon again to raise it.

When I make connection (ssh), if it needs to prompt for a password, that dialogue is even behind the connection-form itself (both centered, so connection form always nicely hides the password dialogue).

Can take me a short while staring stupidly at the screen to recall this issue (vs believing its connecting but just being slow to show any change on screen).

This is a minor annoyance.



Mon, 18 Nov 2019 06:08:57 GMT - sto6: summary changed


Mon, 18 Nov 2019 09:22:27 GMT - Antoine Martin: owner changed

That's because macos requires NSApp.activateIgnoringOtherApps_ to honour window focus requests (GTK does not provide a wrapper for this - and when we ask to show a window... it doesn't), as per r15606 (also in platform_window_focus.py - same but via ctypes)

r24436 (+r24437 + r24439 fixups, +r24438 needed for v4 only) does this for the password and confirmation dialogs used by ssh.

Backport to v3 in r24440.

@sto6: does this work for you? Updated beta builds for v4.0 can be found here: https://xpra.org/beta/MacOS/


Mon, 18 Nov 2019 15:50:15 GMT - Antoine Martin: status changed; resolution set

I have also uploaded a python3 3.0.3-RC build: https://xpra.org/beta/MacOS/.

Works for me with both branches so closing this ticket. Feel free to re-open if you still have problems.


Mon, 02 Dec 2019 05:58:26 GMT - sto6:

confirming in Xpra-Python3-x86_64-3.0.3-r24467.pkg password dialogue is now in front. Thanks.

I take it, the reference to r15606 means NOT that I could set an env-var to get initial launcher form displayed in front; rather there is no solution for the foreseeable future?

wow, 'xpra launcher <file>' works now (i.e. accepting and using a file argument to seed the launcher form; though help does not show it)?

FYI: focus observations on using r24467:

If I launch from cmd-line with my dot-xpra file: the form does NOT get focus.

If I launch from a dot-xpra file in the dock (my usual/historical method), it does NOT get focus.

But if I run Xpra.app from Finder, or "xpra launcher" (no arg), the initial GUI display DOES get focus (i.e. for the latter an empty launcher form).

i.e. So tantalizingly close, but still none of them focus a launcher-form that was seeded from a file. Too much to hope that the r15606 workaround simply needs to also be applied in another place?


Mon, 02 Dec 2019 15:07:35 GMT - Antoine Martin: summary changed

wow, 'xpra launcher <file>' works now (i.e. accepting and using a file argument to seed the launcher form;

Cool.

though help does not show it)?

What help?

FYI: you can skip seeing the launcher dialog GUI and connect directly by adding the magic value autoconnect=yes to your .xpra session files.

If I launch from cmd-line with my dot-xpra file: the form does NOT get focus.

What exact command line are you using? Something like this?:

xpra_launcher ~/session.xpra

So I assume that you've installed the PKG and not the DMG?

This should also have worked:

/Applications/Xpra.app/Contents/Helpers/Launcher ~/session.xpra

But:

If I launch from a dot-xpra file in the dock (my usual/historical method)

How do I do that?

it does NOT get focus.

(this may also have been fixed by r24569)


Fri, 06 Dec 2019 03:15:56 GMT - sto6:

Yes, I install from .pkg versions, and delete the old app first (though that doesn't delete the /usr/local/ parts).

When I referred to cmd-line launcher now works with file arg, using r24467 (i.e. before r24570?!) I was using: Xpra launcher ~/session.xpra. The help I referred to was: Xpra --help, the one line for launcher does not show support of an optional filename argument.

For associating filetypes with an app in macos see: https://support.apple.com/guide/mac-help/choose-an-app-to-open-a-file-on-mac-mh35597/mac then you can drop specific .xpra launcher files in the dock to launch from it.


Fri, 06 Dec 2019 05:53:47 GMT - Antoine Martin:

For associating filetypes with an app in macos see:

The launcher should already be associated with .xpra files if you installed from the PKG.

then you can drop specific .xpra launcher files in the dock to launch from it.

That's the bit that I was missing.


Sat, 23 Jan 2021 05:52:36 GMT - migration script:

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