mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
window: Move UI frame event handler to a separate function
In order to tell whether an event has been handled by the frame UI, move the UI frame handler to a specific helper function. https://gitlab.gnome.org/GNOME/mutter/issues/88
This commit is contained in:
parent
15c9458e92
commit
ad62a659eb
@ -782,6 +782,9 @@ void meta_window_handle_enter (MetaWindow *window,
|
||||
guint root_y);
|
||||
void meta_window_handle_leave (MetaWindow *window);
|
||||
|
||||
gboolean meta_window_handle_ui_frame_event (MetaWindow *window,
|
||||
const ClutterEvent *event);
|
||||
|
||||
void meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
const ClutterEvent *event);
|
||||
|
||||
|
@ -8243,6 +8243,16 @@ meta_window_handle_leave (MetaWindow *window)
|
||||
meta_window_lower (window);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_window_handle_ui_frame_event (MetaWindow *window,
|
||||
const ClutterEvent *event)
|
||||
{
|
||||
if (!window->frame)
|
||||
return FALSE;
|
||||
|
||||
return meta_ui_frame_handle_event (window->frame->ui_frame, event);
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
const ClutterEvent *event)
|
||||
@ -8256,7 +8266,7 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
gfloat x, y;
|
||||
guint button;
|
||||
|
||||
if (window->frame && meta_ui_frame_handle_event (window->frame->ui_frame, event))
|
||||
if (meta_window_handle_ui_frame_event (window, event))
|
||||
return;
|
||||
|
||||
if (event->type != CLUTTER_BUTTON_PRESS &&
|
||||
|
Loading…
Reference in New Issue
Block a user