summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-12-28 08:43:22 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-12-28 08:43:22 +0100
commit86adfe0dbec66773202fbf207d5182ac9596d257 (patch)
treef973f0f8e88a816bc94742ed4e22015bccb5ac9a
parentb6cdb8ef25466a52336a9c6d88bf14627da8e57f (diff)
Wayland: simplify function struct wl_display *fl_wl_display()
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 03b550062..0cd24a890 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -1557,6 +1557,5 @@ int Fl_Wayland_Screen_Driver::get_key(int k) {
struct wl_display *fl_wl_display() {
- if (!Fl_Wayland_Screen_Driver::wl_display || !Fl_Wayland_Screen_Driver::wl_registry) return NULL;
- return Fl_Wayland_Screen_Driver::wl_display;
+ return (Fl_Wayland_Screen_Driver::wl_registry ? Fl_Wayland_Screen_Driver::wl_display : NULL);
}