~darkxst/ubuntu/saucy/gnome-shell/upstart_log

« back to all changes in this revision

Viewing changes to src/shell-tray-manager.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-31 12:01:12 UTC
  • mfrom: (1.1.49) (19.1.36 experimental)
  • Revision ID: package-import@ubuntu.com-20130531120112-ew91khxf051x9i2r
Tags: 3.8.2-1ubuntu1
* Merge with Debian (LP: #1185869, #1185721). Remaining changes:
  - debian/control.in:
    + Build-depend on libsystemd-login-dev & libsystemd-daemon-dev
    + Depend on gdm instead of gdm3
    + Don't recommend gnome-session-fallback
  - debian/patches/40_change-pam-name-to-match-gdm.patch:
  - debian/patches/revert-suspend-break.patch:
    + Disabled, not needed on Ubuntu
  - debian/patches/ubuntu-lightdm-user-switching.patch:
    + Allow user switching when using LightDM. Thanks Gerhard Stein
      for rebasing against gnome-shell 3.8!
  - debian/patches/ubuntu_lock_on_suspend.patch
    + Respect Ubuntu's lock-on-suspend setting.
      Disabled until it can be rewritten.
  - debian/patches/git_relock_screen_after_crash.patch:
    + Add Upstream fix for unlocked session after crash (LP: #1064584)
* Note that the new GNOME Classic mode (which requires installing
  gnome-shell-extensions) won't work until gnome-session 3.8 is
  available in Ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
struct _ShellTrayManagerPrivate {
19
19
  NaTrayManager *na_manager;
20
 
  ClutterStage *stage;
21
20
  ClutterColor bg_color;
22
21
 
23
22
  GHashTable *icons;
135
134
  ShellTrayManager *manager = SHELL_TRAY_MANAGER (object);
136
135
 
137
136
  g_object_unref (manager->priv->na_manager);
138
 
  g_object_unref (manager->priv->stage);
139
137
  g_hash_table_destroy (manager->priv->icons);
140
138
 
141
139
  G_OBJECT_CLASS (shell_tray_manager_parent_class)->finalize (object);
219
217
}
220
218
 
221
219
void
222
 
shell_tray_manager_manage_stage (ShellTrayManager *manager,
223
 
                                 ClutterStage     *stage,
224
 
                                 StWidget         *theme_widget)
 
220
shell_tray_manager_manage_screen (ShellTrayManager *manager,
 
221
                                  MetaScreen       *screen,
 
222
                                  StWidget         *theme_widget)
225
223
{
226
 
  Window stage_xwindow;
227
 
  GdkWindow *stage_window;
228
224
  GdkDisplay *display;
229
 
  GdkScreen *screen;
230
 
 
231
 
  g_return_if_fail (manager->priv->stage == NULL);
232
 
 
233
 
  manager->priv->stage = g_object_ref (stage);
234
 
 
235
 
  stage_xwindow = clutter_x11_get_stage_window (stage);
236
 
 
237
 
  /* This is a pretty ugly way to get the GdkScreen for the stage; it
238
 
   *  will normally go through the foreign_new() case with a
239
 
   *  round-trip to the X server, it might be nicer to pass the screen
240
 
   *  in in some way. (The Clutter/Mutter combo is currently incapable
241
 
   *  of multi-screen operation, so alternatively we could just assume
242
 
   *  that clutter_x11_get_default_screen() gives us the right
243
 
   *  screen.) We assume, in any case, that we are using the default
244
 
   *  GDK display.
245
 
   */
246
 
  display = gdk_display_get_default();
247
 
  stage_window = gdk_x11_window_lookup_for_display (display, stage_xwindow);
248
 
  if (stage_window)
249
 
    g_object_ref (stage_window);
250
 
  else
251
 
    stage_window = gdk_x11_window_foreign_new_for_display (display, stage_xwindow);
252
 
 
253
 
  screen = gdk_window_get_screen (stage_window);
254
 
 
255
 
  g_object_unref (stage_window);
256
 
 
257
 
  na_tray_manager_manage_screen (manager->priv->na_manager, screen);
 
225
  GdkScreen *gdk_screen;
 
226
  int screen_number;
 
227
 
 
228
  display = gdk_display_get_default ();
 
229
  screen_number = meta_screen_get_screen_number (screen);
 
230
  gdk_screen = gdk_display_get_screen (display, screen_number);
 
231
 
 
232
  na_tray_manager_manage_screen (manager->priv->na_manager, gdk_screen);
258
233
 
259
234
  g_signal_connect (theme_widget, "style-changed",
260
235
                    G_CALLBACK (shell_tray_manager_style_changed), manager);
320
295
   */
321
296
  na_tray_child_set_composited (NA_TRAY_CHILD (socket), FALSE);
322
297
 
323
 
  win = shell_embedded_window_new (manager->priv->stage);
 
298
  win = shell_embedded_window_new ();
324
299
  gtk_container_add (GTK_CONTAINER (win), socket);
325
300
 
326
301
  /* The visual of the socket matches that of its contents; make