Re: Selectively removing button grab on panel?



2008/2/10 William Lachance <wrlach gmail com>:
> Hi,
>
>  I'm interested in changing the behaviour of gnome-panel such that it's
>  only possible to move it when MOD1 (default: ALT) is pressed, to get
>  around bug 309721.[1] In attempting to make this change, I realized
>  quickly that metacity needs to be modified in order for this to happen,
>  because it's grabbing all mouse button events when the alt-key is
>  depressed.
>
>  Is there a way around this? I was playing around with the event loop in
>  metacity today, and I figured out that I can disable the button event
>  grab on a specific panel window when it's clicked on in the event loop
>  (via meta_change_button_grab and its associated call to XUngrabButton),
>  but I guess what I really need is to disable the button event grab for
>  those windows at the very beginning.

In display.c:event_callback(), under case ButtonPress:, we basically
don't do anything with windows like the panel (look for "begin_move &&
window->has_move_func").  We could probably make use of the
window->has_move_func flag (or the META_WINDOW_DOCK type) inside
meta_display_grab_window_buttons (similar to how we do with
META_WINDOW_DOCK in meta_window_grab_keys), to avoid grabbing the alt
button for the panel.

Could you file a bug?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]