[mutter/bilelmoussaoui/x11-frame-guard: 45/46] core/window: Move around frame handle event
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/bilelmoussaoui/x11-frame-guard: 45/46] core/window: Move around frame handle event
- Date: Thu, 16 Jun 2022 13:53:29 +0000 (UTC)
commit 1cff96472f5c7ff7793631b61dd265e0bb417c68
Author: Bilal Elmoussaoui <belmouss redhat com>
Date: Wed Jun 1 14:19:25 2022 +0200
core/window: Move around frame handle event
It makes more sense to have it in the new place & would allow to
simplify the ifdef X11 in the upcoming commit
src/core/events.c | 3 ++-
src/core/frame.c | 10 ++++++++++
src/core/frame.h | 3 +++
src/core/window-private.h | 3 ---
src/core/window.c | 10 ----------
5 files changed, 15 insertions(+), 14 deletions(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index fd052eea86..cd583b4153 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -23,6 +23,7 @@
#include "config.h"
#include "core/events.h"
+#include "core/frame.h"
#include "backends/meta-cursor-tracker-private.h"
#include "backends/meta-dnd-private.h"
@@ -481,7 +482,7 @@ meta_display_handle_event (MetaDisplay *display,
* event to Wayland if it was handled by the frame UI.
* See: https://gitlab.gnome.org/GNOME/mutter/issues/88
*/
- if (meta_window_handle_ui_frame_event (window, event))
+ if (meta_frame_handle_event (window->frame, event))
{
bypass_wayland = (event->type == CLUTTER_BUTTON_PRESS ||
event->type == CLUTTER_TOUCH_BEGIN);
diff --git a/src/core/frame.c b/src/core/frame.c
index 9c8cbb9464..bdcd499acf 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -425,3 +425,13 @@ meta_frame_update_title (MetaFrame *frame)
if (frame->window->title)
meta_ui_frame_set_title (frame->ui_frame, frame->window->title);
}
+
+gboolean
+meta_frame_handle_event (MetaFrame *frame,
+ const ClutterEvent *event)
+{
+ if (!frame)
+ return FALSE;
+
+ return meta_ui_frame_handle_event (frame->ui_frame, event);
+}
diff --git a/src/core/frame.h b/src/core/frame.h
index 61a5ca7255..d03a057afe 100644
--- a/src/core/frame.h
+++ b/src/core/frame.h
@@ -82,4 +82,7 @@ void meta_frame_set_screen_cursor (MetaFrame *frame,
void meta_frame_update_style (MetaFrame *frame);
void meta_frame_update_title (MetaFrame *frame);
+gboolean meta_frame_handle_event (MetaFrame *frame,
+ const ClutterEvent *event);
+
#endif
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 8d2d4a0203..9950408461 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -832,9 +832,6 @@ 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);
diff --git a/src/core/window.c b/src/core/window.c
index 95a8e33e04..e1f52e15f7 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8196,16 +8196,6 @@ 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]