mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
core: improve evdev capslock detection, wayland context fixes
This commit is contained in:
@@ -193,12 +193,9 @@ DankModal {
|
||||
let targetX = parentBounds.x + (parentBounds.width - width) / 2
|
||||
let targetY = parentBounds.y + (parentBounds.height - height) / 2
|
||||
|
||||
const minX = margin
|
||||
const maxX = screenW - width - margin
|
||||
const minY = SettingsData.dankBarPosition === SettingsData.Position.Top ? barExclusionZone + margin : margin
|
||||
const maxY = SettingsData.dankBarPosition === SettingsData.Position.Bottom ? screenH - height - barExclusionZone - margin : screenH - height - margin
|
||||
|
||||
targetX = Math.max(minX, Math.min(maxX, targetX))
|
||||
targetY = Math.max(minY, Math.min(maxY, targetY))
|
||||
|
||||
return Qt.point(targetX, targetY)
|
||||
|
||||
Reference in New Issue
Block a user