diff options
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Screen_Driver.H | 3 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 4 | ||||
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 27 |
3 files changed, 9 insertions, 25 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H index 2b9580863..d5a7ed9ad 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H @@ -2,7 +2,7 @@ // Definition of the Wayland Screen interface // for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2023 by Bill Spitzak and others. +// Copyright 2010-2024 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -170,6 +170,7 @@ public: int get_key(int k) FL_OVERRIDE; void enable_im() FL_OVERRIDE; void disable_im() FL_OVERRIDE; + bool screen_boundaries_known() FL_OVERRIDE { return false; } // overridden functions from parent class Fl_Unix_Screen_Driver int poll_or_select_with_delay(double time_to_wait) FL_OVERRIDE; diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H index 8d50fe3cf..e0eca821e 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H @@ -1,7 +1,7 @@ // // Definition of Wayland window driver for the Fast Light Tool Kit (FLTK). // -// Copyright 2010-2023 by Bill Spitzak and others. +// Copyright 2010-2024 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -132,8 +132,6 @@ public: int scroll(int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, void (*draw_area)(void*, int,int,int,int), void* data) FL_OVERRIDE; void wait_for_expose() FL_OVERRIDE; - void popup_window(bool v) FL_OVERRIDE; - bool popup_window() FL_OVERRIDE; // menu-related stuff void reposition_menu_window(int x, int y) FL_OVERRIDE; void menu_window_area(int &X, int &Y, int &W, int &H, int nscreen = -1) FL_OVERRIDE; diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index dacfdde1d..5979ce0d9 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1,7 +1,7 @@ // // Implementation of the Wayland window driver. // -// Copyright 1998-2023 by Bill Spitzak and others. +// Copyright 1998-2024 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -1377,6 +1377,9 @@ void Fl_Wayland_Window_Driver::makeWindow() if (pWindow->parent() && !pWindow->window()) return; if (pWindow->parent() && !pWindow->window()->shown()) return; + if (!pWindow->parent() && !popup_window()) { + x(0); y(0); // toplevel, non-popup windows must have origin at 0,0 + } new_window = (struct wld_window *)calloc(1, sizeof *new_window); new_window->fl_win = pWindow; wl_list_init(&new_window->outputs); @@ -1398,7 +1401,7 @@ void Fl_Wayland_Window_Driver::makeWindow() // put transient scale win at center of top window by making it a tooltip of top Fl_Screen_Driver::transient_scale_parent = Fl::first_window(); pWindow->set_tooltip_window(); - popup_window(true); + set_popup_window(); pWindow->position( (Fl_Screen_Driver::transient_scale_parent->w() - pWindow->w())/2 , (Fl_Screen_Driver::transient_scale_parent->h() - pWindow->h())/2); @@ -1849,20 +1852,12 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) { if (W < 1) W = 1; if (H < 1) H = 1; } - // toplevel, non-popup windows must have origin at 0,0 - if (!pWindow->parent() && !popup_window()) X = Y = 0; pWindow->Fl_Group::resize(X,Y,W,H); //fprintf(stderr, "resize: win=%p to %dx%d\n", pWindow, W, H); if (shown()) {pWindow->redraw();} } else { - if (pWindow->parent() || popup_window()) { - x(X); y(Y); + x(X); y(Y); //fprintf(stderr, "move menuwin=%p x()=%d\n", pWindow, X); - } else { - //"a deliberate design trait of Wayland makes application windows ignorant of - // their exact placement on screen" - x(0); y(0); - } } if (shown()) { @@ -2167,13 +2162,3 @@ void Fl_Wayland_Window_Driver::un_maximize() { struct wld_window *xid = (struct wld_window *)Fl_X::flx(pWindow)->xid; if (xid->kind == DECORATED) libdecor_frame_unset_maximized(xid->frame); } - - -void Fl_Wayland_Window_Driver::popup_window(bool v) { - is_popup_window_ = v; -} - - -bool Fl_Wayland_Window_Driver::popup_window() { - return is_popup_window_; -} |
