* [Qemu-devel] SDL_GRAB problem
@ 2004-03-17 20:14 Richard Zidlicky
2004-03-17 21:03 ` [Qemu-devel] " Sami Haahtinen
0 siblings, 1 reply; 7+ messages in thread
From: Richard Zidlicky @ 2004-03-17 20:14 UTC (permalink / raw)
To: Qemu ML
Hi,
the usual grab agony: something goes wrong at the wrong time and
X is completely unusable. No idea what exactly went wrong this
time - luckilly ctrl-alt-f2 saved me.
Very unpleasant problem, should be fixed or avoided no matter how.
I have no idea about SDL, if I have to grab in X I do at least:
- handle Enter/Leave, Map/UnMap events
- add timer and enforce a maximum grab time, eg 45s
Also, if it is not absolutely necessary to grab the mouse
it would be good to avoid this.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] Re: SDL_GRAB problem
2004-03-17 20:14 [Qemu-devel] SDL_GRAB problem Richard Zidlicky
@ 2004-03-17 21:03 ` Sami Haahtinen
2004-03-17 21:49 ` J. Mayer
0 siblings, 1 reply; 7+ messages in thread
From: Sami Haahtinen @ 2004-03-17 21:03 UTC (permalink / raw)
To: qemu-devel
Richard Zidlicky wrote:
> the usual grab agony: something goes wrong at the wrong time and
> X is completely unusable.
My X is currently stuck in this state.
> No idea what exactly went wrong this time - luckilly ctrl-alt-f2 saved me.
For me, qemu crashed while focus was grabbed. Also ctrl-alt-backspace is
a handy command (use with caution, kills your X without asking twice)
> Very unpleasant problem, should be fixed or avoided no matter how.
I agree with you, it would ease the situation if there was a tool to
ungrab X, but i don't know of any...
Regards, Sami
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: SDL_GRAB problem
2004-03-17 21:03 ` [Qemu-devel] " Sami Haahtinen
@ 2004-03-17 21:49 ` J. Mayer
2004-03-18 0:35 ` Michel Dänzer
0 siblings, 1 reply; 7+ messages in thread
From: J. Mayer @ 2004-03-17 21:49 UTC (permalink / raw)
To: qemu-devel
On Wed, 2004-03-17 at 22:03, Sami Haahtinen wrote:
> Richard Zidlicky wrote:
> > the usual grab agony: something goes wrong at the wrong time and
> > X is completely unusable.
>
> My X is currently stuck in this state.
>
> > No idea what exactly went wrong this time - luckilly ctrl-alt-f2 saved me.
>
> For me, qemu crashed while focus was grabbed. Also ctrl-alt-backspace is
> a handy command (use with caution, kills your X without asking twice)
>
> > Very unpleasant problem, should be fixed or avoided no matter how.
>
> I agree with you, it would ease the situation if there was a tool to
> ungrab X, but i don't know of any...
The solution I found is to relaunch qemu, grab then ungrab the focus and
I get my X usable.
Qemu should do sthg to leave SDL in a proper way when it crashes...
--
J. Mayer <l_indien@magic.fr>
Never organized
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: SDL_GRAB problem
2004-03-17 21:49 ` J. Mayer
@ 2004-03-18 0:35 ` Michel Dänzer
2004-03-18 5:23 ` Sami Haahtinen
2004-03-18 11:18 ` Richard Zidlicky
0 siblings, 2 replies; 7+ messages in thread
From: Michel Dänzer @ 2004-03-18 0:35 UTC (permalink / raw)
To: qemu-devel
On Wed, 2004-03-17 at 22:49, J. Mayer wrote:
> On Wed, 2004-03-17 at 22:03, Sami Haahtinen wrote:
> > Richard Zidlicky wrote:
> > > the usual grab agony: something goes wrong at the wrong time and
> > > X is completely unusable.
> >
> > My X is currently stuck in this state.
> >
> > > No idea what exactly went wrong this time - luckilly ctrl-alt-f2 saved me.
> >
> > For me, qemu crashed while focus was grabbed. Also ctrl-alt-backspace is
> > a handy command (use with caution, kills your X without asking twice)
> >
> > > Very unpleasant problem, should be fixed or avoided no matter how.
> >
> > I agree with you, it would ease the situation if there was a tool to
> > ungrab X, but i don't know of any...
>From the XF86Config-4 manpage, about the ServerFlags section:
Option "AllowDeactivateGrabs" "boolean"
This option enables the use of the Ctrl+Alt+Keypad‐Divide key
sequence to deactivate any active keyboard and mouse grabs.
Default: off.
[...]
Note that the options AllowDeactivateGrabs and AllowClosedown‐
Grabs will allow users to remove the grab used by screen
saver/locker programs. An API was written to such cases. If you
enable this option, make sure your screen saver/locker is
updated.
> The solution I found is to relaunch qemu, grab then ungrab the focus and
> I get my X usable.
> Qemu should do sthg to leave SDL in a proper way when it crashes...
Strictly speaking, it may be an X server bug that the grab persists when
the client goes away.
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
^ permalink raw reply [flat|nested] 7+ messages in thread* [Qemu-devel] Re: SDL_GRAB problem
2004-03-18 0:35 ` Michel Dänzer
@ 2004-03-18 5:23 ` Sami Haahtinen
2004-03-18 22:23 ` Michel Dänzer
2004-03-18 11:18 ` Richard Zidlicky
1 sibling, 1 reply; 7+ messages in thread
From: Sami Haahtinen @ 2004-03-18 5:23 UTC (permalink / raw)
To: qemu-devel
Michel Dänzer wrote:
> On Wed, 2004-03-17 at 22:49, J. Mayer wrote:
>>On Wed, 2004-03-17 at 22:03, Sami Haahtinen wrote:
>>>I agree with you, it would ease the situation if there was a tool to
>>>ungrab X, but i don't know of any...
>
>
>>From the XF86Config-4 manpage, about the ServerFlags section:
>
> Option "AllowDeactivateGrabs" "boolean"
> This option enables the use of the Ctrl+Alt+Keypad‐Divide key
> sequence to deactivate any active keyboard and mouse grabs.
> Default: off.
i must have missed that, that looks like a good solution. time to check
whether my xscreensaver is new enough ;)
>> The solution I found is to relaunch qemu, grab then ungrab the
>> focus and I get my X usable. Qemu should do sthg to leave SDL in a
>> proper way when it crashes...
>
> Strictly speaking, it may be an X server bug that the grab persists
> when the client goes away.
When you think it through, it does appear so. Why would an application
that doesn't exist need grab. Although i don't know the full mechanism
behind grab, so it might be that there is some reason why this hasn't
been fixed.
Oh well, i'm looking forward to xouvert, somehow i have lost my faith in
XFree86.
Regards, Sami
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: SDL_GRAB problem
2004-03-18 5:23 ` Sami Haahtinen
@ 2004-03-18 22:23 ` Michel Dänzer
0 siblings, 0 replies; 7+ messages in thread
From: Michel Dänzer @ 2004-03-18 22:23 UTC (permalink / raw)
To: qemu-devel
On Thu, 2004-03-18 at 06:23, Sami Haahtinen wrote:
> Michel Dänzer wrote:
>
> > Strictly speaking, it may be an X server bug that the grab persists
> > when the client goes away.
>
> When you think it through, it does appear so. Why would an application
> that doesn't exist need grab.
I can't think of a reason, but specs don't always follow reason. ;)
> Although i don't know the full mechanism behind grab, so it might be that
> there is some reason why this hasn't been fixed.
IIRC the spec does define grabs to expire when the client goes away, but
I don't know offhand where this is defined.
> Oh well, i'm looking forward to xouvert, somehow i have lost my faith in
> XFree86.
You're not alone. Unfortunately, xouvert looked quite dead already last
time I checked. Fortunately, there's a lot going on over at
http://freedesktop.org/Software/Home .
On Thu, 2004-03-18 at 12:18, Richard Zidlicky wrote:
> Now, excuse for the completely offtopic Q: Once every year or so
> my Xemacs looses sync with the Xserver.. usually there is some
> message suggesting xlib lost some reply or got an unexpected one.
> Is there any way to revive the app in such a case?
Not sure, but I'm afraid not - error recovery isn't exactly a strength of
Xlib and most of its applications.
--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] Re: SDL_GRAB problem
2004-03-18 0:35 ` Michel Dänzer
2004-03-18 5:23 ` Sami Haahtinen
@ 2004-03-18 11:18 ` Richard Zidlicky
1 sibling, 0 replies; 7+ messages in thread
From: Richard Zidlicky @ 2004-03-18 11:18 UTC (permalink / raw)
To: qemu-devel
On Thu, Mar 18, 2004 at 01:35:36AM +0100, Michel Dänzer wrote:
> Option "AllowDeactivateGrabs" "boolean"
> This option enables the use of the Ctrl+Alt+Keypad???Divide key
> sequence to deactivate any active keyboard and mouse grabs.
> Default: off.
that looks like an extremely usefull option for developpers, I don't
even recall how often I needed a remote login to debug programs that
use grabs :)
For the average user this is still a bit difficult I am afraid.
> Strictly speaking, it may be an X server bug that the grab persists when
> the client goes away.
client didn't go away in my case so it is not an X bug. An strace
displayed some SIGALRM in qemu and nothing else as far as I could see.
After killing qemu the X server was fine again.
Now, excuse for the completely offtopic Q: Once every year or so
my Xemacs looses sync with the Xserver.. usually there is some
message suggesting xlib lost some reply or got an unexpected one.
Is there any way to revive the app in such a case?
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-03-18 22:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-17 20:14 [Qemu-devel] SDL_GRAB problem Richard Zidlicky
2004-03-17 21:03 ` [Qemu-devel] " Sami Haahtinen
2004-03-17 21:49 ` J. Mayer
2004-03-18 0:35 ` Michel Dänzer
2004-03-18 5:23 ` Sami Haahtinen
2004-03-18 22:23 ` Michel Dänzer
2004-03-18 11:18 ` Richard Zidlicky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).