This commit is contained in:
nakst 2021-10-04 19:46:22 +01:00
parent aabd7dbf36
commit 4d1c7ace98
2 changed files with 9 additions and 2 deletions

View File

@ -967,12 +967,16 @@ int WindowTabBandMessage(EsElement *element, EsMessage *message) {
EsMenuAddItem(menu, ES_FLAGS_DEFAULT,
INTERFACE_STRING(DesktopSnapWindowLeft), [] (EsMenu *, EsGeneric context) {
WindowSnap((EsWindow *) context.p, false, false, SNAP_EDGE_LEFT);
EsWindow *window = (EsWindow *) context.p;
if (window->isMaximised) WindowRestore(window, false /* we immediately move the window after this */);
WindowSnap(window, false, false, SNAP_EDGE_LEFT);
}, band->window);
EsMenuAddItem(menu, ES_FLAGS_DEFAULT,
INTERFACE_STRING(DesktopSnapWindowRight), [] (EsMenu *, EsGeneric context) {
WindowSnap((EsWindow *) context.p, false, false, SNAP_EDGE_RIGHT);
EsWindow *window = (EsWindow *) context.p;
if (window->isMaximised) WindowRestore(window, false /* we immediately move the window after this */);
WindowSnap(window, false, false, SNAP_EDGE_RIGHT);
}, band->window);
EsMenuShow(menu);

View File

@ -858,6 +858,9 @@ int ProcessRootMessage(EsElement *element, EsMessage *message) {
if (window->windowStyle == ES_WINDOW_MENU) {
EsAssert(window->state & UI_STATE_MENU_EXITING);
}
} else if (message->type == ES_MSG_MOUSE_LEFT_DOWN || message->type == ES_MSG_MOUSE_MIDDLE_DOWN || message->type == ES_MSG_MOUSE_RIGHT_DOWN) {
// Make sure that something can be dragged, otherwise elements will get mouse dragged messages when the mouse moves over them.
response = ES_HANDLED;
}
return response;