fs33855.patch 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From 9d931b5e013475be5733fc92bd105b3a691a4097 Mon Sep 17 00:00:00 2001
  2. From: Giovanni Campagna <gcampagna@src.gnome.org>
  3. Date: Fri, 30 Nov 2012 15:05:38 +0000
  4. Subject: MessageTray: fix notification height expansion
  5. MessageTray._tween removes all tweens now, so it removes also
  6. those setting the height to expanded for critical notifications.
  7. This is a regression from 1a27d7dfc02c06bd0ccf4258a9108207b8832ce4
  8. https://bugzilla.gnome.org/show_bug.cgi?id=689295
  9. ---
  10. diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
  11. index ce61e25..ef0cc02 100644
  12. --- a/js/ui/messageTray.js
  13. +++ b/js/ui/messageTray.js
  14. @@ -2200,40 +2200,28 @@ const MessageTray = new Lang.Class({
  15. _updateShowingNotification: function() {
  16. this._notification.acknowledged = true;
  17. - Tweener.removeTweens(this._notificationWidget);
  18. -
  19. // We auto-expand notifications with CRITICAL urgency.
  20. - // We use Tweener.removeTweens() to remove a tween that was hiding the notification we are
  21. - // updating, in case that notification was in the process of being hidden. However,
  22. - // Tweener.removeTweens() would also remove a tween that was updating the position of the
  23. - // notification we are updating, in case that notification was already expanded and its height
  24. - // changed. Therefore we need to call this._expandNotification() for expanded notifications
  25. - // to make sure their position is updated.
  26. - if (this._notification.urgency == Urgency.CRITICAL || this._notification.expanded)
  27. + if (this._notification.urgency == Urgency.CRITICAL)
  28. this._expandNotification(true);
  29. // We tween all notifications to full opacity. This ensures that both new notifications and
  30. // notifications that might have been in the process of hiding get full opacity.
  31. //
  32. - // We tween any notification showing in the banner mode to banner height
  33. - // (this._notificationWidget.y = -this._notificationWidget.height).
  34. + // We tween any notification showing in the banner mode to the appropriate height
  35. + // (which is banner height or expanded height, depending on the notification state)
  36. // This ensures that both new notifications and notifications in the banner mode that might
  37. - // have been in the process of hiding are shown with the banner height.
  38. + // have been in the process of hiding are shown with the correct height.
  39. //
  40. // We use this._showNotificationCompleted() onComplete callback to extend the time the updated
  41. // notification is being shown.
  42. - //
  43. - // We don't set the y parameter for the tween for expanded notifications because
  44. - // this._expandNotification() will result in getting this._notificationWidget.y set to the appropriate
  45. - // fully expanded value.
  46. +
  47. let tweenParams = { opacity: 255,
  48. + y: -this._notificationWidget.height,
  49. time: ANIMATION_TIME,
  50. transition: 'easeOutQuad',
  51. onComplete: this._showNotificationCompleted,
  52. onCompleteScope: this
  53. };
  54. - if (!this._notification.expanded)
  55. - tweenParams.y = -this._notificationWidget.height;
  56. this._tween(this._notificationWidget, '_notificationState', State.SHOWN, tweenParams);
  57. },
  58. --
  59. cgit v0.9.0.2