[Pkg-owncloud-commits] [owncloud-client] 121/171: Add mac system tray fix as deployed on the build machine

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Feb 17 09:36:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to annotated tag upstream/2.1.1+dfsg
in repository owncloud-client.

commit 21e3df4f345160b81362975b4314d623336893c8
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Mon Jan 18 16:16:28 2016 +0100

    Add mac system tray fix as deployed on the build machine
    
    Fixes #3918
---
 ...-tray-icon-is-prepared-even-when-menu-bar.patch | 39 ++++++++++++++++++++++
 admin/qt/patches/README.md                         |  1 +
 2 files changed, 40 insertions(+)

diff --git a/admin/qt/patches/0019-Ensure-system-tray-icon-is-prepared-even-when-menu-bar.patch b/admin/qt/patches/0019-Ensure-system-tray-icon-is-prepared-even-when-menu-bar.patch
new file mode 100644
index 0000000..afb9ea5
--- /dev/null
+++ b/admin/qt/patches/0019-Ensure-system-tray-icon-is-prepared-even-when-menu-bar.patch
@@ -0,0 +1,39 @@
+From cf6881c03d9f08c6ace83defe461423bb87f30d8 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Tor=20Arne=20Vestb=C3=B8?= <tor.arne.vestbo at theqtcompany.com>
+Date: Fri, 15 Jan 2016 14:15:51 +0100
+Subject: [PATCH] OS X: Ensure system tray icon is prepared even when menu bar
+ is hidden
+
+On OS X 10.11 (El Capitan) the system menu bar can be automatically
+hidden, in which case the menu bar height is reported to be 0 when
+using the menuBarHeight API.
+
+This resulted in failing to prepare an image for the system tray
+icon item, making the tray item "invisible".
+
+Instead we now use the [[NSStatusBar systemStatusBar] thickness]
+API, which returns the correct height regardless of the menu bar
+being hidden or not.
+
+Task-number: QTBUG-48960
+Change-Id: I208fb8df13754964a6f254cadfbff06dd56c6bab
+---
+ src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+index a3ffb5b..8152c57 100644
+--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
++++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+@@ -198,7 +198,7 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon)
+     // current OS X versions is 22 points. Provide some future-proofing
+     // by deriving the icon height from the menu height.
+     const int padding = 4;
+-    const int menuHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];
++    const int menuHeight = [[NSStatusBar systemStatusBar] thickness];
+     const int maxImageHeight = menuHeight - padding;
+ 
+     // Select pixmap based on the device pixel height. Ideally we would use
+-- 
+2.6.2.2.g1b5ffa3
+
diff --git a/admin/qt/patches/README.md b/admin/qt/patches/README.md
index 5705069..79ce7e7 100644
--- a/admin/qt/patches/README.md
+++ b/admin/qt/patches/README.md
@@ -37,6 +37,7 @@ purpose is outlined in each patches' front matter.
 * 0013-Make-UnknownAccessibility-not-block-requests.patch
 * 0015-Remove-legacy-platform-code-in-QSslSocket-for-OS-X-1.patch
 * 0016-Fix-possible-crash-when-passing-an-invalid-PAC-URL.patch
+* 0019-Ensure-system-tray-icon-is-prepared-even-when-menu-bar.patch
 
 ### Not submitted to be part of any release:
 * 0006-Fix-force-debug-info-with-macx-clang_NOUPSTREAM.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list