1
Window / Re: Windows gains focus only at borded
« on: August 28, 2013, 03:59:44 pm »
Using a tracking flag seems fine, though the one suggestion I would have is to wrap the check in a helper function such that if more logic needs to be added you don't have to fiddle with each message separately. Just a trivial sort of rule of thumb type thing.
As to the behavior, I actually ended up putting in a flag on the window to control the behavior in my slightly modified SFML 2.1 because in one place dropping the click was completely appropriate but in another it was extremely annoying. I'm working on a little secondary helper (debug) tools window for editing some items and not being able to click a button immediately without double clicking in that window was annoying. Clicking on the viewport windows to activate them before mouse clicks were accepted was perfectly fine though.
I still think it would be possible to simply delay the send of the activation click and post it immediately after WM_SETFOCUS is processed, I just wanted the lightest change possible and figured I'd post it for further discussion.
As to the behavior, I actually ended up putting in a flag on the window to control the behavior in my slightly modified SFML 2.1 because in one place dropping the click was completely appropriate but in another it was extremely annoying. I'm working on a little secondary helper (debug) tools window for editing some items and not being able to click a button immediately without double clicking in that window was annoying. Clicking on the viewport windows to activate them before mouse clicks were accepted was perfectly fine though.
I still think it would be possible to simply delay the send of the activation click and post it immediately after WM_SETFOCUS is processed, I just wanted the lightest change possible and figured I'd post it for further discussion.