diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-11-09 11:25:39 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-11-12 19:13:35 +0100 |
| commit | 888dc5f5c5456d2721f87f01dd1b10d47c6f439e (patch) | |
| tree | 95078c6b836c201eb4c525ea6c6da66fcc1ae0f1 /src/drivers | |
| parent | 768dcf2c11146d47f8a79a3d020e2cc0aa91c05b (diff) | |
Have libdecor-gtk implement the "GTK Shell" protocol
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 4 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 35a253c38..5b4d97cf2 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -46,6 +46,7 @@ #include <string.h> // for strerror() extern "C" { bool libdecor_get_cursor_settings(char **theme, int *size); + void bind_to_gtk_shell(struct wl_registry *, uint32_t); } @@ -1146,6 +1147,9 @@ static void registry_handle_global(void *user_data, struct wl_registry *wl_regis } else if (strcmp(interface, "gtk_shell1") == 0) { Fl_Wayland_Screen_Driver::compositor = Fl_Wayland_Screen_Driver::MUTTER; //fprintf(stderr, "Running the Mutter compositor\n"); + if ( version >= 5) { + bind_to_gtk_shell(wl_registry, id); + } } else if (strcmp(interface, "weston_desktop_shell") == 0) { Fl_Wayland_Screen_Driver::compositor = Fl_Wayland_Screen_Driver::WESTON; //fprintf(stderr, "Running the Weston compositor\n"); diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 1c04bf575..6b5b2f8ab 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -45,6 +45,7 @@ struct cursor_image { // as in wayland-cursor.c of the Wayland project source co extern "C" { # include "../../../libdecor/src/libdecor-plugin.h" uchar *fl_libdecor_titlebar_buffer(struct libdecor_frame *frame, int *w, int *h, int *stride); + void use_FLTK_pointer_button(struct libdecor_frame *); } #define fl_max(a,b) ((a) > (b) ? (a) : (b)) @@ -853,7 +854,7 @@ static void handle_configure(struct libdecor_frame *frame, #ifdef LIBDECOR_MR131 if (is_1st_run) use_FLTK_toplevel_configure_cb(frame); #endif - + use_FLTK_pointer_button(frame); struct wl_output *wl_output = NULL; if (window->fl_win->fullscreen_active()) { if (!(window->state & LIBDECOR_WINDOW_STATE_FULLSCREEN)) { |
