[vlc-commits] [Git][videolan/vlc][master] qt: do not check always false variable in `csdmenu_wayland.c`
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri May 2 15:36:35 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
e1fe8e6d by Fatih Uzunoglu at 2025-05-02T14:56:12+00:00
qt: do not check always false variable in `csdmenu_wayland.c`
Since calloc is used, this variable remains false and this
prevents calling `xdg_toplevel_show_window_menu()`.
- - - - -
1 changed file:
- modules/gui/qt/util/csdmenu_wayland.c
Changes:
=====================================
modules/gui/qt/util/csdmenu_wayland.c
=====================================
@@ -26,7 +26,6 @@ typedef struct {
struct wl_event_queue* queue;
struct xdg_wm_base *wm_base;
struct xdg_toplevel *toplevel;
- bool supportWindowMenu;
} csd_menu_priv_t;
static void csd_registry_global_cb(void* data, struct wl_registry* registry,
@@ -57,7 +56,7 @@ static bool CSDMenuPopup(qt_csd_menu_t* p_this, qt_csd_menu_event* event)
csd_menu_priv_t* sys = (csd_menu_priv_t*)p_this->p_sys;
assert (event->platform == QT_CSD_PLATFORM_WAYLAND);
- if (!sys->supportWindowMenu)
+ if (unlikely(!sys->toplevel))
return false;
xdg_toplevel_show_window_menu(sys->toplevel, event->data.wayland.seat, event->data.wayland.serial, event->x, event->y);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e1fe8e6dea0dc8becc16ad0913e35df4a999ba5e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e1fe8e6dea0dc8becc16ad0913e35df4a999ba5e
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list