aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r--src/FocusControl.cc19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index eeacc3b..63ca773 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -401,21 +401,30 @@ void FocusControl::dirFocus(FluxboxWindow &win, FocusDir dir) {
401 401
402} 402}
403 403
404void FocusControl::ignoreAtPointer() 404void FocusControl::ignoreAtPointer(bool force)
405{ 405{
406 int ignore_i; 406 int ignore_i, ignore_x, ignore_y;
407 unsigned int ignore_ui; 407 unsigned int ignore_ui;
408 Window ignore_w; 408 Window ignore_w;
409 409
410 XQueryPointer(m_screen.rootWindow().display(), 410 XQueryPointer(m_screen.rootWindow().display(),
411 m_screen.rootWindow().window(), &ignore_w, &ignore_w, 411 m_screen.rootWindow().window(), &ignore_w, &ignore_w,
412 &m_ignore_mouse_x, &m_ignore_mouse_y, 412 &ignore_x, &ignore_y,
413 &ignore_i, &ignore_i, &ignore_ui); 413 &ignore_i, &ignore_i, &ignore_ui);
414
415 this->ignoreAt(ignore_x, ignore_y, force);
416}
417
418void FocusControl::ignoreAt(int x, int y, bool force)
419{
420 if (force || this->focusModel() == MOUSEFOCUS) {
421 m_ignore_mouse_x = x; m_ignore_mouse_y = y;
422 }
414} 423}
415 424
416void FocusControl::ignoreAt(int x, int y) 425void FocusControl::ignoreCancel()
417{ 426{
418 m_ignore_mouse_x = x; m_ignore_mouse_y = y; 427 m_ignore_mouse_x = m_ignore_mouse_y = -1;
419} 428}
420 429
421bool FocusControl::isIgnored(int x, int y) 430bool FocusControl::isIgnored(int x, int y)