I need help implementing RegisterHotKey
andi at rhlx01.fht-esslingen.de
Mon May 8 11:40:29 CDT 2006
On Sun, May 07, 2006 at 04:20:50PM -0400, Vincent Povirk wrote:
> I found a patch from about 3 years ago for implementing RegisterHotKey
> and UnregisterHotKey. I've updated it to apply to the current wine
> source tree and essentially copied what metacity does to cover any
> missing functionality.
> The original patch is here:
> Unfortunately, trying to register an in-use hotkey with this patch
> causes a crash:
> X Error of failed request: BadAccess (attempt to access private
> resource denied)
> Major opcode of failed request: 33 (X_GrabKey)
> Serial number of failed request: 58
> Current serial number in output stream: 62
> RegisterHotKey is implemented as if XGrabKey returns 0 if it fails. Do
> I need to do something special to "watch" for the error?
I've been searching for X_GrabKey protocol error examples,
but it wasn't too interesting.
The only relatively interesting URL is
where they say that x2vnc >= 1.5.1 has this issue fixed (either by
installing a custom X error handler or perhaps by doing a good, clean
direct approach). Thus you might want to research the changes in 1.5.1
to see what needs to be done here.
As I said, installing a custom X protocol error handler would also help
(that way you would custom-handle the error instead of having it "crash" by
default), and AFAIK Wine does that in quite some places already (X font
handling in Wine comes to mind as being a major PITA with frequent errors).
Just Google "X11 custom error handler" or so for more info.
Thanks for tackling that, good luck!
No programming skills!? Why not help translate many Linux applications!
(or alternatively buy nicely packaged Linux distros/OSS software to help
support Linux developers creating shiny new things for you?)
More information about the wine-devel