From 00c815375083262721bb1d5fcbcd42ca93f02578 Mon Sep 17 00:00:00 2001 From: David Reveman Date: Mon, 30 Jul 2007 08:04:55 -0400 Subject: Revert "First attempt to focus the window under the pointer if 'click to focus' is not enabled." This reverts commit bdb91a3bbc0419bba228f904804a4f74b84c2da7. --- src/display.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/display.c b/src/display.c index 8ae08390..e6ffd268 100644 --- a/src/display.c +++ b/src/display.c @@ -2576,34 +2576,6 @@ getCurrentTimeFromDisplay (CompDisplay *d) return event.xproperty.time; } -/* Attempts to focus a window located under the pointer. Returns TRUE if - * there is a window like that. FALSE otherwise. - */ -static Bool -focusPointerTarget (CompScreen *s) -{ - CompDisplay * d = s->display; - Window tmpRoot, tmpChild; - CompWindow * focus; - Bool result; - int x; - - result = XQueryPointer (d->display, s->root, &tmpRoot, &tmpChild, - &x, &x, &x, &x, (unsigned int *)&x); - - if (result && tmpChild) - { - focus = findWindowAtScreen (s, tmpChild); - if (focus && !(focus->wmType & - (CompWindowTypeDesktopMask | CompWindowTypeDockMask))) - { - moveInputFocusToWindow (focus); - return TRUE; - } - } - return FALSE; -} - void focusDefaultWindow (CompDisplay *d) { @@ -2611,13 +2583,6 @@ focusDefaultWindow (CompDisplay *d) CompWindow *w; CompWindow *focus = NULL; - if (!d->opt[COMP_DISPLAY_OPTION_CLICK_TO_FOCUS].value.b) - { - for (s = d->screens; s; s = s->next) - if (focusPointerTarget (s)) - return; - } - for (s = d->screens; s; s = s->next) { for (w = s->reverseWindows; w; w = w->prev) -- cgit v1.2.3