You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to implement a window that automatically snaps/sticks to the bottom of the screen (similar to a desktop widget or an overlay).
Current Approach: Currently, I am calculating the window position manually: top = screen_height - window_height
The Problem: This logic does not account for the system UI, such as the Windows Taskbar or the macOS Dock. As a result, my window ends up being partially covered by the taskbar or overlaps it, rather than sitting right above it.
What I need: Ideally, I need to calculate the position like this: top = screen_height - window_height - taskbar_height
Or, even better, access the monitor's "Work Area" (the available screen space excluding system bars).
My Question: Does it expose any API to:
Get the height of the Taskbar/Dock?
Or retrieve the bounds of the usable "Work Area" for a specific monitor?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
I am currently trying to implement a window that automatically snaps/sticks to the bottom of the screen (similar to a desktop widget or an overlay).
Current Approach: Currently, I am calculating the window position manually:
top = screen_height - window_heightThe Problem: This logic does not account for the system UI, such as the Windows Taskbar or the macOS Dock. As a result, my window ends up being partially covered by the taskbar or overlaps it, rather than sitting right above it.
What I need: Ideally, I need to calculate the position like this:
top = screen_height - window_height - taskbar_heightOr, even better, access the monitor's "Work Area" (the available screen space excluding system bars).
My Question: Does it expose any API to:
Thanks in advance for any suggestions!
Beta Was this translation helpful? Give feedback.
All reactions