diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-03-03 09:28:12 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-03-03 09:28:12 +0100 |
| commit | 37764fcd28e566c14373acf2844d9647d390ecdf (patch) | |
| tree | e07ca28b151a982d89f6d0c8ffd2c5a6562b3c21 | |
| parent | 8f24d7f295338143b012589bf0095db62f19004e (diff) | |
Improve Fl_Wayland_Window_Driver::wld_scale()
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 5166581c3..82186560e 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1742,7 +1742,8 @@ void Fl_Wayland_Window_Driver::menu_window_area(int &X, int &Y, int &W, int &H, int Fl_Wayland_Window_Driver::wld_scale() { - if (!wld_window || !wld_window->output) { + struct wld_window *xid = (struct wld_window *)Fl_X::flx(pWindow)->xid; + if (!xid->output) { Fl_Wayland_Screen_Driver::output *output; int scale = 1; Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver(); @@ -1751,7 +1752,7 @@ int Fl_Wayland_Window_Driver::wld_scale() { } return scale; } - return wld_window->output->wld_scale; + return xid->output->wld_scale; } |
