window: Allow popup menu when the window is maximised
https://bugs.freedesktop.org/show_bug.cgi?id=66793
This commit is contained in:
parent
3cd1f860a0
commit
3c9d967688
@ -2553,7 +2553,7 @@ frame_button_handler(struct widget *widget,
|
|||||||
struct display *display = window->display;
|
struct display *display = window->display;
|
||||||
int location;
|
int location;
|
||||||
|
|
||||||
if (window->type != TYPE_TOPLEVEL)
|
if (state != WL_POINTER_BUTTON_STATE_PRESSED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
location = theme_get_location(display->theme, input->sx, input->sy,
|
location = theme_get_location(display->theme, input->sx, input->sy,
|
||||||
@ -2563,7 +2563,7 @@ frame_button_handler(struct widget *widget,
|
|||||||
THEME_FRAME_MAXIMIZED : 0);
|
THEME_FRAME_MAXIMIZED : 0);
|
||||||
|
|
||||||
if (window->display->shell && button == BTN_LEFT &&
|
if (window->display->shell && button == BTN_LEFT &&
|
||||||
state == WL_POINTER_BUTTON_STATE_PRESSED) {
|
window->type == TYPE_TOPLEVEL) {
|
||||||
switch (location) {
|
switch (location) {
|
||||||
case THEME_LOCATION_TITLEBAR:
|
case THEME_LOCATION_TITLEBAR:
|
||||||
if (!window->shell_surface)
|
if (!window->shell_surface)
|
||||||
@ -2592,7 +2592,8 @@ frame_button_handler(struct widget *widget,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (button == BTN_RIGHT &&
|
} else if (button == BTN_RIGHT &&
|
||||||
state == WL_POINTER_BUTTON_STATE_PRESSED) {
|
(window->type == TYPE_TOPLEVEL ||
|
||||||
|
window->type == TYPE_MAXIMIZED)) {
|
||||||
window_show_frame_menu(window, input, time);
|
window_show_frame_menu(window, input, time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user