mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
Prevent rare crash due to layering move / resize / menu operations
Fixes #817 Reported-by: @kode54
This commit is contained in:
parent
43fb969b19
commit
5aa5c12371
2 changed files with 10 additions and 0 deletions
|
|
@ -211,6 +211,12 @@ void action_list_free(struct wl_list *action_list)
|
||||||
static void
|
static void
|
||||||
show_menu(struct server *server, struct view *view, const char *menu_name)
|
show_menu(struct server *server, struct view *view, const char *menu_name)
|
||||||
{
|
{
|
||||||
|
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH
|
||||||
|
&& server->input_mode != LAB_INPUT_STATE_MENU) {
|
||||||
|
/* Prevent opening a menu while resizing / moving a view */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool force_menu_top_left = false;
|
bool force_menu_top_left = false;
|
||||||
struct menu *menu = menu_get_by_id(menu_name);
|
struct menu *menu = menu_get_by_id(menu_name);
|
||||||
if (!menu) {
|
if (!menu) {
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@ interactive_begin(struct view *view, enum input_mode mode, uint32_t edges)
|
||||||
struct seat *seat = &server->seat;
|
struct seat *seat = &server->seat;
|
||||||
struct wlr_box geometry = view->current;
|
struct wlr_box geometry = view->current;
|
||||||
|
|
||||||
|
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case LAB_INPUT_STATE_MOVE:
|
case LAB_INPUT_STATE_MOVE:
|
||||||
if (view->fullscreen) {
|
if (view->fullscreen) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue