- changed version to alpha03
Don't deselect when bringing window into focus via click
I think that deselecting via a click on nothing is a reasonable feature, but I don't think it should happen when the app does not have focus. E.g. you switch to your web browser or your email app and then you click on a portion of the treeview app window to bring it forward. In instances like that, I don't think that a deselection should happen.
Comments (14)
-
reporter -
repo owner Should be a decently easy fix. There only needs to be a hasFocus() check for the appropriate JComponent. I'll take it up.
-
repo owner -
assigned issue to
-
assigned issue to
-
reporter Incidentally, I think basically nothing should happen when the window is not in focus unless they hold down the command key. I frequently interact with windows that are not in focus by holding down the command key. Here's how I would describe what happens in other apps when clicking on an app/window that is behind another window:
Action: left-click on a window that is not in focus Result: window comes into focus and nothing changes in the app (nothing is selected/deselected, buttons are not pressed, etc - the only thing that happens is the window comes into focus)
Action: command-left-click on a window that is not in focus Result 1: The window remains not in focus Result 2: the interface behaves as it would if there was a regular left-click (no command key down) (Non-)Result 3: any action that is triggered via a command-click in the app simply is not possible when the window is not in focus
Action: command-otherOptionalModifier-(left/right)-click-(optionalHold) Result 1: The window remains not in focus Result 2: the interface behaves as it would if there was a custom-click (but with no command key down)
-
repo owner - changed status to resolved
As far as I can tell the CMD + Out-of-focus action is absolutely non-trivial short of implementing this in C.
Java does not allow OS-level programming for the most part. You may not decide via Java if a window is pulled in focus or not. That's the job of the OS. This means that if you click on the Window even with held-down CMD it WILL become active. The reason for this is security as cited by Java documentation as well as Java being multi-platform.
I still resolved the original issue. When the window is not active (in background) the selection won't be affected when clicking the window.
-
reporter Actually, command-clicking a non-focussed window in Mac OS X does not bring it into focus. I just tested it. As you said, the OS handles whether or not a window comes into focus. All treeview has to do is know whether or not it is in focus and in the context - how to treat the command-click. So it seems doable.
-
reporter Not sure how Linux or Windows implements this behavior for its apps. Does windows even have a way to interact with an unfocussed window? It's been around for Macs for as long as I can remember.
-
repo owner - changed status to open
Opening this again. I will try to implement the CMD+Unfocused behavior for OSX. This isn't usual behavior for Windows or Linux as far as I can tell (after some trial & search) but if it is native OSX the Mac-specific inclusion should be worth it.
-
- changed version to alpha04
-
reporter - changed milestone to Selecting Data
-
reporter - changed component to Selecting Data
-
reporter - removed milestone
Removing milestone: Selecting Data (automated comment)
-
repo owner - changed status to on hold
-
reporter - changed version to beta2
- Log in to comment