summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2007-07-30 08:04:55 -0400
committerDavid Reveman <davidr@novell.com>2007-07-30 08:04:55 -0400
commit00c815375083262721bb1d5fcbcd42ca93f02578 (patch)
treeead224c4bc3d64714d025cf696e5618985f19481
parent6494af1463f2dbe60fe16371de5a989852aa373a (diff)
Revert "First attempt to focus the window under the pointer if 'click to focus' is not enabled."
-rw-r--r--src/display.c35
1 files changed, 0 insertions, 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)