mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
Track the active_screen, (event_callback): If the mouse enters a window on
2006-01-30 Elijah Newren <newren gmail com> * src/display.[ch] (struct MetaDisplay), meta_display_open, meta_display_set_input_focus_window, meta_display_focus_the_no_focus_window): Track the active_screen, (event_callback): If the mouse enters a window on a different screen, activate the default window on the new screen. May need to be modified for click-to-focus; we'll wait for feedback. Fixes #319348.
This commit is contained in:
parent
be036ca300
commit
297e0e466f
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2006-01-30 Elijah Newren <newren gmail com>
|
||||
|
||||
* src/display.[ch] (struct MetaDisplay), meta_display_open,
|
||||
meta_display_set_input_focus_window,
|
||||
meta_display_focus_the_no_focus_window): Track the active_screen,
|
||||
(event_callback): If the mouse enters a window on a different
|
||||
screen, activate the default window on the new screen. May need
|
||||
to be modified for click-to-focus; we'll wait for feedback. Fixes
|
||||
#319348.
|
||||
|
||||
2006-01-23 Elijah Newren <newren gmail com>
|
||||
|
||||
* src/display.c (meta_display_check_threshold_reached): change the
|
||||
|
@ -472,6 +472,7 @@ meta_display_open (const char *name)
|
||||
display->window_menu = NULL;
|
||||
|
||||
display->screens = NULL;
|
||||
display->active_screen = NULL;
|
||||
|
||||
#ifdef HAVE_STARTUP_NOTIFICATION
|
||||
display->sn_display = sn_display_new (display->xdisplay,
|
||||
@ -1822,9 +1823,30 @@ event_callback (XEvent *event,
|
||||
if (display->grab_window == window &&
|
||||
event->xany.serial >= display->grab_start_serial &&
|
||||
grab_op_is_mouse (display->grab_op))
|
||||
{
|
||||
meta_window_handle_mouse_grab_op_event (window, event);
|
||||
/* do this even if window->has_focus to avoid races */
|
||||
else if (window && !serial_is_ignored (display, event->xany.serial) &&
|
||||
break;
|
||||
}
|
||||
|
||||
/* If the mouse switches screens, active the default window on the new
|
||||
* screen; this will make keybindings and workspace-launched items
|
||||
* actually appear on the right screen.
|
||||
*/
|
||||
if (display->active_screen !=
|
||||
meta_display_screen_for_root (display, event->xcrossing.root))
|
||||
{
|
||||
MetaScreen *new_screen;
|
||||
new_screen = meta_display_screen_for_root (display,
|
||||
event->xcrossing.root);
|
||||
meta_workspace_focus_default_window (new_screen->active_workspace,
|
||||
NULL,
|
||||
event->xcrossing.time);
|
||||
}
|
||||
|
||||
/* Check if we've entered a window; do this even if window->has_focus to
|
||||
* avoid races.
|
||||
*/
|
||||
if (window && !serial_is_ignored (display, event->xany.serial) &&
|
||||
event->xcrossing.mode != NotifyGrab &&
|
||||
event->xcrossing.mode != NotifyUngrab &&
|
||||
event->xcrossing.detail != NotifyInferior &&
|
||||
@ -4908,6 +4930,7 @@ meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
timestamp);
|
||||
display->expected_focus_window = window;
|
||||
display->last_focus_time = timestamp;
|
||||
display->active_screen = window->screen;
|
||||
|
||||
if (window != display->autoraise_window)
|
||||
meta_display_remove_autoraise_callback (window->display);
|
||||
@ -4927,6 +4950,7 @@ meta_display_focus_the_no_focus_window (MetaDisplay *display,
|
||||
timestamp);
|
||||
display->expected_focus_window = NULL;
|
||||
display->last_focus_time = timestamp;
|
||||
display->active_screen = screen;
|
||||
|
||||
meta_display_remove_autoraise_callback (display);
|
||||
}
|
||||
|
@ -218,6 +218,7 @@ struct _MetaDisplay
|
||||
guint error_trap_synced_at_last_pop : 1;
|
||||
MetaEventQueue *events;
|
||||
GSList *screens;
|
||||
MetaScreen *active_screen;
|
||||
GHashTable *window_ids;
|
||||
int error_traps;
|
||||
int (* error_trap_handler) (Display *display,
|
||||
|
Loading…
Reference in New Issue
Block a user