Feature request: show a hint in the center of the window if the window's upper left corner is obscured. #50

philc opened this Issue Mar 26, 2012 · 4 comments


None yet

2 participants

philc commented Mar 26, 2012

This will allow you to show hints for more windows. Today, if the bulk of a window is showing but something is obscuring the upper left corner of the window, you can't select it with window hints.

The caveats to doing this are

  1. You may need to visibility test two points in a window instead of just one, which may slow down how quickly you can show hints if that visibility test is expensive.
  2. The placement of the hints will not always be in the same place on the window -- sometimes it's the upper left, sometimes its centered.
@jigish jigish was assigned Mar 26, 2012
@jigish jigish pushed a commit that referenced this issue Mar 27, 2012
Jigish Patel [Issue #50] smart location choosing for hints 7ed6eef
jigish commented Mar 27, 2012

I have implemented this in the following manner:

windowHintsTopLeftX and windowHintsTopLeftY are now arrays of expressions. Their sizes should be equal and non-zero (or all hint operations will fail validation during startup). The hint operation will first check the locations in the arrays sequentially until it finds a valid one, then display the hint there. if all the locations are invalid, it will not display a hint for that window. the new default values are:

config windowHintsTopLeftX (windowSizeX/2)-(windowHintsWidth/2);0
config windowHintsTopLeftY (windowSizeY/2)-(windowHintsHeight/2);0

which means that hint operations will first try to show the hint in the center of the window, and if the center is covered, try the top-left of the window.

@jigish jigish closed this Mar 27, 2012
jigish commented Mar 27, 2012

should be available in 0.4.19 when I release it (still want to address #51 first)

philc commented Mar 28, 2012

Interesting. So is the default value to check center and then upper left, or is it the reverse, or is it neither?

jigish commented Mar 28, 2012

Default is to check center, then upper left (combined this suggestion as well as the suggestion to make center default). 0.4.19 is pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment