diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | src/Makefile | 1 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 4 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 3 |
4 files changed, 18 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ea4f89cc1..0db9631be 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -688,6 +688,17 @@ if (UNIX AND OPTION_USE_WAYLAND) ) list (APPEND STATIC_FILES "xdg-decoration-protocol.c") list (APPEND SHARED_FILES "xdg-decoration-protocol.c") + if (GTK_FOUND AND OPTION_ALLOW_GTK_PLUGIN) + add_custom_command( + OUTPUT gtk-shell-protocol.c gtk-shell-client-protocol.h + COMMAND wayland-scanner private-code ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml gtk-shell-protocol.c + COMMAND wayland-scanner client-header ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml gtk-shell-client-protocol.h + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml + VERBATIM + ) + list (APPEND STATIC_FILES "gtk-shell-protocol.c") + list (APPEND SHARED_FILES "gtk-shell-protocol.c") + endif (GTK_FOUND AND OPTION_ALLOW_GTK_PLUGIN) endif (NOT OPTION_USE_SYSTEM_LIBDECOR) add_custom_command( OUTPUT text-input-protocol.c text-input-client-protocol.h diff --git a/src/Makefile b/src/Makefile index de1174e16..a8468e3b3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -424,6 +424,7 @@ CFILES_WAYLANDX11 = $(WLCFILES) EXTRA_OBJECTS_WAYLAND = ../libdecor/build/fl_libdecor.o ../libdecor/build/libdecor-cairo-blur.o \ ../libdecor/build/fl_libdecor-plugins.o \ xdg-decoration-protocol.o xdg-shell-protocol.o text-input-protocol.o \ + gtk-shell-protocol.o \ ../libdecor/build/cursor-settings.o ../libdecor/build/os-compatibility.o EXTRA_OBJECTS_WAYLANDX11 = $(EXTRA_OBJECTS_WAYLAND) EXTRA_CXXFLAGS_WAYLAND = -I. 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)) { |
