1
0
Fork 0

don't allow grab on docks/desktop for now; needs fixing later to do the

2001-12-10  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_update_unfocused_button_grabs): don't
	allow grab on docks/desktop for now; needs fixing later to
	do the grab, but pass thru click, so we can focus those windows.
	And in fact we need to do that even in sloppy mode.
This commit is contained in:
Havoc Pennington 2001-12-10 16:15:45 +00:00 committed by Havoc Pennington
parent fa803fd88f
commit 4af0425d72
2 changed files with 29 additions and 17 deletions

View file

@ -1,3 +1,10 @@
2001-12-10 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_update_unfocused_button_grabs): don't
allow grab on docks/desktop for now; needs fixing later to
do the grab, but pass thru click, so we can focus those windows.
And in fact we need to do that even in sloppy mode.
2001-12-10 Havoc Pennington <hp@pobox.com> 2001-12-10 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_foreach_window): fix broken * src/screen.c (meta_screen_foreach_window): fix broken

View file

@ -2028,16 +2028,16 @@ void
meta_window_update_unfocused_button_grabs (MetaWindow *window) meta_window_update_unfocused_button_grabs (MetaWindow *window)
{ {
/* Grab buttons if we're unfocused and in click-to-focus mode, /* Grab buttons if we're unfocused and in click-to-focus mode,
* ungrab otherwise * ungrab otherwise, never grab on panels, menus, etc.
*/ */
if (window->unfocused_buttons_grabbed) if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
{ {
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK) if (window->unfocused_buttons_grabbed)
{ {
if (window->has_focus) if (window->has_focus)
{ {
/* Focused so undo grab */ /* Focused so undo grab */
meta_verbose ("Ungrabbing on focused window %s since mode is click-to-focus\n", meta_verbose ("Ungrabbing on focused window %s\n",
window->desc); window->desc);
meta_display_ungrab_unfocused_window_buttons (window->display, meta_display_ungrab_unfocused_window_buttons (window->display,
window->xwindow); window->xwindow);
@ -2046,19 +2046,12 @@ meta_window_update_unfocused_button_grabs (MetaWindow *window)
} }
else else
{ {
/* Not in click-to-focus so undo grab */ /* FIXME This type thing is a temporary hack; what we need to
meta_verbose ("Ungrabbing on window %s since mode is not click-to-focus\n", * do is focus these windows, but pass thru click. What we
window->desc); * do now is ignore clicks on them.
meta_display_ungrab_unfocused_window_buttons (window->display, */
window->xwindow); if (window->type != META_WINDOW_DOCK &&
window->unfocused_buttons_grabbed = FALSE; window->type != META_WINDOW_DESKTOP)
}
}
else
{
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
{
if (!window->has_focus)
{ {
/* Not focused so grab */ /* Not focused so grab */
meta_verbose ("Grabbing on unfocused window %s since mode is click-to-focus\n", meta_verbose ("Grabbing on unfocused window %s since mode is click-to-focus\n",
@ -2069,6 +2062,18 @@ meta_window_update_unfocused_button_grabs (MetaWindow *window)
} }
} }
} }
else
{
if (window->unfocused_buttons_grabbed)
{
/* Not in click-to-focus so undo grab */
meta_verbose ("Ungrabbing on window %s since mode is not click-to-focus\n",
window->desc);
meta_display_ungrab_unfocused_window_buttons (window->display,
window->xwindow);
window->unfocused_buttons_grabbed = FALSE;
}
}
} }
void void