From 86adfe0dbec66773202fbf207d5182ac9596d257 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 28 Dec 2022 08:43:22 +0100 Subject: Wayland: simplify function struct wl_display *fl_wl_display() --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/drivers') 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); } -- cgit v1.2.3