~ubuntu-branches/ubuntu/oneiric/unity/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/01_revert_removed_function_for_unity2d_to_build.patch

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-08-01 19:53:15 UTC
  • mfrom: (1.1.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20110801195315-mrewa9g7ctnk41oh
Tags: 4.6.0-0ubuntu1
* New upstream release.
  - compiz crashed with SIGSEGV in __strlen_sse2() (LP: #814619)
  - PlacesHomeView::PlacesHomeView leaks memory (LP: #818450)
  - PluginAdapter::MaximizeIfBigEnough leaks memory (LP: #818477)
  - Launcher - Make Launcher left of screen reveal more responsive and less
    prone to false positives (LP: #765819)
  - Launcher - clicking on a App launcher icon incorrectly un-minimizes
    windows (LP: #783434)
  - Unity doesn't get any mouse wheel scroll event in Indicators InputArea
    (LP: #814574)
  - Unity launcher gets cluttered when having multiple partitions and/or
    external volumes attached (LP: #713423)
  - Unity panel menus and indicators slow to respond. Too much lag.
    (LP: #742664)
  - In Unity the distinction between GVolume, GDrive and GMount is a bit
    confusing. (LP: #799890)
  - Launcher - When a item is deleted by dragging to Trash, the trash should
    pulse once before the Launcher disappears (LP: #750311)
  - ccsm needs an option to change launcher opacity (LP: #815032)
  - add a ccsm option to hide volumes in launcher (LP: #794707)
  - scale plugin doesn't work as desired when "Click Desktop To Show
    Desktop" is true (LP: #810315)
  - mute/unmute sound when user clicks on sound applet using scroll button
    or middle mouse button (LP: #609860)
  - Secondary activate (i.e. middle click) support for indicators advanced
    usage (LP: #812933)
* debian/control:
  - dep on latest libunity-misc
  - dep on latest nux
  - add build-dep on libgnome-desktop-3-dev
* debian/rules:
  - bump libunity-core-4.0-4 shlib for ABI break
  - don't ship unity dialogs right now. Not ready for alpha quality
* distro-patch the grey to darker grey (until the blur is done in nux)
* Switch to dpkg-source 3.0 (quilt) format
* debian/patches/01_revert_removed_function_for_unity2d_to_build.patch:
  - revert a removed API making unity-2d not building

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=== modified file 'UnityCore/DBusIndicators.cpp'
 
2
--- a/UnityCore/DBusIndicators.cpp      2011-08-01 14:24:34 +0000
 
3
+++ b/UnityCore/DBusIndicators.cpp      2011-07-29 10:18:29 +0000
 
4
@@ -434,6 +434,13 @@
 
5
       RequestSyncAll();
 
6
     }
 
7
   }
 
8
+  else if (signal_name == "ActiveMenuPointerMotion")
 
9
+  {
 
10
+    int x = 0;
 
11
+    int y = 0;
 
12
+    g_variant_get(parameters, "(ii)", &x, &y);
 
13
+    owner_->on_menu_pointer_moved.emit(x, y);
 
14
+  }
 
15
   else if (signal_name == "EntryShowNowChanged")
 
16
   {
 
17
     gchar*    id = NULL;
 
18
 
 
19
=== modified file 'UnityCore/Indicators.h'
 
20
--- a/UnityCore/Indicators.h    2011-07-29 07:15:54 +0000
 
21
+++ b/UnityCore/Indicators.h    2011-07-21 20:24:04 +0000
 
22
@@ -64,6 +64,14 @@
 
23
   sigc::signal<void, Indicator::Ptr const&> on_object_removed;
 
24
 
 
25
   /**
 
26
+   * This signal is emitted when an entry is activated and the user moves the
 
27
+   * mouse.
 
28
+   * @param x x coordinate
 
29
+   * @param y y coordinate
 
30
+   */
 
31
+  sigc::signal<void, int, int> on_menu_pointer_moved;
 
32
+
 
33
+  /**
 
34
    * Service wants the view to activate an entry.
 
35
    * Example use-case: user has activated an entry with the mouse and pressed
 
36
    * Left or Right key to activate previous or next entry.
 
37
 
 
38
=== modified file 'plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp'
 
39
--- a/plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp  2011-07-29 07:15:54 +0000
 
40
+++ b/plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp  2011-07-22 14:04:58 +0000
 
41
@@ -101,15 +101,11 @@
 
42
                      GetAbsoluteY() + PANEL_HEIGHT,
 
43
                      time(NULL),
 
44
                      nux::GetEventButton(button_flags));
 
45
-    proxy_->set_active(true);
 
46
-    //
 
47
-    // ^ Set active even before the menu appears. This allows the below
 
48
-    //   Refresh call to know it should draw_menu_bg() immediately
 
49
-    //   rather than waiting for slow inter-process communication with
 
50
-    //   unity-panel-service, which causes visible lag in many cases.
 
51
-    //
 
52
-  }
 
53
-  Refresh();
 
54
+  }
 
55
+  else
 
56
+  {
 
57
+    Refresh();
 
58
+  }
 
59
 }
 
60
 
 
61
 void PanelIndicatorObjectEntryView::OnMouseUp(int x, int y, long button_flags, long key_flags)
 
62
 
 
63
=== modified file 'plugins/unityshell/src/PanelView.cpp'
 
64
--- a/plugins/unityshell/src/PanelView.cpp      2011-07-29 08:55:26 +0000
 
65
+++ b/plugins/unityshell/src/PanelView.cpp      2011-07-28 11:02:56 +0000
 
66
@@ -79,6 +79,7 @@
 
67
 
 
68
   _remote = indicator::DBusIndicators::Ptr(new indicator::DBusIndicators());
 
69
   _remote->on_object_added.connect(sigc::mem_fun(this, &PanelView::OnObjectAdded));
 
70
+  _remote->on_menu_pointer_moved.connect(sigc::mem_fun(this, &PanelView::OnMenuPointerMoved));
 
71
   _remote->on_entry_activate_request.connect(sigc::mem_fun(this, &PanelView::OnEntryActivateRequest));
 
72
   _remote->on_entry_activated.connect(sigc::mem_fun(this, &PanelView::OnEntryActivated));
 
73
   _remote->on_synced.connect(sigc::mem_fun(this, &PanelView::OnSynced));
 
74
@@ -99,14 +100,10 @@
 
75
                                                      this);
 
76
    // request the latest colour from bghash
 
77
    ubus_server_send_message (ubus, UBUS_BACKGROUND_REQUEST_COLOUR_EMIT, NULL);
 
78
-
 
79
-  _track_menu_pointer_id = 0;
 
80
 }
 
81
 
 
82
 PanelView::~PanelView()
 
83
 {
 
84
-  if (_track_menu_pointer_id)
 
85
-    g_source_remove(_track_menu_pointer_id);
 
86
   _style->UnReference();
 
87
   UBusServer *ubus = ubus_server_get_default();
 
88
   ubus_server_unregister_interest(ubus, _handle_bg_color_update);
 
89
@@ -346,41 +343,10 @@
 
90
   }
 
91
 }
 
92
 
 
93
-static gboolean track_menu_pointer(gpointer data)
 
94
-{
 
95
-  PanelView *self = (PanelView*)data;
 
96
-  gint x, y;
 
97
-  gdk_display_get_pointer(gdk_display_get_default(), NULL, &x, &y, NULL);
 
98
-  self->OnMenuPointerMoved(x, y);
 
99
-  return TRUE;
 
100
-}
 
101
-
 
102
 void PanelView::OnEntryActivated(std::string const& entry_id)
 
103
 {
 
104
-  bool active = (entry_id.size() > 0);
 
105
-  if (active && !_track_menu_pointer_id)
 
106
-  {
 
107
-    //
 
108
-    // Track menus being scrubbed at 60Hz (about every 16 millisec)
 
109
-    // It might sound ugly, but it's far nicer (and more responsive) than the
 
110
-    // code it replaces which used to capture motion events in another process
 
111
-    // (unity-panel-service) and send them to us over dbus.
 
112
-    // NOTE: The reason why we have to use a timer instead of tracking motion
 
113
-    // events is because the motion events will never be delivered to this
 
114
-    // process. All the motion events will go to unity-panel-service while
 
115
-    // scrubbing because the active panel menu has (needs) the pointer grab.
 
116
-    //
 
117
-    _track_menu_pointer_id = g_timeout_add(16, track_menu_pointer, this);
 
118
-  }
 
119
-  else if (!active)
 
120
-  {
 
121
-    if (_track_menu_pointer_id)
 
122
-    {
 
123
-      g_source_remove(_track_menu_pointer_id);
 
124
-      _track_menu_pointer_id = 0;
 
125
-    }
 
126
+  if (entry_id == "")
 
127
     _menu_view->AllMenusClosed();
 
128
-  }
 
129
 }
 
130
 
 
131
 void PanelView::OnSynced()
 
132
 
 
133
=== modified file 'plugins/unityshell/src/PanelView.h'
 
134
--- a/plugins/unityshell/src/PanelView.h        2011-07-29 07:15:54 +0000
 
135
+++ b/plugins/unityshell/src/PanelView.h        2011-07-28 11:02:56 +0000
 
136
@@ -116,7 +116,6 @@
 
137
   guint       _handle_dash_hidden;
 
138
   guint       _handle_dash_shown;
 
139
   guint       _handle_bg_color_update;
 
140
-  guint       _track_menu_pointer_id;
 
141
 };
 
142
 
 
143
 }
 
144
 
 
145
=== modified file 'services/panel-main.c'
 
146
--- a/services/panel-main.c     2011-07-29 07:15:54 +0000
 
147
+++ b/services/panel-main.c     2011-07-21 20:24:04 +0000
 
148
@@ -85,6 +85,11 @@
 
149
   "     <arg type='s' name='indicator_id' />"
 
150
   "    </signal>"
 
151
   ""
 
152
+  "    <signal name='ActiveMenuPointerMotion'>"
 
153
+  "     <arg type='i' name='x' />"
 
154
+  "     <arg type='i' name='y' />"
 
155
+  "    </signal>"
 
156
+  ""
 
157
   "    <signal name='EntryActivateRequest'>"
 
158
   "     <arg type='s' name='entry_id' />"
 
159
   "    </signal>"
 
160
@@ -249,6 +254,30 @@
 
161
 }
 
162
 
 
163
 static void
 
164
+on_service_active_menu_pointer_motion (PanelService    *service,
 
165
+                                       GDBusConnection *connection)
 
166
+{
 
167
+  GError *error = NULL;
 
168
+  gint    x=0, y=0;
 
169
+
 
170
+  panel_service_get_last_xy (service, &x, &y);
 
171
+
 
172
+  g_dbus_connection_emit_signal (connection,
 
173
+                                 S_NAME,
 
174
+                                 S_PATH,
 
175
+                                 S_IFACE,
 
176
+                                 "ActiveMenuPointerMotion",
 
177
+                                 g_variant_new ("(ii)", x, y),
 
178
+                                 &error);
 
179
+
 
180
+  if (error)
 
181
+    {
 
182
+      g_warning ("Unable to emit ActiveMenuPointerMotionsignal: %s", error->message);
 
183
+      g_error_free (error);
 
184
+    }
 
185
+}
 
186
+
 
187
+static void
 
188
 on_service_entry_activate_request (PanelService    *service,
 
189
                                    const gchar     *entry_id,
 
190
                                    GDBusConnection *connection)
 
191
@@ -310,6 +339,8 @@
 
192
                     G_CALLBACK (on_service_resync), connection);
 
193
   g_signal_connect (service, "entry-activated",
 
194
                     G_CALLBACK (on_service_entry_activated), connection);
 
195
+  g_signal_connect (service, "active-menu-pointer-motion",
 
196
+                    G_CALLBACK (on_service_active_menu_pointer_motion), connection);
 
197
   g_signal_connect (service, "entry-activate-request",
 
198
                     G_CALLBACK (on_service_entry_activate_request), connection);
 
199
   g_signal_connect (service, "entry-show-now-changed",
 
200
@@ -339,6 +370,7 @@
 
201
   {
 
202
     g_signal_handlers_disconnect_by_func (service, on_service_resync, connection);
 
203
     g_signal_handlers_disconnect_by_func (service, on_service_entry_activated, connection);
 
204
+    g_signal_handlers_disconnect_by_func (service, on_service_active_menu_pointer_motion, connection);
 
205
     g_signal_handlers_disconnect_by_func (service, on_service_entry_activate_request, connection);
 
206
     g_signal_handlers_disconnect_by_func (service, on_service_entry_show_now_changed, connection);
 
207
   }
 
208
 
 
209
=== modified file 'services/panel-service.c'
 
210
--- a/services/panel-service.c  2011-07-29 07:15:54 +0000
 
211
+++ b/services/panel-service.c  2011-07-22 14:05:38 +0000
 
212
@@ -62,6 +62,9 @@
 
213
   gint     last_right;
 
214
   gint     last_bottom;
 
215
   guint32  last_menu_button;
 
216
+
 
217
+  gint     last_menu_x;
 
218
+  gint     last_menu_y;
 
219
 };
 
220
 
 
221
 /* Globals */
 
222
@@ -71,6 +74,7 @@
 
223
 {
 
224
   ENTRY_ACTIVATED = 0,
 
225
   RE_SYNC,
 
226
+  ACTIVE_MENU_POINTER_MOTION,
 
227
   ENTRY_ACTIVATE_REQUEST,
 
228
   ENTRY_SHOW_NOW_CHANGED,
 
229
   GEOMETRIES_CHANGED,
 
230
@@ -169,6 +173,15 @@
 
231
                   g_cclosure_marshal_VOID__STRING,
 
232
                   G_TYPE_NONE, 1, G_TYPE_STRING);
 
233
 
 
234
+ _service_signals[ACTIVE_MENU_POINTER_MOTION] =
 
235
+    g_signal_new ("active-menu-pointer-motion",
 
236
+                  G_OBJECT_CLASS_TYPE (obj_class),
 
237
+                  G_SIGNAL_RUN_LAST,
 
238
+                  0,
 
239
+                  NULL, NULL,
 
240
+                  g_cclosure_marshal_VOID__VOID,
 
241
+                  G_TYPE_NONE, 0);
 
242
+
 
243
  _service_signals[ENTRY_ACTIVATE_REQUEST] =
 
244
     g_signal_new ("entry-activate-request",
 
245
                   G_OBJECT_CLASS_TYPE (obj_class),
 
246
@@ -236,6 +249,16 @@
 
247
 
 
248
           priv->last_menu_button = 0;
 
249
         }
 
250
+      else if (event && event->evtype == XI_Motion)
 
251
+        {
 
252
+          priv->last_menu_x = event->root_x;
 
253
+          priv->last_menu_y = event->root_y;
 
254
+
 
255
+          if (priv->last_menu_y <= priv->last_y)
 
256
+            {
 
257
+              g_signal_emit (self, _service_signals[ACTIVE_MENU_POINTER_MOTION], 0);
 
258
+            }
 
259
+        }
 
260
     }
 
261
 
 
262
   return ret;
 
263
@@ -1162,3 +1185,11 @@
 
264
                         abs(delta/120), direction);
 
265
 }
 
266
 
 
267
+void
 
268
+panel_service_get_last_xy   (PanelService  *self,
 
269
+                             gint          *x,
 
270
+                             gint          *y)
 
271
+{
 
272
+  *x = self->priv->last_menu_x;
 
273
+  *y = self->priv->last_menu_y;
 
274
+}
 
275
 
 
276
=== modified file 'services/panel-service.h'
 
277
--- a/services/panel-service.h  2011-07-29 07:15:54 +0000
 
278
+++ b/services/panel-service.h  2011-07-21 20:24:04 +0000
 
279
@@ -103,6 +103,10 @@
 
280
                                                const gchar  *entry_id,
 
281
                                                gint32       delta);
 
282
 
 
283
+void              panel_service_get_last_xy   (PanelService  *self,
 
284
+                                              gint          *x,
 
285
+                                              gint          *y);
 
286
+
 
287
 G_END_DECLS
 
288
 
 
289
 #endif /* _PANEL_SERVICE_H_ */
 
290