From fbfecde4be2b1d7b539d639a1baa2f59d24435a5 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Tue, 7 Aug 2018 19:18:22 +0900 Subject: [PATCH] Allow windows to be dragged by menu bars --- lib/menu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/menu.c b/lib/menu.c index 3333fe49..1c02ba99 100644 --- a/lib/menu.c +++ b/lib/menu.c @@ -901,5 +901,9 @@ int menu_bar_mouse_event(yutani_t * yctx, yutani_window_t * window, struct menu_ _entries++; } + if (x >= offset && me->command == YUTANI_MOUSE_EVENT_DOWN && me->buttons & YUTANI_MOUSE_BUTTON_LEFT) { + yutani_window_drag_start(yctx, window); + } + return 0; }