Add pointer barriers to panel and message tray

If you have XFixes 5 (and corresponding xserver support) then we
add barriers on the panel and in the message tray corner so that
its easy to reach the corners even when there are monitors to the
sides of the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=622655
This commit is contained in:
Alexander Larsson
2011-03-18 13:27:06 +01:00
committed by Florian Müllner
parent fd3f2289c3
commit 1518dc9b60
4 changed files with 87 additions and 0 deletions

View File

@ -1030,6 +1030,7 @@ MessageTray.prototype = {
this._clickedSummaryItemAllocationChangedId = 0;
this._expandedSummaryItem = null;
this._summaryItemTitleWidth = 0;
this._pointerBarrier = 0;
// To simplify the summary item animation code, we pretend
// that there's an invisible SummaryItem to the left of the
@ -1119,6 +1120,15 @@ MessageTray.prototype = {
this._notificationBin.width = primary.width;
this._summaryBin.x = 0;
this._summaryBin.width = primary.width;
if (this._pointerBarrier)
global.destroy_pointer_barrier(this._pointerBarrier);
this._pointerBarrier =
global.create_pointer_barrier(primary.x + primary.width, primary.y + primary.height - this.actor.height,
primary.x + primary.width, primary.y + primary.height,
4 /* BarrierNegativeX */);
},
contains: function(source) {