Il giorno Mon, 19 Oct 2009 21:24:45 +0200 Alexander Larsson <[email protected]> ha scritto:
> Your example did not work for me without the added > GDK_BUTTON_PRESS_MASK when using metacity as the window manager, I > think because metacity is a reparenting wm and has button press event > mask on the frame window, but it did work with twm (and probably > other non-reparenting wms like compiz) which doesn't do this. > > The reason it works with twm is that no other window has a button > press mask so there is no implicit grab, meaning events continue to > go to the window with the pointer. As soon as there is a parent > window in the hierarchy with the button press mask set it will stop > working. This could happen before if e.g. the widget was put in some > other widget that had the mask set. Many thanks for the detailed answer. I always thought to press and motion as totally disjoint events but effectively the grab of the button press was "logic", or at least this has little to do with gtk. As you correctly guessed I'm not using metacity but openbox and this has hidden the problem up to gtk 2.18. > I'm not sure how we can fix this in 2.18, or even if we should. I > mean, by necessity we do request button press events from X on the > toplevel (so we can emulate button presses on virtual child windows), > so we *will* get an implicit grab and can't pretend its not there (as > we get different X events now). For what it's worth, this helped me to found a fragile (hence, broken) approach to events so, in this specific case, I don't see any reason to change. Ciao. -- Nicola _______________________________________________ gtk-devel-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtk-devel-list
