summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-12 11:58:53 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-12 11:58:53 +0100
commitb375d07d32749ca0afdc508f4f7de9a87c8de573 (patch)
tree9b1aa65f9ab4a06d5a58ae67a6424b36fd3029bd /src
parent62e33973a1a2974da20097c5b6f117a92fdf4dec (diff)
New static member Fl_Window *Fl_Wayland_Window_Driver::previous_floatingtitle
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.H2
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H
index e79890bdf..1b9b930c5 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H
@@ -129,6 +129,8 @@ public:
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;
static bool tall_popup; // to support tall menu buttons
+ bool process_menu_or_tooltip(struct wld_window *);
+ static Fl_Window *previous_floatingtitle; // to support floating menuwindow w/ title
};
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index c00e2edfe..b679b99f3 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -58,6 +58,8 @@ Window fl_window = 0;
struct wld_window *Fl_Wayland_Window_Driver::wld_window = NULL;
bool Fl_Wayland_Window_Driver::tall_popup = false; // to support tall menu buttons
+// A menutitle to be mapped later as the child of a menuwindow
+Fl_Window *Fl_Wayland_Window_Driver::previous_floatingtitle = NULL;
void Fl_Wayland_Window_Driver::destroy_double_buffer() {
@@ -1004,7 +1006,7 @@ static const char *get_prog_name() {
a submenu window and that don't belong to an Fl_Menu_Bar are processed differently:
the menuwindow is mapped first, and the menutitle is mapped second above it as a child popup.
Fl_Window_Driver::is_floating_title() detects when such a menutitle is created,
- global variable previous_floatingtitle is assigned the value of this menutitle, and
+ static member variable previous_floatingtitle is assigned the value of this menutitle, and
the menutitle is mapped only after the menuwindow has been mapped, as a child of it.
This positions the popup group in the display better in relation to where the popup
was created.
@@ -1023,14 +1025,11 @@ static const char *get_prog_name() {
item, when there's one, is visible.
*/
-// A menutitle to be mapped later as the child of a menuwindow
-static Fl_Window *previous_floatingtitle = NULL;
-static bool process_menu_or_tooltip(struct wld_window *new_window) {
+bool Fl_Wayland_Window_Driver::process_menu_or_tooltip(struct wld_window *new_window) {
// a menu window or tooltip
new_window->kind = Fl_Wayland_Window_Driver::POPUP;
Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver();
- Fl_Window *pWindow = new_window->fl_win;
new_window->xdg_surface = xdg_wm_base_get_xdg_surface(scr_driver->xdg_wm_base, new_window->wl_surface);
xdg_surface_add_listener(new_window->xdg_surface, &xdg_surface_listener, new_window);
if (Fl_Window_Driver::is_floating_title(pWindow)) {