~ubuntu-branches/ubuntu/raring/metacity/raring

« back to all changes in this revision

Viewing changes to src/ui/menu.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-08-23 11:12:43 UTC
  • mfrom: (1.2.64) (2.1.13 quantal-proposed)
  • Revision ID: package-import@ubuntu.com-20120823111243-v2ome3yisozc1dhw
* Resync with Debian & refresh patches. (LP: #1032120, LP: #1035261)
  Remaining changes:
* debian/control:
  - Suggest gnome-themes-standard instead of recommend
  - Add Vcs-Bzr link
* debian/metacity-common.gsettings-override:
  - Set Ubuntu default button layout order for Classic session
  - Drop previous gconf overrides as obsolete
* debian/patches/04_support_drag_drop_with_alt_tab.patch:
  - Support alt-tab during drag and drop.
* debian/patches/05_raise_on_click_for_click_mode.patch:
  - Use raise on click option.
* debian/patches/06_Add_UXD_shadows_and_borders.patch:
  - patch for a new key in the ubuntu theme for shows and borders
* debian/patches/10_no-ws-switcher.patch:
  - Don't show the workspace switcher if we only have one.
* debian/patches/12_dont-show-as-user.patch:
  - Don't show "as user" in title bar.
* debian/patches/13_better_support_for_button_layout.patch:
  - Corrected support for buttons backgrounds with transparency
* debian/patches/14_wrong_colormap.patch:
  - Use correct colormap to avoid crash with client side decorations
* debian/patches/20_do-not-place-windows-over-the-launcher.patch:
  - Try to avoid an already visible launcher in intellihide mode when
    initially positioning new windows.
* debian/patches/21_fix_compositing_startup.patch:
  Fix some weird rendering effect at startup with compositing activated
* debian/patches/100_fade_on_long_title.patch:
  - Fade on the end if the title is too long.
* debian/patches/102_workarea.patch,
  debian/patches/103_struts_in_the_middle.patch,
  debian/patches/104_workarea_union.patch:
  - Add barriers and multimonitor strut support for unity-2d
* debian/patches/104_workarea_union.patch:
  - Ensure each screen_region generated by
    meta_rectangle_get_minimal_spanning_set_for_region is not outside
    the xinerama screens
* Dropped patch:
  - 11_hide_tooltip_on_decorator.patch: Obsolete
* debian/patches/03_strict_focus.patch:
  - Disabled. This needs gsettings-desktop-schemas to be patched if
    we want to bring this back
* Disabled Unity 2D-related patches that need porting to gsettings:
  - 15_show_maximized_titlebars.patch
  - 16-capture-before-unmap.patch
  - 17-workspace-switcher-cycle.patch
  - 18-auto-maximize-windows.patch
  - 19_add_unity_hud_configuration.patch
  - 101_override_gconf_settings.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
  menu = data;
140
140
 
141
141
  meta_frames_notify_menu_hide (menu->frames);
142
 
  (* menu->func) (menu, GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
 
142
  (* menu->func) (menu,
 
143
                  GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
143
144
                  menu->client_xwindow,
144
145
                  gtk_get_current_event_time (),
145
146
                  0, 0,
158
159
  md = data;
159
160
 
160
161
  meta_frames_notify_menu_hide (md->menu->frames);
161
 
  (* md->menu->func) (md->menu, GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
 
162
  (* md->menu->func) (md->menu,
 
163
                      GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
162
164
                      md->menu->client_xwindow,
163
165
                      gtk_get_current_event_time (),
164
166
                      md->op,
386
388
                  Display *display;
387
389
                  Window xroot;
388
390
                  GdkScreen *screen;
 
391
                  GdkWindow *window;
389
392
                  GtkWidget *submenu;
390
393
                  int j;
391
394
 
398
401
                  meta_verbose ("Creating %d-workspace menu current space %lu\n",
399
402
                      n_workspaces, active_workspace);
400
403
 
401
 
                  display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
 
404
                  window = gtk_widget_get_window (GTK_WIDGET (frames));
 
405
                  display = GDK_WINDOW_XDISPLAY (window);
402
406
 
403
 
                  screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
404
 
                  xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
 
407
                  screen = gdk_window_get_screen (window);
 
408
                  xroot = GDK_WINDOW_XID (gdk_screen_get_root_window (screen));
405
409
 
406
410
                  submenu = gtk_menu_new ();
407
411
 
443
447
                          "workspace",
444
448
                          GINT_TO_POINTER (j));
445
449
 
446
 
                      gtk_signal_connect_full (GTK_OBJECT (submi),
 
450
                      g_signal_connect_data (G_OBJECT (submi),
447
451
                          "activate",
448
452
                          G_CALLBACK (activate_cb),
449
 
                          NULL,
450
453
                          md,
451
 
                          g_free, FALSE, FALSE);
 
454
                          (GClosureNotify) g_free, 0);
452
455
 
453
456
                      gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submi);
454
457
 
471
474
              md->menu = menu;
472
475
              md->op = menuitem.op;
473
476
              
474
 
              gtk_signal_connect_full (GTK_OBJECT (mi),
475
 
                                       "activate",
476
 
                                       G_CALLBACK (activate_cb),
477
 
                                       NULL,
478
 
                                       md,
479
 
                                       g_free, FALSE, FALSE);
 
477
              g_signal_connect_data (G_OBJECT (mi),
 
478
                                     "activate",
 
479
                                     G_CALLBACK (activate_cb),
 
480
                                     md,
 
481
                                     (GClosureNotify) g_free, 0);
480
482
            }
481
483
 
482
484
          if (mi)
520
522
                  button,
521
523
                  timestamp);
522
524
 
523
 
  if (!GTK_MENU_SHELL (menu->menu)->have_xgrab)
 
525
  if (!gtk_widget_get_visible (menu->menu))
524
526
    meta_warning ("GtkMenu failed to grab the pointer\n");
525
527
}
526
528