Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Shell.getFocusControl

Hi Thomas,

You understand correctly. Keyboard focus is a global property, parent shell of a focused control is active by definition.

Cocoa and GTK do remember and restore focused controls of inactive shells, but SWT uses its own focus saving and restoring on all platforms.
(Probably because it interacts with tab order which is also emulated by SWT.)


Best regards,
Nikita Nemkin

On Mon, Jul 16, 2018 at 6:13 PM, Thomas Singer <ts-swt@xxxxxxxxxxx> wrote:
Hi Nikita,

Thank you for your answer.

Do I understand it correctly, that there is no way to set a focus control without activating the parent shell on the system level? So on Windows, macOS and/or GTK no focused control is remembered on a deactivated shell and only is restored by SWT?

--
Best regards,
Thomas Singer
=============
syntevo GmbH
https://www.syntevo.com
https://www.syntevo.com/blog


On 2018-07-16 14:46, Nikita Nemkin wrote:
Hi Thomas,

The preferred way is to hook shell Activate event and set the desired focus
at activation time. Until the shell is active, just save the pending
focus control
reference somewhere.

Focus control of an inactive shell is not a system level concept, it's
something that SWT does manually (see Decorations.savedFocus). Maybe that's
why there's no public API.


Best regards,
Nikita Nemkin



_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top