aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-22 06:44:14 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-22 06:44:14 (GMT)
commit0676161673d4347197c9d20fe3d613527633e597 (patch)
treeaf929a914d40a0b3093e9f4f1067c65dfbb01ea2
parent84e5586ca1f517c97731f6d7655d7f812ad64a65 (diff)
downloadfluxbox_pavel-0676161673d4347197c9d20fe3d613527633e597.zip
fluxbox_pavel-0676161673d4347197c9d20fe3d613527633e597.tar.bz2
if a window is prevented from stealing the focus, don't put it on top
-rw-r--r--src/Window.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index a993076..6806afa 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -549,8 +549,11 @@ void FluxboxWindow::init() {
549 // check if we should prevent this window from gaining focus 549 // check if we should prevent this window from gaining focus
550 m_focused = false; // deiconify sets this 550 m_focused = false; // deiconify sets this
551 if (!Fluxbox::instance()->isStartup() && 551 if (!Fluxbox::instance()->isStartup() &&
552 screen().focusControl().focusNew()) 552 screen().focusControl().focusNew()) {
553 m_focused = focusRequestFromClient(*m_client); 553 m_focused = focusRequestFromClient(*m_client);
554 if (!m_focused)
555 lower();
556 }
554 } 557 }
555 558
556 if (fullscreen) { 559 if (fullscreen) {
@@ -2224,12 +2227,16 @@ void FluxboxWindow::mapRequestEvent(XMapRequestEvent &re) {
2224 // Note: this function never gets called from WithdrawnState 2227 // Note: this function never gets called from WithdrawnState
2225 // initial state is handled in restoreAttributes() and init() 2228 // initial state is handled in restoreAttributes() and init()
2226 2229
2227 if (screen().focusControl().focusNew())
2228 m_focused = focusRequestFromClient(*client);
2229
2230 setCurrentClient(*client, false); // focus handled on MapNotify 2230 setCurrentClient(*client, false); // focus handled on MapNotify
2231 deiconify(); 2231 deiconify();
2232 2232
2233 if (screen().focusControl().focusNew()) {
2234 m_focused = false; // deiconify sets this
2235 m_focused = focusRequestFromClient(*client);
2236 if (!m_focused)
2237 lower();
2238 }
2239
2233} 2240}
2234 2241
2235bool FluxboxWindow::focusRequestFromClient(WinClient &from) { 2242bool FluxboxWindow::focusRequestFromClient(WinClient &from) {