1
Description: Undo GNOME Shell 3.2's late change to require caribou as built-in
2
onscreen keyboard. Caribou is not yet in the Ubuntu repositories, and even if
3
it were, we have patched g-c-c to use onboard so the normal way to start
6
Author: Jeremy Bicha <jbicha@ubuntu.com>
8
Index: oneiric/js/ui/keyboard.js
9
===================================================================
10
--- oneiric.orig/js/ui/keyboard.js 2011-09-04 05:35:55.611554604 -0400
11
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
13
-/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
15
-const Caribou = imports.gi.Caribou;
16
-const Clutter = imports.gi.Clutter;
17
-const DBus = imports.dbus;
18
-const Gdk = imports.gi.Gdk;
19
-const Gio = imports.gi.Gio;
20
-const GLib = imports.gi.GLib;
21
-const Lang = imports.lang;
22
-const Shell = imports.gi.Shell;
23
-const St = imports.gi.St;
25
-const BoxPointer = imports.ui.boxpointer;
26
-const Main = imports.ui.main;
27
-const MessageTray = imports.ui.messageTray;
29
-const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard';
30
-const SHOW_KEYBOARD = 'show-keyboard';
31
-const KEYBOARD_TYPE = 'keyboard-type';
33
-// Key constants taken from Antler
34
-// FIXME: ought to be moved into libcaribou
35
-const PRETTY_KEYS = {
36
- 'BackSpace': '\u232b',
39
- 'Caribou_Prefs': '\u2328',
40
- 'Caribou_ShiftUp': '\u2b06',
41
- 'Caribou_ShiftDown': '\u2b07',
42
- 'Caribou_Emoticons': '\u263a',
43
- 'Caribou_Symbols': '123',
44
- 'Caribou_Symbols_More': '{#*',
45
- 'Caribou_Alpha': 'Abc',
48
- 'Control_L': 'Ctrl',
52
-const CaribouKeyboardIface = {
53
- name: 'org.gnome.Caribou.Keyboard',
54
- methods: [ { name: 'Show',
62
- { name: 'SetCursorLocation',
63
- inSignature: 'iiii',
66
- { name: 'SetEntryLocation',
67
- inSignature: 'iiii',
70
- properties: [ { name: 'Name',
76
- this._init.apply(this, arguments);
80
- _init : function(key) {
83
- this.actor = this._makeKey();
85
- this._extended_keys = this._key.get_extended_keys();
86
- this._extended_keyboard = null;
88
- if (this._key.name == "Control_L" || this._key.name == "Alt_L")
89
- this._key.latch = true;
91
- this._key.connect('key-pressed', Lang.bind(this, function ()
92
- { this.actor.checked = true }));
93
- this._key.connect('key-released', Lang.bind(this, function ()
94
- { this.actor.checked = false; }));
96
- if (this._extended_keys.length > 0) {
97
- this._grabbed = false;
98
- this._eventCaptureId = 0;
99
- this._key.connect('notify::show-subkeys', Lang.bind(this, this._onShowSubkeysChanged));
100
- this._boxPointer = new BoxPointer.BoxPointer(St.Side.BOTTOM,
103
- x_align: St.Align.START });
104
- // Adds style to existing keyboard style to avoid repetition
105
- this._boxPointer.actor.add_style_class_name('keyboard-subkeys');
106
- this._getExtendedKeys();
107
- this.actor._extended_keys = this._extended_keyboard;
108
- this._boxPointer.actor.hide();
109
- Main.layoutManager.addChrome(this._boxPointer.actor, { visibleInFullscreen: true });
113
- _makeKey: function () {
114
- let label = this._key.name;
116
- if (label.length > 1) {
117
- let pretty = PRETTY_KEYS[label];
121
- label = this._getUnichar(this._key);
124
- label = GLib.markup_escape_text(label, -1);
125
- let button = new St.Button ({ label: label,
126
- style_class: 'keyboard-key' });
128
- button.key_width = this._key.width;
129
- button.connect('button-press-event', Lang.bind(this, function () { this._key.press(); }));
130
- button.connect('button-release-event', Lang.bind(this, function () { this._key.release(); }));
135
- _getUnichar: function(key) {
136
- let keyval = key.keyval;
137
- let unichar = Gdk.keyval_to_unicode(keyval);
139
- return String.fromCharCode(unichar);
145
- _getExtendedKeys: function () {
146
- this._extended_keyboard = new St.BoxLayout({ style_class: 'keyboard-layout',
147
- vertical: false });
148
- for (let i = 0; i < this._extended_keys.length; ++i) {
149
- let extended_key = this._extended_keys[i];
150
- let label = this._getUnichar(extended_key);
151
- let key = new St.Button({ label: label, style_class: 'keyboard-key' });
152
- key.extended_key = extended_key;
153
- key.connect('button-press-event', Lang.bind(this, function () { extended_key.press(); }));
154
- key.connect('button-release-event', Lang.bind(this, function () { extended_key.release(); }));
155
- this._extended_keyboard.add(key);
157
- this._boxPointer.bin.add_actor(this._extended_keyboard);
160
- _onEventCapture: function (actor, event) {
161
- let source = event.get_source();
162
- let type = event.type();
164
- if ((type == Clutter.EventType.BUTTON_PRESS ||
165
- type == Clutter.EventType.BUTTON_RELEASE) &&
166
- this._extended_keyboard.contains(source)) {
167
- source.extended_key.press();
168
- source.extended_key.release();
171
- if (type == Clutter.EventType.BUTTON_PRESS) {
172
- this._boxPointer.actor.hide();
179
- _ungrab: function () {
180
- global.stage.disconnect(this._eventCaptureId);
181
- this._eventCaptureId = 0;
182
- this._grabbed = false;
183
- Main.popModal(this.actor);
186
- _onShowSubkeysChanged: function () {
187
- if (this._key.show_subkeys) {
188
- this.actor.fake_release();
189
- this._boxPointer.actor.raise_top();
190
- this._boxPointer.setPosition(this.actor, 0.5);
191
- this._boxPointer.show(true);
192
- this.actor.set_hover(false);
193
- if (!this._grabbed) {
194
- Main.pushModal(this.actor);
195
- this._eventCaptureId = global.stage.connect('captured-event', Lang.bind(this, this._onEventCapture));
196
- this._grabbed = true;
198
- this._key.release();
202
- this._boxPointer.hide(true);
207
-function Keyboard() {
208
- this._init.apply(this, arguments);
211
-Keyboard.prototype = {
212
- _init: function () {
213
- DBus.session.exportObject('/org/gnome/Caribou/Keyboard', this);
214
- DBus.session.acquire_name('org.gnome.Caribou.Keyboard', 0, null, null);
216
- this._timestamp = global.get_current_time();
217
- this.actor = new St.BoxLayout({ name: 'keyboard', vertical: true, reactive: true });
218
- Main.layoutManager.keyboardBox.add_actor(this.actor);
219
- Main.layoutManager.trackChrome(this.actor);
220
- Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._redraw));
222
- this._keyboardSettings = new Gio.Settings({ schema: KEYBOARD_SCHEMA });
223
- this._keyboardSettings.connect('changed', Lang.bind(this, this._settingsChanged));
224
- this._settingsChanged();
227
- init: function () {
228
- if (this._enableKeyboard)
232
- _settingsChanged: function () {
233
- this._enableKeyboard = this._keyboardSettings.get_boolean(SHOW_KEYBOARD);
234
- if (!this._enableKeyboard && !this._keyboard)
236
- if (this._enableKeyboard && this._keyboard &&
237
- this._keyboard.keyboard_type == this._keyboardSettings.get_string(KEYBOARD_TYPE))
240
- if (this._keyboard)
241
- this._destroyKeyboard();
242
- if (this._enableKeyboard)
243
- this._setupKeyboard();
245
- Main.layoutManager.hideKeyboard(true);
248
- _destroyKeyboard: function() {
249
- if (this._keyboardNotifyId)
250
- this._keyboard.disconnect(this._keyboardNotifyId);
251
- if (this._focusNotifyId)
252
- global.stage.disconnect(this._focusNotifyId);
253
- this._keyboard = null;
254
- this.actor.destroy_children();
256
- this._destroySource();
259
- _setupKeyboard: function() {
260
- this._keyboard = new Caribou.KeyboardModel({ keyboard_type: this._keyboardSettings.get_string(KEYBOARD_TYPE) });
262
- this._current_page = null;
264
- // Initialize keyboard key measurements
265
- this._numOfHorizKeys = 0;
266
- this._numOfVertKeys = 0;
270
- this._keyboardNotifyId = this._keyboard.connect('notify::active-group', Lang.bind(this, this._onGroupChanged));
271
- this._focusNotifyId = global.stage.connect('notify::key-focus', Lang.bind(this, this._onKeyFocusChanged));
272
- this._createSource();
275
- _onKeyFocusChanged: function () {
276
- let focus = global.stage.key_focus;
278
- if (focus == global.stage || focus == null)
281
- if (focus instanceof Clutter.Text)
284
- if (focus._extended_keys == null)
289
- _addKeys: function () {
290
- let groups = this._keyboard.get_groups();
291
- for (let i = 0; i < groups.length; ++i) {
292
- let gname = groups[i];
293
- let group = this._keyboard.get_group(gname);
294
- group.connect('notify::active-level', Lang.bind(this, this._onLevelChanged));
296
- let levels = group.get_levels();
297
- for (let j = 0; j < levels.length; ++j) {
298
- let lname = levels[j];
299
- let level = group.get_level(lname);
300
- let layout = new St.BoxLayout({ style_class: 'keyboard-layout',
302
- this._loadRows(level, layout);
303
- layers[lname] = layout;
304
- this.actor.add(layout, { x_fill: false });
308
- this._groups[gname] = layers;
311
- this._setActiveLayer();
314
- _getTrayIcon: function () {
315
- let trayButton = new St.Button ({ label: "tray", style_class: 'keyboard-key' });
316
- trayButton.key_width = 1;
317
- trayButton.connect('button-press-event', Lang.bind(this, function () {
318
- Main.messageTray.toggle();
321
- Main.overview.connect('showing', Lang.bind(this, function () {
322
- trayButton.reactive = false;
323
- trayButton.add_style_pseudo_class('grayed');
325
- Main.overview.connect('hiding', Lang.bind(this, function () {
326
- trayButton.reactive = true;
327
- trayButton.remove_style_pseudo_class('grayed');
333
- _addRows : function (keys, layout) {
334
- let keyboard_row = new St.BoxLayout();
335
- for (let i = 0; i < keys.length; ++i) {
336
- let children = keys[i].get_children();
337
- let right_box = new St.BoxLayout({ style_class: 'keyboard-row' });
338
- let left_box = new St.BoxLayout({ style_class: 'keyboard-row' });
339
- for (let j = 0; j < children.length; ++j) {
340
- if (this._numOfHorizKeys == 0)
341
- this._numOfHorizKeys = children.length;
342
- let key = children[j];
343
- let button = new Key(key);
345
- if (key.align == 'right')
346
- right_box.add(button.actor);
348
- left_box.add(button.actor);
349
- if (key.name == "Caribou_Prefs") {
350
- key.connect('key-released', Lang.bind(this, this.hide));
352
- // Add new key for hiding message tray
353
- right_box.add(this._getTrayIcon());
356
- keyboard_row.add(left_box, { expand: true, x_fill: false, x_align: St.Align.START });
357
- keyboard_row.add(right_box, { expand: true, x_fill: false, x_align: St.Align.END });
359
- layout.add(keyboard_row);
362
- _loadRows : function (level, layout) {
363
- let rows = level.get_rows();
364
- for (let i = 0; i < rows.length; ++i) {
366
- if (this._numOfVertKeys == 0)
367
- this._numOfVertKeys = rows.length;
368
- this._addRows(row.get_columns(), layout);
373
- _redraw: function () {
374
- let monitor = Main.layoutManager.bottomMonitor;
375
- let maxHeight = monitor.height / 3;
376
- this.actor.width = monitor.width;
378
- let layout = this._current_page;
379
- let verticalSpacing = layout.get_theme_node().get_length('spacing');
380
- let padding = layout.get_theme_node().get_length('padding');
382
- let box = layout.get_children()[0].get_children()[0];
383
- let horizontalSpacing = box.get_theme_node().get_length('spacing');
384
- let allHorizontalSpacing = (this._numOfHorizKeys - 1) * horizontalSpacing;
385
- let keyWidth = Math.floor((this.actor.width - allHorizontalSpacing - 2 * padding) / this._numOfHorizKeys);
387
- let allVerticalSpacing = (this._numOfVertKeys - 1) * verticalSpacing;
388
- let keyHeight = Math.floor((maxHeight - allVerticalSpacing - 2 * padding) / this._numOfVertKeys);
390
- let keySize = Math.min(keyWidth, keyHeight);
391
- this.actor.height = keySize * this._numOfVertKeys + allVerticalSpacing + 2 * padding;
393
- let rows = this._current_page.get_children();
394
- for (let i = 0; i < rows.length; ++i) {
395
- let keyboard_row = rows[i];
396
- let boxes = keyboard_row.get_children();
397
- for (let j = 0; j < boxes.length; ++j) {
398
- let keys = boxes[j].get_children();
399
- for (let k = 0; k < keys.length; ++k) {
400
- let child = keys[k];
401
- child.width = keySize * child.key_width;
402
- child.height = keySize;
403
- if (child._extended_keys) {
404
- let extended_keys = child._extended_keys.get_children();
405
- for (let n = 0; n < extended_keys.length; ++n) {
406
- let extended_key = extended_keys[n];
407
- extended_key.width = keySize;
408
- extended_key.height = keySize;
416
- _onLevelChanged: function () {
417
- this._setActiveLayer();
421
- _onGroupChanged: function () {
422
- this._setActiveLayer();
426
- _setActiveLayer: function () {
427
- let active_group_name = this._keyboard.active_group;
428
- let active_group = this._keyboard.get_group(active_group_name);
429
- let active_level = active_group.active_level;
430
- let layers = this._groups[active_group_name];
432
- if (this._current_page != null) {
433
- this._current_page.hide();
436
- this._current_page = layers[active_level];
437
- this._current_page.show();
440
- _createSource: function () {
441
- if (this._source == null) {
442
- this._source = new KeyboardSource(this);
443
- this._source.setTransient(true);
444
- Main.messageTray.add(this._source);
448
- _destroySource: function () {
449
- if (this._source) {
450
- this._source.destroy();
451
- this._source = null;
455
- show: function () {
458
- Main.layoutManager.showKeyboard();
459
- this._destroySource();
462
- hide: function () {
463
- Main.layoutManager.hideKeyboard();
464
- this._createSource();
467
- _moveTemporarily: function () {
468
- let currentWindow = global.screen.get_display().focus_window;
469
- let rect = currentWindow.get_outer_rect();
472
- let newY = 3 * this.actor.height / 2;
473
- currentWindow.move_frame(true, newX, newY);
476
- _setLocation: function (x, y) {
477
- if (y >= 2 * this.actor.height)
478
- this._moveTemporarily();
482
- Show: function(timestamp) {
483
- if (timestamp - this._timestamp < 0)
486
- this._timestamp = timestamp;
490
- Hide: function(timestamp) {
491
- if (timestamp - this._timestamp < 0)
494
- this._timestamp = timestamp;
498
- SetCursorLocation: function(x, y, w, h) {
499
- this._setLocation(x, y);
502
- SetEntryLocation: function(x, y, w, h) {
503
- this._setLocation(x, y);
507
- return 'gnome-shell';
510
-DBus.conformExport(Keyboard.prototype, CaribouKeyboardIface);
512
-function KeyboardSource() {
513
- this._init.apply(this, arguments);
516
-KeyboardSource.prototype = {
517
- __proto__: MessageTray.Source.prototype,
519
- _init: function(keyboard) {
520
- this._keyboard = keyboard;
521
- MessageTray.Source.prototype._init.call(this, _("Keyboard"));
523
- this._setSummaryIcon(this.createNotificationIcon());
526
- createNotificationIcon: function() {
527
- return new St.Icon({ icon_name: 'input-keyboard',
528
- icon_type: St.IconType.SYMBOLIC,
529
- icon_size: this.ICON_SIZE });
532
- handleSummaryClick: function() {
533
- let event = Clutter.get_current_event();
534
- if (event.type() != Clutter.EventType.BUTTON_RELEASE)
542
- this._keyboard.show();
545
Index: oneiric/js/Makefile.am
546
===================================================================
547
--- oneiric.orig/js/Makefile.am 2011-09-04 05:35:55.541554502 -0400
548
+++ oneiric/js/Makefile.am 2011-09-04 05:36:08.981574208 -0400
551
ui/extensionSystem.js \
557
Index: oneiric/po/POTFILES.in
558
===================================================================
559
--- oneiric.orig/po/POTFILES.in 2011-09-04 05:35:55.641554641 -0400
560
+++ oneiric/po/POTFILES.in 2011-09-04 05:36:08.981574208 -0400
564
js/ui/endSessionDialog.js
566
js/ui/lookingGlass.js
568
js/ui/networkAgent.js
569
Index: oneiric/js/Makefile.in
570
===================================================================
571
--- oneiric.orig/js/Makefile.in 2011-09-04 05:35:55.551554511 -0400
572
+++ oneiric/js/Makefile.in 2011-09-04 05:36:08.981574208 -0400
575
ui/extensionSystem.js \
581
Index: oneiric/data/org.gnome.shell.gschema.xml.in
582
===================================================================
583
--- oneiric.orig/data/org.gnome.shell.gschema.xml.in 2011-09-04 05:35:55.671554689 -0400
584
+++ oneiric/data/org.gnome.shell.gschema.xml.in 2011-09-04 05:36:08.981574208 -0400
586
<child name="clock" schema="org.gnome.shell.clock"/>
587
<child name="calendar" schema="org.gnome.shell.calendar"/>
588
<child name="recorder" schema="org.gnome.shell.recorder"/>
589
- <child name="keyboard" schema="org.gnome.shell.keyboard"/>
592
<schema id="org.gnome.shell.calendar" path="/org/gnome/shell/calendar/"
597
- <schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
598
- gettext-domain="@GETTEXT_PACKAGE@">
599
- <key name="show-keyboard" type="b">
600
- <default>false</default>
601
- <_summary>Show the onscreen keyboard</_summary>
603
- If true, display onscreen keyboard.
606
- <key name="keyboard-type" type="s">
607
- <default>'touch'</default>
608
- <_summary>Which keyboard to use</_summary>
610
- The type of keyboard to use.
615
<schema id="org.gnome.shell.clock" path="/org/gnome/shell/clock/"
616
gettext-domain="@GETTEXT_PACKAGE@">
617
<key name="show-seconds" type="b">
618
Index: oneiric/js/ui/layout.js
619
===================================================================
620
--- oneiric.orig/js/ui/layout.js 2011-09-04 05:35:55.571554539 -0400
621
+++ oneiric/js/ui/layout.js 2011-09-04 05:36:08.981574208 -0400
624
const HOT_CORNER_ACTIVATION_TIMEOUT = 0.5;
625
const STARTUP_ANIMATION_TIME = 0.2;
626
-const KEYBOARD_ANIMATION_TIME = 0.5;
628
function LayoutManager() {
629
this._init.apply(this, arguments);
631
this.panelBox.connect('allocation-changed',
632
Lang.bind(this, this._updatePanelBarriers));
634
- // bottomBox contains the tray and keyboard (which move
635
- // together, since the tray slides up from the top of the
636
- // keyboard when the keyboard is visible).
637
- this._bottomBox = new St.BoxLayout({ name: 'bottomBox',
639
- this.addChrome(this._bottomBox, { visibleInFullscreen: true });
641
this.trayBox = new St.BoxLayout({ name: 'trayBox' });
642
this.trayBox.connect('allocation-changed',
643
Lang.bind(this, this._updateTrayBarrier));
644
- this._bottomBox.add_actor(this.trayBox);
646
- this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox' });
647
- this._bottomBox.add_actor(this.keyboardBox);
648
+ this.addChrome(this.trayBox, { visibleInFullscreen: true });
650
global.screen.connect('monitors-changed',
651
Lang.bind(this, this._monitorsChanged));
653
this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
654
this.panelBox.set_size(this.primaryMonitor.width, -1);
656
- this._bottomBox.set_position(this.bottomMonitor.x,
657
- this.bottomMonitor.y + this.bottomMonitor.height);
658
- this._bottomBox.set_size(this.bottomMonitor.width, -1);
660
- this.trayBox.width = this.bottomMonitor.width;
662
- // Set trayBox's clip to show things above it, but not below
663
- // it (so it's not visible behind the keyboard). The exact
664
- // height of the clip doesn't matter, as long as it's taller
665
- // than any Notification.actor.
666
- this.trayBox.set_clip(0, -this.bottomMonitor.height,
667
- this.bottomMonitor.width, this.bottomMonitor.height);
668
+ this.trayBox.set_position(this.bottomMonitor.x,
669
+ this.bottomMonitor.y + this.bottomMonitor.height);
670
+ this.trayBox.set_size(this.bottomMonitor.width, -1);
673
_updatePanelBarriers: function() {
678
- showKeyboard: function () {
679
- Main.messageTray.hide();
680
- Tweener.addTween(this._bottomBox,
681
- { anchor_y: this._bottomBox.height,
682
- time: KEYBOARD_ANIMATION_TIME,
683
- transition: 'easeOutQuad',
684
- onComplete: this._showKeyboardComplete,
685
- onCompleteScope: this
689
- _showKeyboardComplete: function() {
690
- // Poke Chrome to update the input shape; it doesn't notice
691
- // anchor point changes
692
- this._chrome.updateRegions();
694
- this._bottomBox.connect('notify::height', Lang.bind(this, function () {
695
- this._bottomBoxAnchor = this._bottomBox.height;
699
- hideKeyboard: function (immediate) {
700
- Main.messageTray.hide();
701
- Tweener.addTween(this._bottomBox,
703
- time: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
704
- transition: 'easeOutQuad',
705
- onComplete: this._showKeyboardComplete,
706
- onCompleteScope: this
710
- _hideKeyboardComplete: function() {
711
- this._chrome.updateRegions();
715
// @actor: an actor to add to the chrome layer
716
// @params: (optional) additional params
719
_queueUpdateRegions: function() {
720
if (!this._updateRegionIdle)
721
- this._updateRegionIdle = Mainloop.idle_add(Lang.bind(this, this.updateRegions),
722
+ this._updateRegionIdle = Mainloop.idle_add(Lang.bind(this, this._updateRegions),
723
Meta.PRIORITY_BEFORE_REDRAW);
726
@@ -814,13 +758,10 @@
730
- updateRegions: function() {
731
+ _updateRegions: function() {
732
let rects = [], struts = [], i;
734
- if (this._updateRegionIdle) {
735
- Mainloop.source_remove(this._updateRegionIdle);
736
- delete this._updateRegionIdle;
738
+ delete this._updateRegionIdle;
740
for (i = 0; i < this._trackedActors.length; i++) {
741
let actorData = this._trackedActors[i];
742
Index: oneiric/js/ui/main.js
743
===================================================================
744
--- oneiric.orig/js/ui/main.js 2011-09-04 05:35:55.591554576 -0400
745
+++ oneiric/js/ui/main.js 2011-09-04 05:38:41.951798574 -0400
747
const PolkitAuthenticationAgent = imports.ui.polkitAuthenticationAgent;
748
const Environment = imports.ui.environment;
749
const ExtensionSystem = imports.ui.extensionSystem;
750
-const Keyboard = imports.ui.keyboard;
751
const MessageTray = imports.ui.messageTray;
752
const Overview = imports.ui.overview;
753
const Panel = imports.ui.panel;
755
let magnifier = null;
756
let xdndHandler = null;
757
let statusIconDispatcher = null;
758
-let keyboard = null;
759
let layoutManager = null;
760
let networkAgent = null;
761
let _errorLogStack = [];
763
function _initUserSession() {
768
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1);
770
ExtensionSystem.init();
772
panel = new Panel.Panel();
773
wm = new WindowManager.WindowManager();
774
messageTray = new MessageTray.MessageTray();
775
- keyboard = new Keyboard.Keyboard();
776
notificationDaemon = new NotificationDaemon.NotificationDaemon();
777
windowAttentionHandler = new WindowAttentionHandler.WindowAttentionHandler();
781
panel.startStatusArea();
786
if (global.session_type == Shell.SessionType.USER)
787
Index: oneiric/js/ui/messageTray.js
788
===================================================================
789
--- oneiric.orig/js/ui/messageTray.js 2011-09-04 05:35:55.581554557 -0400
790
+++ oneiric/js/ui/messageTray.js 2011-09-04 05:36:08.981574208 -0400
792
let source = event.get_source();
793
switch (event.type()) {
794
case Clutter.EventType.BUTTON_PRESS:
795
- if (!this.actor.contains(source) && !Main.keyboard.actor.contains(source))
796
+ if (!this.actor.contains(source))
797
this.emit('button-pressed', source);
799
case Clutter.EventType.KEY_PRESS:
800
@@ -1373,7 +1373,6 @@
802
this._trayState = State.HIDDEN;
803
this._locked = false;
804
- this._traySummoned = false;
805
this._useLongerTrayLeftTimeout = false;
806
this._trayLeftTimeoutId = 0;
807
this._pointerInTray = false;
808
@@ -1584,18 +1583,6 @@
812
- toggle: function() {
813
- this._traySummoned = !this._traySummoned;
814
- this._updateState();
818
- this._traySummoned = false;
819
- this.actor.set_hover(false);
820
- this._summary.set_hover(false);
821
- this._updateState();
824
_onNotify: function(source, notification) {
825
if (this._summaryBoxPointerItem && this._summaryBoxPointerItem.source == source) {
826
if (this._summaryBoxPointerState == State.HIDING)
827
@@ -1903,7 +1890,7 @@
831
- let summarySummoned = this._pointerInSummary || this._overviewVisible || this._traySummoned;
832
+ let summarySummoned = this._pointerInSummary || this._overviewVisible;
833
let summaryPinned = this._summaryTimeoutId != 0 || this._pointerInTray || summarySummoned || this._locked;
834
let summaryHovered = this._pointerInTray || this._pointerInSummary;
835
let summaryVisibleWithNoHover = (this._overviewVisible || this._locked) && !summaryHovered;