use global.screen.set_cursor for old GS
This commit is contained in:
parent
1abc7f6dc2
commit
3d4830b67c
|
|
@ -224,7 +224,11 @@ var AreaManager = new Lang.Class({
|
||||||
this.activeArea.reactive = false;
|
this.activeArea.reactive = false;
|
||||||
this.activeArea.leaveDrawingMode();
|
this.activeArea.leaveDrawingMode();
|
||||||
this.activeArea = null;
|
this.activeArea = null;
|
||||||
|
// check display or screen (API changes)
|
||||||
|
if (global.display.set_cursor)
|
||||||
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
|
else if (global.screen && global.screen.set_cursor)
|
||||||
|
global.screen.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
Main.osdWindowManager.show(activeIndex, this.leaveGicon, _("Leaving drawing mode"), null);
|
Main.osdWindowManager.show(activeIndex, this.leaveGicon, _("Leaving drawing mode"), null);
|
||||||
} else {
|
} else {
|
||||||
// avoid to deal with Meta changes (global.display/global.screen)
|
// avoid to deal with Meta changes (global.display/global.screen)
|
||||||
|
|
@ -236,7 +240,11 @@ var AreaManager = new Lang.Class({
|
||||||
this.addInternalKeybindings();
|
this.addInternalKeybindings();
|
||||||
this.activeArea.reactive = true;
|
this.activeArea.reactive = true;
|
||||||
this.activeArea.enterDrawingMode();
|
this.activeArea.enterDrawingMode();
|
||||||
|
// check display or screen (API changes)
|
||||||
|
if (global.display.set_cursor)
|
||||||
global.display.set_cursor(Meta.Cursor.POINTING_HAND);
|
global.display.set_cursor(Meta.Cursor.POINTING_HAND);
|
||||||
|
else if (global.screen && global.screen.set_cursor)
|
||||||
|
global.screen.set_cursor(Meta.Cursor.POINTING_HAND);
|
||||||
// increase OSD display time
|
// increase OSD display time
|
||||||
let hideTimeoutSave = OsdWindow.HIDE_TIMEOUT;
|
let hideTimeoutSave = OsdWindow.HIDE_TIMEOUT;
|
||||||
OsdWindow.HIDE_TIMEOUT = 2000;
|
OsdWindow.HIDE_TIMEOUT = 2000;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue