Grabs on Win32 (Was: [Gimp-developer] Screenshot plug-in status)
- From: Tor Lillqvist <tml iki fi>
- To: Henrik Brix Andersen <brix gimp org>, gtk-devel-list gnome org
- Subject: Grabs on Win32 (Was: [Gimp-developer] Screenshot plug-in status)
- Date: Sun, 7 Sep 2003 09:43:18 +0000
(Adding gtk-devel-list. Does anybody on gdk-devel-list have experience
with hooks on Windows?)
Henrik Brix Andersen writes:
> Regarding the win32 specific portion of select_window(): In the X11
> specific part I grab the pointer for the root window - and hence all
> above windows can be selected. Can SetCapture() take the root window as
> argument?
Unfortunately, nope.
Something more closely resembling X11 grabbing might be possible using
so-called hooks. I have no experience (so far) with using hooks... but
the API doesn't look difficult. I'll check what one can do with
them.
Quite possibly the implementation of pointer grabbing in gdk/win32
would also work more like on X11 if one used hooks instead of mouse
capture. Even more, keyboard grabs. Currently they aren't implemented
using any Win32 API at all. Keyboard grabbing in gdk/win32 affects
only how events that would be generated for the GDK-using application
anyway are directed inside it. But are there any real GTK apps that
use keyboard grabs? (Er, with owner_events FALSE, I guess.)
Hmm, gtk itself does use keybaord grabs. What kind of keyboard usage
does this affect on X11? I'd like to check what happens currently on
Win32.
(Talking to myself...) One good way to check pointer grabs seems to be
the eyedropper in the GTK color selector. I'll have to check how it
behaves in detail on X11, and see if it can be made to behave
identically on Win32. At least currently, if one clicks on the
eyedropper and the clicks on some oter app's window, that app is
activated. I guess that shouldn't really happen, the pointer grab
should prevent the click from being seen by the "window manager"?
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]