mirror of https://github.com/fltk/fltk
Fix: Wayland sends wrong events after an FL_DRAG of a top window - cont'd (#983)
This commit is contained in:
parent
9c8977eff1
commit
70c6f2ce12
|
@ -87,7 +87,6 @@ public:
|
||||||
// next length of marked text after current marked text will have been replaced
|
// next length of marked text after current marked text will have been replaced
|
||||||
static int next_marked_length;
|
static int next_marked_length;
|
||||||
static compositor_name compositor; // identifies the used Wayland compositor
|
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 member functions
|
||||||
static void insertion_point_location(int x, int y, int height);
|
static void insertion_point_location(int x, int y, int height);
|
||||||
|
|
|
@ -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::compositor_name Fl_Wayland_Screen_Driver::compositor =
|
||||||
Fl_Wayland_Screen_Driver::unspecified;
|
Fl_Wayland_Screen_Driver::unspecified;
|
||||||
|
|
||||||
bool Fl_Wayland_Screen_Driver::in_xdg_toplevel_move = false;
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
bool fl_libdecor_using_weston(void) {
|
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);
|
set_event_xy(win);
|
||||||
Fl::handle(FL_ENTER, win);
|
Fl::handle(FL_ENTER, win);
|
||||||
//fprintf(stderr, "pointer_enter window=%p\n", 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;
|
seat->pointer_focus = surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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();
|
Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver();
|
||||||
if (Fl::e_state == FL_BUTTON1) {
|
if (Fl::e_state == FL_BUTTON1) {
|
||||||
xdg_toplevel_move(xdg_toplevel(), scr_driver->seat->wl_seat, scr_driver->seat->serial);
|
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) {
|
} else if (fl_win->kind == SUBWINDOW && fl_win->subsurface) {
|
||||||
wl_subsurface_set_position(fl_win->subsurface, pWindow->x() * f, pWindow->y() * f);
|
wl_subsurface_set_position(fl_win->subsurface, pWindow->x() * f, pWindow->y() * f);
|
||||||
|
|
Loading…
Reference in New Issue