xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Closed 3 weeks ago

Last modified 5 days ago

#2486 closed defect (fixed)

macos client: connection form and password dialog usually open behind other windows

Reported by: sto6 Owned by: sto6
Priority: minor Milestone: 4.0
Component: client Version: 3.0.x
Keywords: Cc:

Description

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.

Change History (7)

comment:1 Changed 3 weeks ago by sto6

Summary: macos client: connection form and password dialgue usually open behind other windowsmacos client: connection form and password dialogue usually open behind other windows

comment:2 Changed 3 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to sto6

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/

comment:3 Changed 3 weeks ago by Antoine Martin

Resolution: fixed
Status: newclosed

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.

comment:4 Changed 9 days ago by 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?

comment:5 Changed 9 days ago by Antoine Martin

Summary: macos client: connection form and password dialogue usually open behind other windowsmacos client: connection form and password dialog usually open behind other windows

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:

  • r24569 fixes the focus problem
  • r24570 fixes the launcher script

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)

comment:6 Changed 5 days ago by 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.

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

Note: See TracTickets for help on using tickets.