all repos — fluxbox @ 60a53113e05db443af4d520883ec3145680642a8

custom fork of the fluxbox windowmanager

fix sanity check for transient and explicitly placed windows

When a screen has more heads and some part of the screen is not on any
head and some window is placed into this invisible area then the window
is invisible which sucks. This patch repositions such windows so that
they are visible.
Example:
* head 1 is at (0,120) (size 640x480)
* head 2 is at (480,0) (size 800x600)
* whole screen virtual size is 1440x600
* that means rectangle from (0,0) to (640,120) is not visible on any head
  and any windows placed there would not be visible; for example wireshark
  likes to place dialog boxes at (0,0)
Peter Hercek hercek@users.sourceforge.net
commit

60a53113e05db443af4d520883ec3145680642a8

parent

71f75c70ae4e47ba0a58590aeb17152fc648edf7

1 files changed, 9 insertions(+), 5 deletions(-)

jump to
M src/Window.ccsrc/Window.cc

@@ -446,11 +446,15 @@

int real_x = frame().x(); int real_y = frame().y(); - if (real_x >= 0 && - real_y >= 0 && - real_x <= (signed) screen().width() && - real_y <= (signed) screen().height()) - m_placed = true; + if (screen().hasXinerama()) { // xinerama available => use head info + if (0 != screen().getHead(real_x, real_y)) // if visible on some head + m_placed = true; + } else { // no xinerama available => use screen info + if (real_x >= 0 && real_y >= 0 && + real_x <= (signed) screen().width() && + real_y <= (signed) screen().height()) // if visible on the screen + m_placed = true; + } } else setOnHead(screen().getCurrHead());