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

« back to all changes in this revision

Viewing changes to src/ui/ui.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:
32
32
 
33
33
#include "inlinepixbufs.h"
34
34
 
35
 
#include "gdk-compat.h"
36
 
 
37
35
#include <string.h>
38
36
#include <stdlib.h>
39
37
 
522
520
  gtk_window_set_screen (GTK_WINDOW (iw->window), gscreen);
523
521
 
524
522
  gtk_widget_realize (iw->window);
525
 
  iw->pixmap = gdk_pixmap_new (iw->window->window,
 
523
  iw->pixmap = gdk_pixmap_new (gtk_widget_get_window (iw->window),
526
524
                               max_width, max_height,
527
525
                               -1);
528
526
  
560
558
                       int              x,
561
559
                       int              y)
562
560
{
 
561
  GdkWindow *window;
563
562
  cairo_t *cr;
564
563
 
565
564
  /* We use a back pixmap to avoid having to handle exposes, because
568
567
   */
569
568
 
570
569
  gdk_draw_pixbuf (iw->pixmap,
571
 
                   iw->window->style->black_gc,
 
570
                   gtk_widget_get_style (iw->window)->black_gc,
572
571
                   pixbuf,
573
572
                   0, 0,
574
573
                   0, 0,
581
580
  cairo_paint (cr);
582
581
  cairo_destroy (cr);
583
582
 
584
 
  gdk_window_set_back_pixmap (iw->window->window,
 
583
  window = gtk_widget_get_window (iw->window);
 
584
  gdk_window_set_back_pixmap (window,
585
585
                              iw->pixmap,
586
586
                              FALSE);
587
587
  
588
 
  gdk_window_move_resize (iw->window->window,
 
588
  gdk_window_move_resize (window,
589
589
                          x, y,
590
590
                          gdk_pixbuf_get_width (pixbuf),
591
591
                          gdk_pixbuf_get_height (pixbuf));
592
592
 
593
 
  gdk_window_clear (iw->window->window);
 
593
  gdk_window_clear (window);
594
594
}
595
595
 
596
596
static GdkColormap*
620
620
 
621
621
  /* Be sure we aren't going to blow up due to visual mismatch */
622
622
  if (cmap &&
623
 
      (gdk_colormap_get_visual (cmap)->depth !=
 
623
      (gdk_visual_get_depth (gdk_colormap_get_visual (cmap)) !=
624
624
       gdk_drawable_get_depth (pixmap)))
625
625
    {
626
626
      cmap = NULL;
745
745
                                                   0,
746
746
                                                   NULL);
747
747
      else
748
 
          default_icon = gtk_icon_theme_load_icon (theme,
749
 
                                                   "gtk-missing-image",
750
 
                                                   META_ICON_WIDTH,
751
 
                                                   0,
 
748
        default_icon = gdk_pixbuf_new_from_inline (-1, window_data,
 
749
                                                   FALSE,
752
750
                                                   NULL);
753
751
 
754
752
      g_assert (default_icon);
780
778
                                                   0,
781
779
                                                   NULL);
782
780
      else
783
 
          default_icon = gtk_icon_theme_load_icon (theme,
784
 
                                                   "gtk-missing-image",
785
 
                                                   META_MINI_ICON_WIDTH,
786
 
                                                   0,
 
781
        default_icon = gdk_pixbuf_new_from_inline (-1, mini_window_data,
 
782
                                                   FALSE,
787
783
                                                   NULL);
788
784
 
789
785
      g_assert (default_icon);
883
879
                           gboolean    force_reload)
884
880
{
885
881
  meta_theme_set_current (name, force_reload);
886
 
  MetaTheme *theme = meta_theme_get_current ();
887
 
  if (theme)
888
 
    {
889
 
      meta_theme_set_show_maximized_titlebars (theme,
890
 
                                               meta_prefs_get_show_maximized_titlebars ());
891
 
    }
892
882
  meta_invalidate_default_icons ();
893
883
}
894
884