Is it possible to catch ALT+TAB and do nothing

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to catch ALT+TAB and do nothing

Igor Korot
 Hi, ALL,
Is it possible to catch the ALT+TAB when one particular window is
displayed and do nothing, i.e. not switch to a different window?

We have a program which displays a full sized window without the
title. Its role is to Lock screen" - user should not be able to do
anything until (s)he supplies password and hit the "Authenticate"
button.
problem is that t is possible to hit "ALT+TAB" and switch the focus to
the window below it (such as Terminal) and type something.

We also can't use the lock screen window because of some other issues.

So is it possible to catch ALT+TAB and do nothing for one specific window?

On the side note - is there a better list (with more traffic) where I
can post  question like this? Or this list is still good and
operational?

Thank you.
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

Paul Davis
If there is a window manager (and there just about always is), you can't stop it from doing what it is configured to do. You're just an application, and it takes higher priority managing window events than you.

On Mon, May 7, 2018 at 12:01 PM, Igor Korot <[hidden email]> wrote:
 Hi, ALL,
Is it possible to catch the ALT+TAB when one particular window is
displayed and do nothing, i.e. not switch to a different window?

We have a program which displays a full sized window without the
title. Its role is to Lock screen" - user should not be able to do
anything until (s)he supplies password and hit the "Authenticate"
button.
problem is that t is possible to hit "ALT+TAB" and switch the focus to
the window below it (such as Terminal) and type something.

We also can't use the lock screen window because of some other issues.

So is it possible to catch ALT+TAB and do nothing for one specific window?

On the side note - is there a better list (with more traffic) where I
can post  question like this? Or this list is still good and
operational?

Thank you.
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list


_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

Igor Korot
Hi, Paul,

On Mon, May 7, 2018 at 11:42 AM, Paul Davis <[hidden email]> wrote:
> If there is a window manager (and there just about always is), you can't
> stop it from doing what it is configured to do. You're just an application,
> and it takes higher priority managing window events than you.

Yes, we are using FVWM as WM.
I got a suggestion to write a function for this WM to stop the
Terminal to appear
when our Lock Screen is active, but here no one is familiar enough with this WM
to write such a function.

And I guess a different route is just not possible.

And I would also guess that even if I put the "stay on top" flag,
pressing the ALT+TAB will
definitely switch the focus. Am I correct?

Thank you.

>
> On Mon, May 7, 2018 at 12:01 PM, Igor Korot <[hidden email]> wrote:
>>
>>  Hi, ALL,
>> Is it possible to catch the ALT+TAB when one particular window is
>> displayed and do nothing, i.e. not switch to a different window?
>>
>> We have a program which displays a full sized window without the
>> title. Its role is to Lock screen" - user should not be able to do
>> anything until (s)he supplies password and hit the "Authenticate"
>> button.
>> problem is that t is possible to hit "ALT+TAB" and switch the focus to
>> the window below it (such as Terminal) and type something.
>>
>> We also can't use the lock screen window because of some other issues.
>>
>> So is it possible to catch ALT+TAB and do nothing for one specific window?
>>
>> On the side note - is there a better list (with more traffic) where I
>> can post  question like this? Or this list is still good and
>> operational?
>>
>> Thank you.
>> _______________________________________________
>> gtk-list mailing list
>> [hidden email]
>> https://mail.gnome.org/mailman/listinfo/gtk-list
>
>
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

Paul Davis
the window manager can intervene to catch more or less any key combinations the user has told it to be interested in. if the user told it use Alt-Tab for focus switching, it will catch that. you can't stop it.

On Mon, May 7, 2018 at 12:52 PM, Igor Korot <[hidden email]> wrote:
Hi, Paul,

On Mon, May 7, 2018 at 11:42 AM, Paul Davis <[hidden email]> wrote:
> If there is a window manager (and there just about always is), you can't
> stop it from doing what it is configured to do. You're just an application,
> and it takes higher priority managing window events than you.

Yes, we are using FVWM as WM.
I got a suggestion to write a function for this WM to stop the
Terminal to appear
when our Lock Screen is active, but here no one is familiar enough with this WM
to write such a function.

And I guess a different route is just not possible.

And I would also guess that even if I put the "stay on top" flag,
pressing the ALT+TAB will
definitely switch the focus. Am I correct?

Thank you.

>
> On Mon, May 7, 2018 at 12:01 PM, Igor Korot <[hidden email]> wrote:
>>
>>  Hi, ALL,
>> Is it possible to catch the ALT+TAB when one particular window is
>> displayed and do nothing, i.e. not switch to a different window?
>>
>> We have a program which displays a full sized window without the
>> title. Its role is to Lock screen" - user should not be able to do
>> anything until (s)he supplies password and hit the "Authenticate"
>> button.
>> problem is that t is possible to hit "ALT+TAB" and switch the focus to
>> the window below it (such as Terminal) and type something.
>>
>> We also can't use the lock screen window because of some other issues.
>>
>> So is it possible to catch ALT+TAB and do nothing for one specific window?
>>
>> On the side note - is there a better list (with more traffic) where I
>> can post  question like this? Or this list is still good and
>> operational?
>>
>> Thank you.
>> _______________________________________________
>> gtk-list mailing list
>> [hidden email]
>> https://mail.gnome.org/mailman/listinfo/gtk-list
>
>


_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

Igor Korot
Paul et al,
Any idea how to configure FVWM to not to give focus to xterm if one
specific window is displayed?

I tried:

[code]
Key <my_window_name> Tab A M WindowList("!xterm")
[/code]

but it doesn't work.

Thank you.


On Mon, May 7, 2018 at 12:44 PM, Paul Davis <[hidden email]> wrote:

> the window manager can intervene to catch more or less any key combinations
> the user has told it to be interested in. if the user told it use Alt-Tab
> for focus switching, it will catch that. you can't stop it.
>
> On Mon, May 7, 2018 at 12:52 PM, Igor Korot <[hidden email]> wrote:
>>
>> Hi, Paul,
>>
>> On Mon, May 7, 2018 at 11:42 AM, Paul Davis <[hidden email]>
>> wrote:
>> > If there is a window manager (and there just about always is), you can't
>> > stop it from doing what it is configured to do. You're just an
>> > application,
>> > and it takes higher priority managing window events than you.
>>
>> Yes, we are using FVWM as WM.
>> I got a suggestion to write a function for this WM to stop the
>> Terminal to appear
>> when our Lock Screen is active, but here no one is familiar enough with
>> this WM
>> to write such a function.
>>
>> And I guess a different route is just not possible.
>>
>> And I would also guess that even if I put the "stay on top" flag,
>> pressing the ALT+TAB will
>> definitely switch the focus. Am I correct?
>>
>> Thank you.
>>
>> >
>> > On Mon, May 7, 2018 at 12:01 PM, Igor Korot <[hidden email]> wrote:
>> >>
>> >>  Hi, ALL,
>> >> Is it possible to catch the ALT+TAB when one particular window is
>> >> displayed and do nothing, i.e. not switch to a different window?
>> >>
>> >> We have a program which displays a full sized window without the
>> >> title. Its role is to Lock screen" - user should not be able to do
>> >> anything until (s)he supplies password and hit the "Authenticate"
>> >> button.
>> >> problem is that t is possible to hit "ALT+TAB" and switch the focus to
>> >> the window below it (such as Terminal) and type something.
>> >>
>> >> We also can't use the lock screen window because of some other issues.
>> >>
>> >> So is it possible to catch ALT+TAB and do nothing for one specific
>> >> window?
>> >>
>> >> On the side note - is there a better list (with more traffic) where I
>> >> can post  question like this? Or this list is still good and
>> >> operational?
>> >>
>> >> Thank you.
>> >> _______________________________________________
>> >> gtk-list mailing list
>> >> [hidden email]
>> >> https://mail.gnome.org/mailman/listinfo/gtk-list
>> >
>> >
>
>
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

James Cameron-2
On Mon, May 07, 2018 at 04:27:57PM -0500, Igor Korot wrote:
> Paul et al,
> Any idea how to configure FVWM to not to give focus to xterm if one
> specific window is displayed?

You might ask on an fvwm mailing list, but fvwm does have a
NeverFocus method that can be applied to an application such as xterm.

http://www.fvwm.org/documentation/manpages/fvwm.html

But that would just fix your problem for xterm; to enforce focus for a
lock screen, there's more to do.  Have a look at the code for other
lock screens to find out what that is.

Briefly, make a global mouse and keyboard grab, subscribe to window
visibility events, and when they occur raise the window above whatever
was stacked on top of it.

You could also adjust xterm sources to ask for focus skip; bit 0 of
_WIN_HINTS property.

>
> I tried:
>
> [code]
> Key <my_window_name> Tab A M WindowList("!xterm")
> [/code]
>
> but it doesn't work.
>
> Thank you.
>
>
> On Mon, May 7, 2018 at 12:44 PM, Paul Davis <[hidden email]> wrote:
> > the window manager can intervene to catch more or less any key combinations
> > the user has told it to be interested in. if the user told it use Alt-Tab
> > for focus switching, it will catch that. you can't stop it.
> >
> > On Mon, May 7, 2018 at 12:52 PM, Igor Korot <[hidden email]> wrote:
> >>
> >> Hi, Paul,
> >>
> >> On Mon, May 7, 2018 at 11:42 AM, Paul Davis <[hidden email]>
> >> wrote:
> >> > If there is a window manager (and there just about always is), you can't
> >> > stop it from doing what it is configured to do. You're just an
> >> > application,
> >> > and it takes higher priority managing window events than you.
> >>
> >> Yes, we are using FVWM as WM.
> >> I got a suggestion to write a function for this WM to stop the
> >> Terminal to appear
> >> when our Lock Screen is active, but here no one is familiar enough with
> >> this WM
> >> to write such a function.
> >>
> >> And I guess a different route is just not possible.
> >>
> >> And I would also guess that even if I put the "stay on top" flag,
> >> pressing the ALT+TAB will
> >> definitely switch the focus. Am I correct?
> >>
> >> Thank you.
> >>
> >> >
> >> > On Mon, May 7, 2018 at 12:01 PM, Igor Korot <[hidden email]> wrote:
> >> >>
> >> >>  Hi, ALL,
> >> >> Is it possible to catch the ALT+TAB when one particular window is
> >> >> displayed and do nothing, i.e. not switch to a different window?
> >> >>
> >> >> We have a program which displays a full sized window without the
> >> >> title. Its role is to Lock screen" - user should not be able to do
> >> >> anything until (s)he supplies password and hit the "Authenticate"
> >> >> button.
> >> >> problem is that t is possible to hit "ALT+TAB" and switch the focus to
> >> >> the window below it (such as Terminal) and type something.
> >> >>
> >> >> We also can't use the lock screen window because of some other issues.
> >> >>
> >> >> So is it possible to catch ALT+TAB and do nothing for one specific
> >> >> window?
> >> >>
> >> >> On the side note - is there a better list (with more traffic) where I
> >> >> can post  question like this? Or this list is still good and
> >> >> operational?
> >> >>
> >> >> Thank you.
> >> >> _______________________________________________
> >> >> gtk-list mailing list
> >> >> [hidden email]
> >> >> https://mail.gnome.org/mailman/listinfo/gtk-list
> >> >
> >> >
> >
> >
> _______________________________________________
> gtk-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-list

--
James Cameron
http://quozl.netrek.org/
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

Igor Korot
James,

On Mon, May 7, 2018 at 4:46 PM, James Cameron <[hidden email]> wrote:
> On Mon, May 07, 2018 at 04:27:57PM -0500, Igor Korot wrote:
>> Paul et al,
>> Any idea how to configure FVWM to not to give focus to xterm if one
>> specific window is displayed?
>
> You might ask on an fvwm mailing list, but fvwm does have a
> NeverFocus method that can be applied to an application such as xterm.

Yes, just subscribed to their forum and will ask that question.
>
> http://www.fvwm.org/documentation/manpages/fvwm.html
>
> But that would just fix your problem for xterm; to enforce focus for a
> lock screen, there's more to do.  Have a look at the code for other
> lock screens to find out what that is.

We do not provide any external application where the user can interact
with the keyboard/focus handling
in order to try and guess the information that should be secured.
Only the xterm is a concern.

>
> Briefly, make a global mouse and keyboard grab, subscribe to window
> visibility events, and when they occur raise the window above whatever
> was stacked on top of it.
>
> You could also adjust xterm sources to ask for focus skip; bit 0 of
> _WIN_HINTS property.

Before going those routes I will see what FVWM people have to say...

Thank you for the suggestions though.

>
>>
>> I tried:
>>
>> [code]
>> Key <my_window_name> Tab A M WindowList("!xterm")
>> [/code]
>>
>> but it doesn't work.
>>
>> Thank you.
>>
>>
>> On Mon, May 7, 2018 at 12:44 PM, Paul Davis <[hidden email]> wrote:
>> > the window manager can intervene to catch more or less any key combinations
>> > the user has told it to be interested in. if the user told it use Alt-Tab
>> > for focus switching, it will catch that. you can't stop it.
>> >
>> > On Mon, May 7, 2018 at 12:52 PM, Igor Korot <[hidden email]> wrote:
>> >>
>> >> Hi, Paul,
>> >>
>> >> On Mon, May 7, 2018 at 11:42 AM, Paul Davis <[hidden email]>
>> >> wrote:
>> >> > If there is a window manager (and there just about always is), you can't
>> >> > stop it from doing what it is configured to do. You're just an
>> >> > application,
>> >> > and it takes higher priority managing window events than you.
>> >>
>> >> Yes, we are using FVWM as WM.
>> >> I got a suggestion to write a function for this WM to stop the
>> >> Terminal to appear
>> >> when our Lock Screen is active, but here no one is familiar enough with
>> >> this WM
>> >> to write such a function.
>> >>
>> >> And I guess a different route is just not possible.
>> >>
>> >> And I would also guess that even if I put the "stay on top" flag,
>> >> pressing the ALT+TAB will
>> >> definitely switch the focus. Am I correct?
>> >>
>> >> Thank you.
>> >>
>> >> >
>> >> > On Mon, May 7, 2018 at 12:01 PM, Igor Korot <[hidden email]> wrote:
>> >> >>
>> >> >>  Hi, ALL,
>> >> >> Is it possible to catch the ALT+TAB when one particular window is
>> >> >> displayed and do nothing, i.e. not switch to a different window?
>> >> >>
>> >> >> We have a program which displays a full sized window without the
>> >> >> title. Its role is to Lock screen" - user should not be able to do
>> >> >> anything until (s)he supplies password and hit the "Authenticate"
>> >> >> button.
>> >> >> problem is that t is possible to hit "ALT+TAB" and switch the focus to
>> >> >> the window below it (such as Terminal) and type something.
>> >> >>
>> >> >> We also can't use the lock screen window because of some other issues.
>> >> >>
>> >> >> So is it possible to catch ALT+TAB and do nothing for one specific
>> >> >> window?
>> >> >>
>> >> >> On the side note - is there a better list (with more traffic) where I
>> >> >> can post  question like this? Or this list is still good and
>> >> >> operational?
>> >> >>
>> >> >> Thank you.
>> >> >> _______________________________________________
>> >> >> gtk-list mailing list
>> >> >> [hidden email]
>> >> >> https://mail.gnome.org/mailman/listinfo/gtk-list
>> >> >
>> >> >
>> >
>> >
>> _______________________________________________
>> gtk-list mailing list
>> [hidden email]
>> https://mail.gnome.org/mailman/listinfo/gtk-list
>
> --
> James Cameron
> http://quozl.netrek.org/
> _______________________________________________
> gtk-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

James Cameron-2
On Mon, May 07, 2018 at 05:03:40PM -0500, Igor Korot wrote:

> James,
>
> On Mon, May 7, 2018 at 4:46 PM, James Cameron <[hidden email]> wrote:
> > On Mon, May 07, 2018 at 04:27:57PM -0500, Igor Korot wrote:
> >> Paul et al,
> >> Any idea how to configure FVWM to not to give focus to xterm if one
> >> specific window is displayed?
> >
> > You might ask on an fvwm mailing list, but fvwm does have a
> > NeverFocus method that can be applied to an application such as xterm.
>
> Yes, just subscribed to their forum and will ask that question.
> >
> > http://www.fvwm.org/documentation/manpages/fvwm.html
> >
> > But that would just fix your problem for xterm; to enforce focus for a
> > lock screen, there's more to do.  Have a look at the code for other
> > lock screens to find out what that is.
>
> We do not provide any external application where the user can interact
> with the keyboard/focus handling
> in order to try and guess the information that should be secured.
> Only the xterm is a concern.

If this is an embedded system or kiosk application, replace xterm with
something of your own making that uses libvte as a widget.  That way
you can assert full control over when the widget is visible.

I've found VTE acceptable for most use cases I've thrown at it.

Though I still use xterm when I can.

> [...]

--
James Cameron
http://quozl.netrek.org/
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

Gergely Polonkai
Given your earlier mails, the thing you want to achieve is near to impossible. Even if you donʼt give focus to every terminal app that can ever exist, I can press Ctrl-Alt-F2 to go to the textual console and do whatever Iʼd like. If there is one thing in the X world you canʼt catch is this (and maybe Ctrl-Alt-Backspace). Of course, you can disable those in the X config. If a regular user can install software on the machine, you stand no chance; even without root access it is possible.

If you donʼt want the user to interact with the computer at a specific time, why not firing up the password protected screen saver?

On Tue, May 8, 2018, 00:46 James Cameron <[hidden email]> wrote:
On Mon, May 07, 2018 at 05:03:40PM -0500, Igor Korot wrote:
> James,
>
> On Mon, May 7, 2018 at 4:46 PM, James Cameron <[hidden email]> wrote:
> > On Mon, May 07, 2018 at 04:27:57PM -0500, Igor Korot wrote:
> >> Paul et al,
> >> Any idea how to configure FVWM to not to give focus to xterm if one
> >> specific window is displayed?
> >
> > You might ask on an fvwm mailing list, but fvwm does have a
> > NeverFocus method that can be applied to an application such as xterm.
>
> Yes, just subscribed to their forum and will ask that question.
> >
> > http://www.fvwm.org/documentation/manpages/fvwm.html
> >
> > But that would just fix your problem for xterm; to enforce focus for a
> > lock screen, there's more to do.  Have a look at the code for other
> > lock screens to find out what that is.
>
> We do not provide any external application where the user can interact
> with the keyboard/focus handling
> in order to try and guess the information that should be secured.
> Only the xterm is a concern.

If this is an embedded system or kiosk application, replace xterm with
something of your own making that uses libvte as a widget.  That way
you can assert full control over when the widget is visible.

I've found VTE acceptable for most use cases I've thrown at it.

Though I still use xterm when I can.

> [...]

--
James Cameron
http://quozl.netrek.org/
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list

_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to catch ALT+TAB and do nothing

Carsten Mattner
In reply to this post by Igor Korot
It sounds like you have a kiosk application that is using a
terminal emulator, maybe xterm specifically for complete VT
compatibility, and has no other interactive application.

If that's the case and X proves hard to make work, I can suggest
running a terminal emulator like the new generation of kmscon
whose name I don't remember or Enlightenment's Terminology, as
both run on top of KMS/DRM. No need for a display manager. If
you combine it with a terminal locker, it should provide the
solution you're looking for.

If, however, you run more than xterm and need to spawn a few
X apps now and then, this wont' work. Terminology is quite
capable and might replace any image/video viewing needs you
maybe have.
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list