32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
$OpenBSD: patch-src_Window_cc,v 1.7 2012/08/27 10:45:44 dcoppa Exp $
|
|
|
|
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.
|
|
(upstream git commit 60a53113e05db443af4d520883ec3145680642a8)
|
|
|
|
--- src/Window.cc.orig Sat Oct 29 15:46:15 2011
|
|
+++ src/Window.cc Mon Aug 27 11:52:37 2012
|
|
@@ -446,11 +446,15 @@ void FluxboxWindow::init() {
|
|
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());
|