Skip to content

Commit

Permalink
Fix edge cases around macos draggability (#1291)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Oct 25, 2023
1 parent 6637923 commit e330d0c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/macos-titlebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 */
Expand All @@ -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;
Expand Down

0 comments on commit e330d0c

Please sign in to comment.