Fix alt-tab behavior on when primary display is not leftmost (# 683932)

This commit is contained in:
Michel Alexandre Salim 2011-03-16 20:17:46 +01:00
parent f4ef22ca6b
commit eaa5fe2c85
2 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,24 @@
From 3944df1bd24b7295180d33dba9ee7d531c1dddd4 Mon Sep 17 00:00:00 2001
From: Maxim Ermilov <zaspire@rambler.ru>
Date: Tue, 08 Mar 2011 17:15:20 +0000
Subject: altTab: fix incorrect positioning with multiple monitors
Calculate the position of the alt-tab popup correctly when primary.x != 0.
This was accidentally broken by 614176b2691981c982e77b8a04b01ff02a670857
https://bugzilla.gnome.org/show_bug.cgi?id=644206
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 44fd39d..46ab9a3 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -87,7 +87,7 @@ AltTabPopup.prototype = {
let [childMinHeight, childNaturalHeight] = this._appSwitcher.actor.get_preferred_height(primary.width - hPadding);
let [childMinWidth, childNaturalWidth] = this._appSwitcher.actor.get_preferred_width(childNaturalHeight);
childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
- childBox.x2 = Math.min(primary.width - hPadding, childBox.x1 + childNaturalWidth);
+ childBox.x2 = Math.min(primary.x + primary.width - hPadding, childBox.x1 + childNaturalWidth);
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
childBox.y2 = childBox.y1 + childNaturalHeight;
this._appSwitcher.actor.allocate(childBox, flags);
--
cgit v0.8.3.4

View File

@ -1,6 +1,6 @@
Name: gnome-shell
Version: 2.91.91
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Window management and application launching for GNOME
Group: User Interface/Desktops
@ -8,6 +8,8 @@ License: GPLv2+
URL: http://live.gnome.org/GnomeShell
#VCS: git:git://git.gnome.org/gnome-shell
Source0: http://ftp.gnome.org/pub/GNOME/sources/gnome-shell/2.91/%{name}-%{version}.tar.bz2
# patch from https://bugzilla.gnome.org/show_bug.cgi?id=644206
Patch0: gnome-shell-2.91.91-multihead_alt_tab.patch
%define clutter_version 1.4.0
%define gobject_introspection_version 0.10.1
@ -71,6 +73,7 @@ easy to use experience.
%prep
%setup -q
%patch0 -p1 -b .multihead_alt_tab
%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi;
@ -133,6 +136,9 @@ gconftool-2 --makefile-install-rule \
glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas ||:
%changelog
* Wed Mar 16 2011 Michel Salim <salimma@fedoraproject.org> - 2.91.91-2
- Fix alt-tab behavior on when primary display is not leftmost (# 683932)
* Tue Mar 8 2011 Owen Taylor <otaylor@redhat.com> - 2.91.91-1
- Update to 2.91.91