Choose window with mouse is considered as a click by "Receive Mouse Clicks"

Not directly filed as a bug report as I first wanted to know if this is the intentional behavior but when we select a window to set it to front by clicking on it, “Receive Mouse Clicks” directly fires an event.

May be unhandy for all the drawing stuff.

Maybe the first click should be ignored ? Or optionally ignored ?
Perhaps some cases could need this though.

Dunnow.

Click On Go Front.vuo (3.89 KB)

Under the assumption that it’s intentional, how about a node to ascertain whether a window is in focus? Then the composer can decide how he/she wishes to handle a window-focusing click.

@Pianomatic hey ;) Yes I don’t know. Could imagine something like it too if it had to be intentional. Maybe it can already be tricked with some hold node or something.

Just tried several applications on OSX and they actually not react all the same.

1 - Those who click on focus : If I have 2 quicktime videos open and click on a video window on the play button it plays even if the window is not top focused. Click on focus happen for Finder, Quicktime, Safari …

2 - Those who does not click on focus : Photoshop doesn’t for example. If I have a photoshop document open with a brush as a tool, choosing Photoshop doesn’t result in painting a click.

So as you say, guess this has to be optional as I can imagine different usages.

@Bodysoulspirit - That doesn’t surprise me. The Mac OS X API allows events for clicks as well as focusing and unfocusing (blurring?), leaving it up to the developer. Probably best to allow the same amount of control for Vuo composers so we can make our own determination as to how it should be handled on a composition by composition basis.

1 Like

@Bodysoulspirit - If you haven’t already, why don’t you whip up a feature request for a way to ascertain window-focus?

Did you see if there is a difference between clicking on the window and the title bar?

Presumably it should be possible to click on the title bar to bring the window into focus, then one can click on the window directly to send it an event.

It might also currently be possible to focus and unfocus a window via window attributes, not sure.

Loaded up @Bodysoulspirit’s attached composition again to check. Clicking on the title bar does not register as a click.

Here are the available vuo.window class nodes as of Vuo 1.2.1. Nothing related to focus yet.

Screen Shot 2016-02-28 at 9.10.59.png

@Pianomatic and @George_Toledo thanks. Yes clicking on the title bar does not react as a click. That was a bug that has been resolved in 1.2 if I do remember correctly.

Haven’t submitted a feature request yet as I want to have some feedback here from the team before to.

Yes, this is intentional behavior.

Just tried several applications on OSX and they actually not react all the same.

See also: Daring Fireball: Much Ado About Click-Through

Yes clicking on the title bar does not react as a click.

Glad that was brought up.

how about a node to ascertain whether a window is in focus?

Sure, that would work, and could be more generally useful as well. Another option more specific to this situation would be a node like Change Window Clickthrough or something that outputs a Window Property.

@jstrecker ok I’m gonna create a “Change Window Clickthrough” FR as I guess a node to ascertain whether a window is in focus would require more nodes to connect to avoid the first click, even if it would be useful too.

Thanks