[banshee] Fixed notification area popup position on multi-monitor systems (bgo#537696)
- From: Alexander Kojevnikov <alexk src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] Fixed notification area popup position on multi-monitor systems (bgo#537696)
- Date: Thu, 14 May 2009 21:41:22 -0400 (EDT)
commit 889125e300d05923713e5fbf5078a160150a9246
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Fri May 15 11:38:13 2009 +1000
Fixed notification area popup position on multi-monitor systems (bgo#537696)
---
.../X11NotificationAreaBox.cs | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs b/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
index 7cc52cf..275e1df 100644
--- a/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
+++ b/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
@@ -230,8 +230,12 @@ namespace Banshee.NotificationArea
PositionWidget (popup, out x, out y, 5);
x = x - (popup_req.Width / 2) + (event_box_req.Width / 2);
- if (x + popup_req.Width >= event_box.Screen.Width) {
- x = event_box.Screen.Width - popup_req.Width - 5;
+
+ int monitor = event_box.Screen.GetMonitorAtPoint (x, y);
+ int monitor_width = event_box.Screen.GetMonitorGeometry(monitor).Width;
+
+ if (x + popup_req.Width >= monitor_width) {
+ x = monitor_width - popup_req.Width - 5;
} else if (x < 5) {
x = 5;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]