aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 7aaeb41..33bf9bc 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.155 2003/04/28 13:38:23 rathnor Exp $ 25// $Id: Window.cc,v 1.156 2003/05/01 13:19:36 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -201,7 +201,7 @@ FluxboxWindow::FluxboxWindow(WinClient &client, BScreen &scr, FbWinFrameTheme &t
201 m_workspacesig(*this), 201 m_workspacesig(*this),
202 m_diesig(*this), 202 m_diesig(*this),
203 moving(false), resizing(false), shaded(false), maximized(false), 203 moving(false), resizing(false), shaded(false), maximized(false),
204 visible(false), iconic(false), transient(false), focused(false), 204 iconic(false), transient(false), focused(false),
205 stuck(false), modal(false), send_focus_message(false), m_managed(false), 205 stuck(false), modal(false), send_focus_message(false), m_managed(false),
206 screen(scr), 206 screen(scr),
207 timer(this), 207 timer(this),
@@ -233,7 +233,7 @@ FluxboxWindow::FluxboxWindow(Window w, BScreen &scr, FbWinFrameTheme &tm,
233 m_workspacesig(*this), 233 m_workspacesig(*this),
234 m_diesig(*this), 234 m_diesig(*this),
235 moving(false), resizing(false), shaded(false), maximized(false), 235 moving(false), resizing(false), shaded(false), maximized(false),
236 visible(false), iconic(false), transient(false), focused(false), 236 iconic(false), transient(false), focused(false),
237 stuck(false), modal(false), send_focus_message(false), m_managed(false), 237 stuck(false), modal(false), send_focus_message(false), m_managed(false),
238 screen(scr), 238 screen(scr),
239 timer(this), 239 timer(this),
@@ -850,7 +850,6 @@ void FluxboxWindow::getWMHints() {
850 //!! 850 //!!
851 XWMHints *wmhint = XGetWMHints(display, m_client->window()); 851 XWMHints *wmhint = XGetWMHints(display, m_client->window());
852 if (! wmhint) { 852 if (! wmhint) {
853 visible = true;
854 iconic = false; 853 iconic = false;
855 focus_mode = F_PASSIVE; 854 focus_mode = F_PASSIVE;
856 m_client->window_group = None; 855 m_client->window_group = None;
@@ -1152,11 +1151,10 @@ bool FluxboxWindow::setInputFocus() {
1152 return false; 1151 return false;
1153 } 1152 }
1154 1153
1155 m_frame.setFocus(true);
1156 screen.setFocusedWindow(*m_client); 1154 screen.setFocusedWindow(*m_client);
1157 1155
1158 Fluxbox::instance()->setFocusedWindow(this); 1156 Fluxbox::instance()->setFocusedWindow(this);
1159 1157
1160 if (send_focus_message) 1158 if (send_focus_message)
1161 m_client->sendFocus(); 1159 m_client->sendFocus();
1162 1160
@@ -1191,7 +1189,6 @@ void FluxboxWindow::iconify() {
1191 return; 1189 return;
1192 1190
1193 m_windowmenu.hide(); 1191 m_windowmenu.hide();
1194 visible = false;
1195 iconic = true; 1192 iconic = true;
1196 1193
1197 setState(IconicState); 1194 setState(IconicState);
@@ -1229,7 +1226,6 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
1229 bool was_iconic = iconic; 1226 bool was_iconic = iconic;
1230 1227
1231 iconic = false; 1228 iconic = false;
1232 visible = true;
1233 setState(NormalState); 1229 setState(NormalState);
1234 1230
1235 ClientList::iterator client_it = clientList().begin(); 1231 ClientList::iterator client_it = clientList().begin();
@@ -1283,7 +1279,6 @@ void FluxboxWindow::close() {
1283 Set window in withdrawn state 1279 Set window in withdrawn state
1284*/ 1280*/
1285void FluxboxWindow::withdraw() { 1281void FluxboxWindow::withdraw() {
1286 visible = false;
1287 iconic = false; 1282 iconic = false;
1288 1283
1289 if (isResizing()) 1284 if (isResizing())
@@ -1989,7 +1984,7 @@ void FluxboxWindow::mapNotifyEvent(XMapEvent &ne) {
1989 if (client == 0) 1984 if (client == 0)
1990 return; 1985 return;
1991 1986
1992 if (!ne.override_redirect && visible) { 1987 if (!ne.override_redirect && isVisible()) {
1993 Fluxbox *fluxbox = Fluxbox::instance(); 1988 Fluxbox *fluxbox = Fluxbox::instance();
1994 fluxbox->grab(); 1989 fluxbox->grab();
1995 if (! validateClient()) 1990 if (! validateClient())
@@ -2005,7 +2000,6 @@ void FluxboxWindow::mapNotifyEvent(XMapEvent &ne) {
2005 if (focused) 2000 if (focused)
2006 m_frame.setFocus(true); 2001 m_frame.setFocus(true);
2007 2002
2008 visible = true;
2009 iconic = false; 2003 iconic = false;
2010 2004
2011 // Auto-group from tab? 2005 // Auto-group from tab?
@@ -2468,13 +2462,11 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2468 !isVisible()) { 2462 !isVisible()) {
2469 return; 2463 return;
2470 } 2464 }
2471
2472 if (ev.window == frame().window() || 2465 if (ev.window == frame().window() ||
2473 ev.window == m_client->window()) { 2466 ev.window == m_client->window()) {
2474 if ((screen.isSloppyFocus() || screen.isSemiSloppyFocus()) 2467 if ((screen.isSloppyFocus() || screen.isSemiSloppyFocus())
2475 && !isFocused()) { 2468 && !isFocused()) {
2476 2469
2477
2478 // check that there aren't any subsequent leave notify events in the 2470 // check that there aren't any subsequent leave notify events in the
2479 // X event queue 2471 // X event queue
2480 XEvent dummy; 2472 XEvent dummy;
@@ -2482,11 +2474,9 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
2482 sa.w = ev.window; 2474 sa.w = ev.window;
2483 sa.enter = sa.leave = False; 2475 sa.enter = sa.leave = False;
2484 XCheckIfEvent(display, &dummy, queueScanner, (char *) &sa); 2476 XCheckIfEvent(display, &dummy, queueScanner, (char *) &sa);
2485 2477
2486 if ((!sa.leave || sa.inferior) && setInputFocus()) 2478 if ((!sa.leave || sa.inferior) && setInputFocus())
2487 installColormap(True); 2479 installColormap(True);
2488
2489
2490 } 2480 }
2491 } 2481 }
2492} 2482}