Skip to content

Commit 96fbc30

Browse files
authored
fix(app): drag region for native controls (anomalyco#11854)
1 parent ba545ba commit 96fbc30

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

packages/app/src/components/titlebar.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,16 @@ export function Titlebar() {
137137
<header
138138
class="h-10 shrink-0 bg-background-base relative grid grid-cols-[auto_minmax(0,1fr)_auto] items-center"
139139
style={{ "min-height": minHeight() }}
140-
data-tauri-drag-region
141140
>
142141
<div
143142
classList={{
144143
"flex items-center min-w-0": true,
145144
"pl-2": !mac(),
146145
}}
147146
onMouseDown={drag}
148-
data-tauri-drag-region
149147
>
150148
<Show when={mac()}>
151-
<div class="h-full shrink-0" style={{ width: `${72 / zoom()}px` }} data-tauri-drag-region />
149+
<div class="h-full shrink-0" style={{ width: `${72 / zoom()}px` }} />
152150
<div class="xl:hidden w-10 shrink-0 flex items-center justify-center">
153151
<IconButton
154152
icon="menu"
@@ -222,13 +220,10 @@ export function Titlebar() {
222220
</Tooltip>
223221
</div>
224222
</div>
225-
<div id="opencode-titlebar-left" class="flex items-center gap-3 min-w-0 px-2" data-tauri-drag-region />
223+
<div id="opencode-titlebar-left" class="flex items-center gap-3 min-w-0 px-2" />
226224
</div>
227225

228-
<div
229-
class="min-w-0 flex items-center justify-center pointer-events-none lg:absolute lg:inset-0 lg:flex lg:items-center lg:justify-center"
230-
data-tauri-drag-region
231-
>
226+
<div class="min-w-0 flex items-center justify-center pointer-events-none lg:absolute lg:inset-0 lg:flex lg:items-center lg:justify-center">
232227
<div id="opencode-titlebar-center" class="pointer-events-auto w-full min-w-0 flex justify-center lg:w-fit" />
233228
</div>
234229

@@ -238,9 +233,8 @@ export function Titlebar() {
238233
"pr-6": !windows(),
239234
}}
240235
onMouseDown={drag}
241-
data-tauri-drag-region
242236
>
243-
<div id="opencode-titlebar-right" class="flex items-center gap-3 shrink-0 justify-end" data-tauri-drag-region />
237+
<div id="opencode-titlebar-right" class="flex items-center gap-3 shrink-0 justify-end" />
244238
<Show when={windows()}>
245239
<div class="w-6 shrink-0" />
246240
<div data-tauri-decorum-tb class="flex flex-row" />

packages/desktop/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</head>
1818
<body class="antialiased overscroll-none text-12-regular overflow-hidden">
1919
<noscript>You need to enable JavaScript to run this app.</noscript>
20-
<div id="root" class="flex flex-col h-dvh p-px"></div>
20+
<div id="root" class="flex flex-col h-dvh"></div>
2121
<div data-tauri-decorum-tb class="w-0 h-0 hidden" />
2222
<script src="/src/index.tsx" type="module"></script>
2323
</body>

0 commit comments

Comments
 (0)