Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 199077: Reapplies the GdkPixbuf -> cairo surface patch. (Closed)
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/gtk/cairo_cached_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/browser_window_gtk.h" 5 #include "chrome/browser/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <X11/XF86keysym.h> 8 #include <X11/XF86keysym.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 23 matching lines...) Expand all
34 #include "chrome/browser/debugger/devtools_window.h" 34 #include "chrome/browser/debugger/devtools_window.h"
35 #include "chrome/browser/download/download_item_model.h" 35 #include "chrome/browser/download/download_item_model.h"
36 #include "chrome/browser/download/download_manager.h" 36 #include "chrome/browser/download/download_manager.h"
37 #include "chrome/browser/find_bar_controller.h" 37 #include "chrome/browser/find_bar_controller.h"
38 #include "chrome/browser/gtk/about_chrome_dialog.h" 38 #include "chrome/browser/gtk/about_chrome_dialog.h"
39 #include "chrome/browser/gtk/active_window_watcher.h" 39 #include "chrome/browser/gtk/active_window_watcher.h"
40 #include "chrome/browser/gtk/bookmark_bar_gtk.h" 40 #include "chrome/browser/gtk/bookmark_bar_gtk.h"
41 #include "chrome/browser/gtk/bookmark_manager_gtk.h" 41 #include "chrome/browser/gtk/bookmark_manager_gtk.h"
42 #include "chrome/browser/gtk/browser_titlebar.h" 42 #include "chrome/browser/gtk/browser_titlebar.h"
43 #include "chrome/browser/gtk/browser_toolbar_gtk.h" 43 #include "chrome/browser/gtk/browser_toolbar_gtk.h"
44 #include "chrome/browser/gtk/cairo_cached_surface.h"
44 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" 45 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h"
45 #include "chrome/browser/gtk/download_shelf_gtk.h" 46 #include "chrome/browser/gtk/download_shelf_gtk.h"
46 #include "chrome/browser/gtk/edit_search_engine_dialog.h" 47 #include "chrome/browser/gtk/edit_search_engine_dialog.h"
47 #include "chrome/browser/gtk/extension_shelf_gtk.h" 48 #include "chrome/browser/gtk/extension_shelf_gtk.h"
48 #include "chrome/browser/gtk/find_bar_gtk.h" 49 #include "chrome/browser/gtk/find_bar_gtk.h"
49 #include "chrome/browser/gtk/go_button_gtk.h" 50 #include "chrome/browser/gtk/go_button_gtk.h"
50 #include "chrome/browser/gtk/gtk_theme_provider.h" 51 #include "chrome/browser/gtk/gtk_theme_provider.h"
51 #include "chrome/browser/gtk/import_dialog_gtk.h" 52 #include "chrome/browser/gtk/import_dialog_gtk.h"
52 #include "chrome/browser/gtk/info_bubble_gtk.h" 53 #include "chrome/browser/gtk/info_bubble_gtk.h"
53 #include "chrome/browser/gtk/infobar_container_gtk.h" 54 #include "chrome/browser/gtk/infobar_container_gtk.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 GdkEventExpose* e, 333 GdkEventExpose* e,
333 BrowserWindowGtk* window) { 334 BrowserWindowGtk* window) {
334 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window)); 335 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window));
335 cairo_rectangle(cr, e->area.x, e->area.y, e->area.width, e->area.height); 336 cairo_rectangle(cr, e->area.x, e->area.y, e->area.width, e->area.height);
336 cairo_clip(cr); 337 cairo_clip(cr);
337 // The toolbar is supposed to blend in with the active tab, so we have to pass 338 // The toolbar is supposed to blend in with the active tab, so we have to pass
338 // coordinates for the IDR_THEME_TOOLBAR bitmap relative to the top of the 339 // coordinates for the IDR_THEME_TOOLBAR bitmap relative to the top of the
339 // tab strip. 340 // tab strip.
340 gfx::Point tabstrip_origin = 341 gfx::Point tabstrip_origin =
341 window->tabstrip()->GetTabStripOriginForWidget(widget); 342 window->tabstrip()->GetTabStripOriginForWidget(widget);
342 ThemeProvider* theme_provider = 343 GtkThemeProvider* theme_provider = GtkThemeProvider::GetFrom(
343 window->browser()->profile()->GetThemeProvider(); 344 window->browser()->profile());
344 GdkPixbuf* toolbar_background = theme_provider->GetPixbufNamed( 345 CairoCachedSurface* background = theme_provider->GetSurfaceNamed(
345 IDR_THEME_TOOLBAR); 346 IDR_THEME_TOOLBAR, widget);
346 gdk_cairo_set_source_pixbuf(cr, toolbar_background, tabstrip_origin.x(), 347 background->SetSource(cr, tabstrip_origin.x(), tabstrip_origin.y());
347 tabstrip_origin.y());
348 // We tile the toolbar background in both directions. 348 // We tile the toolbar background in both directions.
349 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); 349 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
350 cairo_rectangle(cr, 350 cairo_rectangle(cr,
351 tabstrip_origin.x(), 351 tabstrip_origin.x(),
352 tabstrip_origin.y(), 352 tabstrip_origin.y(),
353 e->area.x + e->area.width - tabstrip_origin.x(), 353 e->area.x + e->area.width - tabstrip_origin.x(),
354 e->area.y + e->area.height - tabstrip_origin.y()); 354 e->area.y + e->area.height - tabstrip_origin.y());
355 cairo_fill(cr); 355 cairo_fill(cr);
356 cairo_destroy(cr); 356 cairo_destroy(cr);
357 357
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 // gtk_window_activate_key() takes care of it automatically. 589 // gtk_window_activate_key() takes care of it automatically.
590 if (!HandleCustomAccelerator(event->keyval, GdkModifierType(event->state), 590 if (!HandleCustomAccelerator(event->keyval, GdkModifierType(event->state),
591 browser_.get())) { 591 browser_.get())) {
592 gtk_window_activate_key(window_, event); 592 gtk_window_activate_key(window_, event);
593 } 593 }
594 } 594 }
595 595
596 gboolean BrowserWindowGtk::OnCustomFrameExpose(GtkWidget* widget, 596 gboolean BrowserWindowGtk::OnCustomFrameExpose(GtkWidget* widget,
597 GdkEventExpose* event, 597 GdkEventExpose* event,
598 BrowserWindowGtk* window) { 598 BrowserWindowGtk* window) {
599 ThemeProvider* theme_provider = 599 GtkThemeProvider* theme_provider = GtkThemeProvider::GetFrom(
600 window->browser()->profile()->GetThemeProvider(); 600 window->browser()->profile());
601 601
602 // Draw the default background. 602 // Draw the default background.
603 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window)); 603 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window));
604 cairo_rectangle(cr, event->area.x, event->area.y, event->area.width, 604 cairo_rectangle(cr, event->area.x, event->area.y, event->area.width,
605 event->area.height); 605 event->area.height);
606 cairo_clip(cr); 606 cairo_clip(cr);
607 607
608 int image_name; 608 int image_name;
609 if (window->IsActive()) { 609 if (window->IsActive()) {
610 image_name = window->browser()->profile()->IsOffTheRecord() ? 610 image_name = window->browser()->profile()->IsOffTheRecord() ?
611 IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; 611 IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME;
612 } else { 612 } else {
613 image_name = window->browser()->profile()->IsOffTheRecord() ? 613 image_name = window->browser()->profile()->IsOffTheRecord() ?
614 IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE; 614 IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE;
615 } 615 }
616 GdkPixbuf* pixbuf = theme_provider->GetPixbufNamed(image_name); 616 CairoCachedSurface* surface = theme_provider->GetSurfaceNamed(
617 gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0); 617 image_name, widget);
618 surface->SetSource(cr, 0, 0);
618 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); 619 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
619 cairo_rectangle(cr, event->area.x, event->area.y, 620 cairo_rectangle(cr, event->area.x, event->area.y,
620 event->area.width, event->area.height); 621 event->area.width, event->area.height);
621 cairo_fill(cr); 622 cairo_fill(cr);
622 623
623 if (theme_provider->HasCustomImage(IDR_THEME_FRAME_OVERLAY)) { 624 if (theme_provider->HasCustomImage(IDR_THEME_FRAME_OVERLAY)) {
624 GdkPixbuf* theme_overlay = theme_provider->GetPixbufNamed( 625 CairoCachedSurface* theme_overlay = theme_provider->GetSurfaceNamed(
625 window->IsActive() ? IDR_THEME_FRAME_OVERLAY 626 window->IsActive() ? IDR_THEME_FRAME_OVERLAY
626 : IDR_THEME_FRAME_OVERLAY_INACTIVE); 627 : IDR_THEME_FRAME_OVERLAY_INACTIVE, widget);
627 gdk_cairo_set_source_pixbuf(cr, theme_overlay, 0, 0); 628 theme_overlay->SetSource(cr, 0, 0);
628 cairo_paint(cr); 629 cairo_paint(cr);
629 } 630 }
630 631
631 DrawContentShadow(cr, window); 632 DrawContentShadow(cr, window);
632 633
633 cairo_destroy(cr); 634 cairo_destroy(cr);
634 635
635 if (window->UseCustomFrame() && !window->IsMaximized()) { 636 if (window->UseCustomFrame() && !window->IsMaximized()) {
636 static NineBox custom_frame_border( 637 static NineBox custom_frame_border(
637 IDR_WINDOW_TOP_LEFT_CORNER, 638 IDR_WINDOW_TOP_LEFT_CORNER,
638 IDR_WINDOW_TOP_CENTER, 639 IDR_WINDOW_TOP_CENTER,
639 IDR_WINDOW_TOP_RIGHT_CORNER, 640 IDR_WINDOW_TOP_RIGHT_CORNER,
640 IDR_WINDOW_LEFT_SIDE, 641 IDR_WINDOW_LEFT_SIDE,
641 NULL, 642 NULL,
642 IDR_WINDOW_RIGHT_SIDE, 643 IDR_WINDOW_RIGHT_SIDE,
643 IDR_WINDOW_BOTTOM_LEFT_CORNER, 644 IDR_WINDOW_BOTTOM_LEFT_CORNER,
644 IDR_WINDOW_BOTTOM_CENTER, 645 IDR_WINDOW_BOTTOM_CENTER,
645 IDR_WINDOW_BOTTOM_RIGHT_CORNER); 646 IDR_WINDOW_BOTTOM_RIGHT_CORNER);
646 647
647 custom_frame_border.RenderToWidget(widget); 648 custom_frame_border.RenderToWidget(widget);
648 } 649 }
649 650
650 return FALSE; // Allow subwidgets to paint. 651 return FALSE; // Allow subwidgets to paint.
651 } 652 }
652 653
653 // static 654 // static
654 void BrowserWindowGtk::DrawContentShadow(cairo_t* cr, 655 void BrowserWindowGtk::DrawContentShadow(cairo_t* cr,
655 BrowserWindowGtk* window) { 656 BrowserWindowGtk* window) {
656 // Draw the shadow above the toolbar. Tabs on the tabstrip will draw over us. 657 // Draw the shadow above the toolbar. Tabs on the tabstrip will draw over us.
657 ThemeProvider* theme_provider = 658 GtkThemeProvider* theme_provider = GtkThemeProvider::GetFrom(
658 window->browser()->profile()->GetThemeProvider(); 659 window->browser()->profile());
659 int left_x, top_y; 660 int left_x, top_y;
660 gtk_widget_translate_coordinates(window->content_vbox_, 661 gtk_widget_translate_coordinates(window->content_vbox_,
661 GTK_WIDGET(window->window_), 0, 0, &left_x, 662 GTK_WIDGET(window->window_), 0, 0, &left_x,
662 &top_y); 663 &top_y);
663 int width = window->content_vbox_->allocation.width; 664 int width = window->content_vbox_->allocation.width;
664 665
665 GdkPixbuf* top_center = 666 CairoCachedSurface* top_center = theme_provider->GetSurfaceNamed(
666 theme_provider->GetPixbufNamed(IDR_CONTENT_TOP_CENTER); 667 IDR_CONTENT_TOP_CENTER, window->content_vbox_);
667 gdk_cairo_set_source_pixbuf(cr, top_center, 668 top_center->SetSource(cr, left_x, top_y - kContentShadowThickness);
668 left_x, top_y - kContentShadowThickness);
669 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); 669 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
670 cairo_rectangle(cr, left_x, top_y - kContentShadowThickness, width, 670 cairo_rectangle(cr, left_x, top_y - kContentShadowThickness, width,
671 gdk_pixbuf_get_height(top_center)); 671 top_center->Height());
672 cairo_fill(cr); 672 cairo_fill(cr);
673 673
674 // Only draw the rest of the shadow if the user has the custom frame enabled. 674 // Only draw the rest of the shadow if the user has the custom frame enabled.
675 if (!window->UseCustomFrame()) 675 if (!window->UseCustomFrame())
676 return; 676 return;
677 677
678 // The top left corner has a width of 3 pixels. On Windows, the last column 678 // The top left corner has a width of 3 pixels. On Windows, the last column
679 // of pixels overlap the toolbar. We just crop it off on Linux. The top 679 // of pixels overlap the toolbar. We just crop it off on Linux. The top
680 // corners extend to the base of the toolbar (one pixel above the dividing 680 // corners extend to the base of the toolbar (one pixel above the dividing
681 // line). 681 // line).
682 int right_x = left_x + width; 682 int right_x = left_x + width;
683 GdkPixbuf* top_left = 683 CairoCachedSurface* top_left = theme_provider->GetSurfaceNamed(
684 theme_provider->GetPixbufNamed(IDR_CONTENT_TOP_LEFT_CORNER); 684 IDR_CONTENT_TOP_LEFT_CORNER, window->content_vbox_);
685 gdk_cairo_set_source_pixbuf(cr, top_left, 685 top_left->SetSource(
686 left_x - kContentShadowThickness, top_y - kContentShadowThickness); 686 cr, left_x - kContentShadowThickness, top_y - kContentShadowThickness);
687 // The toolbar is shorter in location bar only mode so clip the image to the 687 // The toolbar is shorter in location bar only mode so clip the image to the
688 // height of the toolbar + the amount of shadow above the toolbar. 688 // height of the toolbar + the amount of shadow above the toolbar.
689 int top_corner_height = 689 int top_corner_height =
690 window->toolbar_->widget()->allocation.height + kContentShadowThickness; 690 window->toolbar_->widget()->allocation.height + kContentShadowThickness;
691 cairo_rectangle(cr, 691 cairo_rectangle(cr,
692 left_x - kContentShadowThickness, 692 left_x - kContentShadowThickness,
693 top_y - kContentShadowThickness, 693 top_y - kContentShadowThickness,
694 kContentShadowThickness, 694 kContentShadowThickness,
695 top_corner_height); 695 top_corner_height);
696 cairo_fill(cr); 696 cairo_fill(cr);
697 697
698 // Likewise, we crop off the left column of pixels for the top right corner. 698 // Likewise, we crop off the left column of pixels for the top right corner.
699 GdkPixbuf* top_right = 699 CairoCachedSurface* top_right = theme_provider->GetSurfaceNamed(
700 theme_provider->GetPixbufNamed(IDR_CONTENT_TOP_RIGHT_CORNER); 700 IDR_CONTENT_TOP_RIGHT_CORNER, window->content_vbox_);
701 gdk_cairo_set_source_pixbuf(cr, top_right, 701 top_right->SetSource(cr, right_x - 1, top_y - kContentShadowThickness);
702 right_x - 1, top_y - kContentShadowThickness);
703 cairo_rectangle(cr, 702 cairo_rectangle(cr,
704 right_x, 703 right_x,
705 top_y - kContentShadowThickness, 704 top_y - kContentShadowThickness,
706 kContentShadowThickness, 705 kContentShadowThickness,
707 top_corner_height); 706 top_corner_height);
708 cairo_fill(cr); 707 cairo_fill(cr);
709 708
710 // Fill in the sides. As above, we only draw 2 of the 3 columns on Linux. 709 // Fill in the sides. As above, we only draw 2 of the 3 columns on Linux.
711 int height = window->content_vbox_->allocation.height; 710 int height = window->content_vbox_->allocation.height;
712 int bottom_y = top_y + height; 711 int bottom_y = top_y + height;
713 // |side_y| is where to start drawing the side shadows. The top corners draw 712 // |side_y| is where to start drawing the side shadows. The top corners draw
714 // the sides down to the bottom of the toolbar. 713 // the sides down to the bottom of the toolbar.
715 int side_y = top_y - kContentShadowThickness + top_corner_height; 714 int side_y = top_y - kContentShadowThickness + top_corner_height;
716 // |side_height| is how many pixels to draw for the side borders. We do one 715 // |side_height| is how many pixels to draw for the side borders. We do one
717 // pixel before the bottom of the web contents because that extra pixel is 716 // pixel before the bottom of the web contents because that extra pixel is
718 // drawn by the bottom corners. 717 // drawn by the bottom corners.
719 int side_height = bottom_y - side_y - 1; 718 int side_height = bottom_y - side_y - 1;
720 if (side_height > 0) { 719 if (side_height > 0) {
721 GdkPixbuf* left = theme_provider->GetPixbufNamed(IDR_CONTENT_LEFT_SIDE); 720 CairoCachedSurface* left = theme_provider->GetSurfaceNamed(
722 gdk_cairo_set_source_pixbuf(cr, left, 721 IDR_CONTENT_LEFT_SIDE, window->content_vbox_);
723 left_x - kContentShadowThickness, side_y); 722 left->SetSource(cr, left_x - kContentShadowThickness, side_y);
724 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); 723 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
725 cairo_rectangle(cr, 724 cairo_rectangle(cr,
726 left_x - kContentShadowThickness, 725 left_x - kContentShadowThickness,
727 side_y, 726 side_y,
728 kContentShadowThickness, 727 kContentShadowThickness,
729 side_height); 728 side_height);
730 cairo_fill(cr); 729 cairo_fill(cr);
731 730
732 GdkPixbuf* right = theme_provider->GetPixbufNamed(IDR_CONTENT_RIGHT_SIDE); 731 CairoCachedSurface* right = theme_provider->GetSurfaceNamed(
733 gdk_cairo_set_source_pixbuf(cr, right, right_x - 1, side_y); 732 IDR_CONTENT_RIGHT_SIDE, window->content_vbox_);
733 right->SetSource(cr, right_x - 1, side_y);
734 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); 734 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
735 cairo_rectangle(cr, 735 cairo_rectangle(cr,
736 right_x, 736 right_x,
737 side_y, 737 side_y,
738 kContentShadowThickness, 738 kContentShadowThickness,
739 side_height); 739 side_height);
740 cairo_fill(cr); 740 cairo_fill(cr);
741 } 741 }
742 742
743 // Draw the bottom corners. The bottom corners also draw the bottom row of 743 // Draw the bottom corners. The bottom corners also draw the bottom row of
744 // pixels of the side shadows. 744 // pixels of the side shadows.
745 GdkPixbuf* bottom_left = 745 CairoCachedSurface* bottom_left = theme_provider->GetSurfaceNamed(
746 theme_provider->GetPixbufNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER); 746 IDR_CONTENT_BOTTOM_LEFT_CORNER, window->content_vbox_);
747 gdk_cairo_set_source_pixbuf(cr, bottom_left, 747 bottom_left->SetSource(cr, left_x - kContentShadowThickness, bottom_y - 1);
748 left_x - kContentShadowThickness, bottom_y - 1);
749 cairo_paint(cr); 748 cairo_paint(cr);
750 749
751 GdkPixbuf* bottom_right = 750 CairoCachedSurface* bottom_right = theme_provider->GetSurfaceNamed(
752 theme_provider->GetPixbufNamed(IDR_CONTENT_BOTTOM_RIGHT_CORNER); 751 IDR_CONTENT_BOTTOM_RIGHT_CORNER, window->content_vbox_);
753 gdk_cairo_set_source_pixbuf(cr, bottom_right, 752 bottom_right->SetSource(cr, right_x - 1, bottom_y - 1);
754 right_x - 1, bottom_y - 1);
755 cairo_paint(cr); 753 cairo_paint(cr);
756 754
757 // Finally, draw the bottom row. Since we don't overlap the contents, we clip 755 // Finally, draw the bottom row. Since we don't overlap the contents, we clip
758 // the top row of pixels. 756 // the top row of pixels.
759 GdkPixbuf* bottom = 757 CairoCachedSurface* bottom = theme_provider->GetSurfaceNamed(
760 theme_provider->GetPixbufNamed(IDR_CONTENT_BOTTOM_CENTER); 758 IDR_CONTENT_BOTTOM_CENTER, window->content_vbox_);
761 gdk_cairo_set_source_pixbuf(cr, bottom, 759 bottom->SetSource(cr, left_x + 1, bottom_y - 1);
762 left_x + 1, bottom_y - 1);
763 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); 760 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
764 cairo_rectangle(cr, 761 cairo_rectangle(cr,
765 left_x + 1, 762 left_x + 1,
766 bottom_y, 763 bottom_y,
767 width - 2, 764 width - 2,
768 kContentShadowThickness); 765 kContentShadowThickness);
769 cairo_fill(cr); 766 cairo_fill(cr);
770 } 767 }
771 768
772 void BrowserWindowGtk::Show() { 769 void BrowserWindowGtk::Show() {
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 // special-case the ones where the custom frame should be used. These names 2153 // special-case the ones where the custom frame should be used. These names
2157 // are taken from the WMs' source code. 2154 // are taken from the WMs' source code.
2158 return (wm_name == "Blackbox" || 2155 return (wm_name == "Blackbox" ||
2159 wm_name == "compiz" || 2156 wm_name == "compiz" ||
2160 wm_name == "e16" || // Enlightenment DR16 2157 wm_name == "e16" || // Enlightenment DR16
2161 wm_name == "KWin" || 2158 wm_name == "KWin" ||
2162 wm_name == "Metacity" || 2159 wm_name == "Metacity" ||
2163 wm_name == "Openbox" || 2160 wm_name == "Openbox" ||
2164 wm_name == "Xfwm4"); 2161 wm_name == "Xfwm4");
2165 } 2162 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/gtk/cairo_cached_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698