IGHOR IGHOR - 11 days ago 9
C++ Question

How to get Position, Width and Height of Mac OS X Dock? Cocoa/Carbon/C++/Qt

I'm trying to get position and width of Mac OS X Dock in my C++/Qt app.
But I can only find ways to get Available space of Desktop, it means I can get Dock height, but not width.

Is there ways to get Dock position and width using native OS API?

Answer

Doesn't see like such a thing is possible, not even from the apple APIs, much less from Qt.

The only solution that comes to mind, a rather crude one, is to take a screenshot and use some basic image recognition to find the position and dimensions of the dock.