RE: how to get mouse and keyboard focus?
- From: "Marcio Andrey Oliveira ell" <andreyq terra com br>
- To: <gtk-app-devel-list gnome org>
- Subject: RE: how to get mouse and keyboard focus?
- Date: Sun, 7 Apr 2002 21:37:38 -0300
Carlos,
I´d like to thank you by your answer.
I read the documentation and I saw that gtk_grab_add() works only for the
same application and not to all running applications.
I used the ideia of the funtion name you gave me and I saw two functions
called gdk_pointer_grab() and gdk_keyboard_grab().
I think that it will solve my problem.
Thanks again.
Perhaps you could just use a modal window:
gtk_grab_add (window) gtk1.2
which by definition grabs focus, so everything else
is blocked. Your dialog window could have only
a label showing a message, something as:
"time for cofee :-), mouse and keyboard disabled :-("
After some minutes you just remove this
window and the user has control again.
If you want (and you know the times)
you can even add a progress
bar in continous mode, so the user
knows how much time has to wait.
If you do this, you must block also
the delete_event signal in the window,
so users cannot close it with the
WM decoration tools, Close, etc...
(no way to block the Kill though)
This is simple and gives users a clue.
Carlos
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]