aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r--src/FocusControl.cc25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index 78752bb..701373b 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -81,7 +81,8 @@ FocusControl::FocusControl(BScreen &screen):
81 m_focused_win_list(screen), m_creation_order_win_list(screen), 81 m_focused_win_list(screen), m_creation_order_win_list(screen),
82 m_cycling_list(0), 82 m_cycling_list(0),
83 m_was_iconic(false), 83 m_was_iconic(false),
84 m_cycling_last(0) { 84 m_cycling_last(0),
85 m_ignore_mouse_x(-1), m_ignore_mouse_y(-1) {
85 86
86 m_cycling_window = m_focused_list.clientList().end(); 87 m_cycling_window = m_focused_list.clientList().end();
87 88
@@ -400,6 +401,28 @@ void FocusControl::dirFocus(FluxboxWindow &win, FocusDir dir) {
400 401
401} 402}
402 403
404void FocusControl::ignoreAtPointer()
405{
406 int ignore_i;
407 unsigned int ignore_ui;
408 Window ignore_w;
409
410 XQueryPointer(m_screen.rootWindow().display(),
411 m_screen.rootWindow().window(), &ignore_w, &ignore_w,
412 &m_ignore_mouse_x, &m_ignore_mouse_y,
413 &ignore_i, &ignore_i, &ignore_ui);
414}
415
416void FocusControl::ignoreAt(int x, int y)
417{
418 m_ignore_mouse_x = x; m_ignore_mouse_y = y;
419}
420
421bool FocusControl::isIgnored(int x, int y)
422{
423 return x == m_ignore_mouse_x && y == m_ignore_mouse_y;
424}
425
403void FocusControl::removeClient(WinClient &client) { 426void FocusControl::removeClient(WinClient &client) {
404 if (client.screen().isShuttingdown()) 427 if (client.screen().isShuttingdown())
405 return; 428 return;