diff options
Diffstat (limited to 'chromium/ui/gtk/x/gtk_event_loop_x11.h')
-rw-r--r-- | chromium/ui/gtk/x/gtk_event_loop_x11.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/chromium/ui/gtk/x/gtk_event_loop_x11.h b/chromium/ui/gtk/x/gtk_event_loop_x11.h index 91cbe124268..a6e9251ea3e 100644 --- a/chromium/ui/gtk/x/gtk_event_loop_x11.h +++ b/chromium/ui/gtk/x/gtk_event_loop_x11.h @@ -5,14 +5,11 @@ #ifndef UI_GTK_X_GTK_EVENT_LOOP_X11_H_ #define UI_GTK_X_GTK_EVENT_LOOP_X11_H_ -#include <gdk/gdk.h> -#include <gtk/gtk.h> - #include "ui/base/glib/glib_integers.h" #include "ui/base/glib/glib_signal.h" -#include "ui/gtk/gtk_buildflags.h" +#include "ui/gtk/gtk_compat.h" -namespace ui { +namespace gtk { class GtkEventLoopX11 { public: @@ -23,15 +20,17 @@ class GtkEventLoopX11 { GtkEventLoopX11& operator=(const GtkEventLoopX11&) = delete; private: -#if BUILDFLAG(GTK_VERSION) >= 4 - CHROMEG_CALLBACK_0(GtkEventLoopX11, gboolean, OnEvent, GdkEvent*); + // This state is only used on GTK4. GdkSurface* surface_ = nullptr; gulong signal_id_ = 0; -#else + + // Only called on GTK3. static void DispatchGdkEvent(GdkEvent* gdk_event, gpointer); -#endif + + // Only called on GTK4. + CHROMEG_CALLBACK_0(GtkEventLoopX11, gboolean, OnEvent, GdkEvent*); }; -} // namespace ui +} // namespace gtk #endif // UI_GTK_X_GTK_EVENT_LOOP_X11_H_ |