Mouse over active window title bar event
Opened this issue · 2 comments
renebrandel commented
I’d like to have an event that is raised when my mouse hovers over the title bar of the active window. I’m trying to build a window management app that can use vim like commands “jkl;” to snap the window to the right places. I don’t see an existing event that can help with that. Any advice?
tmandry commented
You can subscribe to global mouse events through some of the normal system
APIs (I can’t remember them off the top of my head), and match up their
coordinates to window coordinates that you get from Swindler.
If you need to know the coordinates of the title bar specifically, you’ll
probably want to get the raw AXUIElement from Swindler and look for child
elements with that role (look through the enum AXRole in my AXSwift
library).
On Tue, Jul 9, 2019 at 12:56 PM Rene Brandel ***@***.***> wrote:
I’d like to have an event that is raised when my mouse hovers over the
title bar of the active window. I’m trying to build a window management app
that can use vim like commands “jkl;” to snap the window to the right
places. I don’t see an existing event that can help with that. Any advice?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#63?email_source=notifications&email_token=AARMYYDSJIPXTETMKIRP7XLP6TUO5A5CNFSM4H7IZ3QKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G6F6UIQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARMYYGBN7GNWRCL4MC627DP6TUO5ANCNFSM4H7IZ3QA>
.
--
Tyler Mandry
renebrandel commented
Thanks Tyler for the quick response.
you’ll probably want to get the raw AXUIElement from Swindler and look for child
elements with that role
Is there a way to easily get the raw AXElement through the Swindler window. Just looking at the Window
definition, I wasn’t able to access the raw AXElement.