Monitor if user clicks the window-bar for a window that is already frontmost

It seems that in Xojo there is no way to monitor clicking on the window title bar.
I wonder if using declares (in macOS) that can be possible.
Any suggestion?

Thanks a lot.

Luciano

Which OS? AFAIK there isn’t anything in the macOS, it doesn’t mean that there isn’t, just that I’ve not seen anything like this.

What is it you’re trying to accomplish?

In-app WindowShade functionality (information extracted from TOF).

Oh…
While there’s no direct way I know of accessing this, you could use some view injection to insert a canvas into the window chrome and capture the double click event. Xojo will fight you for messing with the view hierarchy and the OS might not be too pleased about having the entire title bar covered with a canvas, it could even be possible that the OS might actually use some magic in the window title which would prevent this from working.

I covered View injection into the title bar / toolbar in the Ohanaware App Kit (App Kit 2021 - Building Better Mac Applications).

Its how I colorized the title bar / toolbar.

But a word of warning… The user can set on an OS level to either minimize a window or zoom a window by double clicking it, they may not appreciate an application behaving differently from everything else.

System Settings ➜ Desktop And Dock ➜ Double-click a window’s title bar to.

1 Like

Thanks Sam!
I got a simper suggestion from the Xojo Forum that might work better for me.
But thanks again … and by the way I loved windowShade! I had it installed on my Mac for many years !!!

Glad that you have a solution.

I don’t recall how I felt about WindowShade, I think I prefer minimizing to the Doc personally. Or if you’ve only got a small single window, perhaps to the menubar.

Edited: One thing I will add, if you’re only developing for Apple’s platforms, I would suggest considering using Apple’s tools. What are declares in Xojo are standard functionality with Apple’s tools.