summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-05-28 22:28:54 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-05-28 22:28:54 +0200
commit70c6f2ce129efde6578d40b8c526497b46e79cc7 (patch)
tree82990423e52371360c3b1bb3b08e7db73c16b2bf
parent9c8977eff13c0a181a71b72287163478e6084f79 (diff)
Fix: Wayland sends wrong events after an FL_DRAG of a top window - cont'd (#983)
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.H1
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx6
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx3
3 files changed, 2 insertions, 8 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
index 97bcccfa6..e2535cfb4 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
@@ -87,7 +87,6 @@ public:
// next length of marked text after current marked text will have been replaced
static int next_marked_length;
static compositor_name compositor; // identifies the used Wayland compositor
- static bool in_xdg_toplevel_move; // true when performing interactive window move
// static member functions
static void insertion_point_location(int x, int y, int height);
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index d332fb3e7..647a1b461 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -96,7 +96,6 @@ static struct wl_surface *gtk_shell_surface = NULL;
Fl_Wayland_Screen_Driver::compositor_name Fl_Wayland_Screen_Driver::compositor =
Fl_Wayland_Screen_Driver::unspecified;
-bool Fl_Wayland_Screen_Driver::in_xdg_toplevel_move = false;
extern "C" {
bool fl_libdecor_using_weston(void) {
@@ -231,11 +230,6 @@ static void pointer_enter(void *data, struct wl_pointer *wl_pointer, uint32_t se
set_event_xy(win);
Fl::handle(FL_ENTER, win);
//fprintf(stderr, "pointer_enter window=%p\n", win);
- if (Fl_Wayland_Screen_Driver::in_xdg_toplevel_move) {
- Fl::pushed(NULL);
- Fl::e_state = 0;
- Fl_Wayland_Screen_Driver::in_xdg_toplevel_move = false;
- }
seat->pointer_focus = surface;
}
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index cb3cf5b39..904c878da 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -1856,7 +1856,8 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) {
Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver();
if (Fl::e_state == FL_BUTTON1) {
xdg_toplevel_move(xdg_toplevel(), scr_driver->seat->wl_seat, scr_driver->seat->serial);
- Fl_Wayland_Screen_Driver::in_xdg_toplevel_move = true;
+ Fl::pushed(NULL);
+ Fl::e_state = 0;
}
} else if (fl_win->kind == SUBWINDOW && fl_win->subsurface) {
wl_subsurface_set_position(fl_win->subsurface, pWindow->x() * f, pWindow->y() * f);