From e330d0c3e70136e039359bb5e3dd9455f18bd2f5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 25 Oct 2023 10:10:52 +0100 Subject: [PATCH] Fix edge cases around macos draggability (#1291) --- src/macos-titlebar.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/macos-titlebar.ts b/src/macos-titlebar.ts index ef046b59a4..7254fe404a 100644 --- a/src/macos-titlebar.ts +++ b/src/macos-titlebar.ts @@ -88,7 +88,8 @@ export function setupMacosTitleBar(window: BrowserWindow): void { } /* Mark the background as a drag handle only if no modal is open */ - .mx_MatrixChat_wrapper[aria-hidden="false"] .mx_RoomView_wrapper { + .mx_MatrixChat_wrapper[aria-hidden="false"] .mx_RoomView_wrapper, + .mx_MatrixChat_wrapper[aria-hidden="false"] .mx_HomePage { -webkit-app-region: drag; } /* Exclude content elements from being drag handles */ @@ -99,7 +100,9 @@ export function setupMacosTitleBar(window: BrowserWindow): void { .mx_RightPanel_ResizeWrapper, .mx_RoomPreviewCard, .mx_LeftPanel, - .mx_RoomView { + .mx_RoomView, + .mx_SpaceRoomView, + .mx_AccessibleButton { -webkit-app-region: no-drag; } /* Exclude context menus and their backgrounds */ @@ -123,10 +126,16 @@ export function setupMacosTitleBar(window: BrowserWindow): void { -webkit-app-region: drag; } - .mx_RoomView::before { + .mx_RoomView::before, + .mx_SpaceRoomView::before { content: ""; -webkit-app-region: drag; } + + .mx_SpaceRoomView::before { + display: block; + height: 24px; + } .mx_RoomView[data-room-header="new"]::before { height: 13px;