OLD | NEW |
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 Loading... |
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" | |
45 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" | 44 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" |
46 #include "chrome/browser/gtk/download_shelf_gtk.h" | 45 #include "chrome/browser/gtk/download_shelf_gtk.h" |
47 #include "chrome/browser/gtk/edit_search_engine_dialog.h" | 46 #include "chrome/browser/gtk/edit_search_engine_dialog.h" |
48 #include "chrome/browser/gtk/extension_shelf_gtk.h" | 47 #include "chrome/browser/gtk/extension_shelf_gtk.h" |
49 #include "chrome/browser/gtk/find_bar_gtk.h" | 48 #include "chrome/browser/gtk/find_bar_gtk.h" |
50 #include "chrome/browser/gtk/go_button_gtk.h" | 49 #include "chrome/browser/gtk/go_button_gtk.h" |
51 #include "chrome/browser/gtk/gtk_theme_provider.h" | 50 #include "chrome/browser/gtk/gtk_theme_provider.h" |
52 #include "chrome/browser/gtk/import_dialog_gtk.h" | 51 #include "chrome/browser/gtk/import_dialog_gtk.h" |
53 #include "chrome/browser/gtk/info_bubble_gtk.h" | 52 #include "chrome/browser/gtk/info_bubble_gtk.h" |
54 #include "chrome/browser/gtk/infobar_container_gtk.h" | 53 #include "chrome/browser/gtk/infobar_container_gtk.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 GdkEventExpose* e, | 332 GdkEventExpose* e, |
334 BrowserWindowGtk* window) { | 333 BrowserWindowGtk* window) { |
335 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window)); | 334 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(widget->window)); |
336 cairo_rectangle(cr, e->area.x, e->area.y, e->area.width, e->area.height); | 335 cairo_rectangle(cr, e->area.x, e->area.y, e->area.width, e->area.height); |
337 cairo_clip(cr); | 336 cairo_clip(cr); |
338 // The toolbar is supposed to blend in with the active tab, so we have to pass | 337 // The toolbar is supposed to blend in with the active tab, so we have to pass |
339 // coordinates for the IDR_THEME_TOOLBAR bitmap relative to the top of the | 338 // coordinates for the IDR_THEME_TOOLBAR bitmap relative to the top of the |
340 // tab strip. | 339 // tab strip. |
341 gfx::Point tabstrip_origin = | 340 gfx::Point tabstrip_origin = |
342 window->tabstrip()->GetTabStripOriginForWidget(widget); | 341 window->tabstrip()->GetTabStripOriginForWidget(widget); |
343 GtkThemeProvider* theme_provider = GtkThemeProvider::GetFrom( | 342 ThemeProvider* theme_provider = |
344 window->browser()->profile()); | 343 window->browser()->profile()->GetThemeProvider(); |
345 CairoCachedSurface* background = theme_provider->GetSurfaceNamed( | 344 GdkPixbuf* toolbar_background = theme_provider->GetPixbufNamed( |
346 IDR_THEME_TOOLBAR, widget); | 345 IDR_THEME_TOOLBAR); |
347 background->SetSource(cr, tabstrip_origin.x(), tabstrip_origin.y()); | 346 gdk_cairo_set_source_pixbuf(cr, toolbar_background, tabstrip_origin.x(), |
| 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 Loading... |
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 GtkThemeProvider* theme_provider = GtkThemeProvider::GetFrom( | 599 ThemeProvider* theme_provider = |
600 window->browser()->profile()); | 600 window->browser()->profile()->GetThemeProvider(); |
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 CairoCachedSurface* surface = theme_provider->GetSurfaceNamed( | 616 GdkPixbuf* pixbuf = theme_provider->GetPixbufNamed(image_name); |
617 image_name, widget); | 617 gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0); |
618 surface->SetSource(cr, 0, 0); | |
619 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); | 618 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); |
620 cairo_rectangle(cr, event->area.x, event->area.y, | 619 cairo_rectangle(cr, event->area.x, event->area.y, |
621 event->area.width, event->area.height); | 620 event->area.width, event->area.height); |
622 cairo_fill(cr); | 621 cairo_fill(cr); |
623 | 622 |
624 if (theme_provider->HasCustomImage(IDR_THEME_FRAME_OVERLAY)) { | 623 if (theme_provider->HasCustomImage(IDR_THEME_FRAME_OVERLAY)) { |
625 CairoCachedSurface* theme_overlay = theme_provider->GetSurfaceNamed( | 624 GdkPixbuf* theme_overlay = theme_provider->GetPixbufNamed( |
626 window->IsActive() ? IDR_THEME_FRAME_OVERLAY | 625 window->IsActive() ? IDR_THEME_FRAME_OVERLAY |
627 : IDR_THEME_FRAME_OVERLAY_INACTIVE, widget); | 626 : IDR_THEME_FRAME_OVERLAY_INACTIVE); |
628 theme_overlay->SetSource(cr, 0, 0); | 627 gdk_cairo_set_source_pixbuf(cr, theme_overlay, 0, 0); |
629 cairo_paint(cr); | 628 cairo_paint(cr); |
630 } | 629 } |
631 | 630 |
632 DrawContentShadow(cr, window); | 631 DrawContentShadow(cr, window); |
633 | 632 |
634 cairo_destroy(cr); | 633 cairo_destroy(cr); |
635 | 634 |
636 if (window->UseCustomFrame() && !window->IsMaximized()) { | 635 if (window->UseCustomFrame() && !window->IsMaximized()) { |
637 static NineBox custom_frame_border( | 636 static NineBox custom_frame_border( |
638 IDR_WINDOW_TOP_LEFT_CORNER, | 637 IDR_WINDOW_TOP_LEFT_CORNER, |
639 IDR_WINDOW_TOP_CENTER, | 638 IDR_WINDOW_TOP_CENTER, |
640 IDR_WINDOW_TOP_RIGHT_CORNER, | 639 IDR_WINDOW_TOP_RIGHT_CORNER, |
641 IDR_WINDOW_LEFT_SIDE, | 640 IDR_WINDOW_LEFT_SIDE, |
642 NULL, | 641 NULL, |
643 IDR_WINDOW_RIGHT_SIDE, | 642 IDR_WINDOW_RIGHT_SIDE, |
644 IDR_WINDOW_BOTTOM_LEFT_CORNER, | 643 IDR_WINDOW_BOTTOM_LEFT_CORNER, |
645 IDR_WINDOW_BOTTOM_CENTER, | 644 IDR_WINDOW_BOTTOM_CENTER, |
646 IDR_WINDOW_BOTTOM_RIGHT_CORNER); | 645 IDR_WINDOW_BOTTOM_RIGHT_CORNER); |
647 | 646 |
648 custom_frame_border.RenderToWidget(widget); | 647 custom_frame_border.RenderToWidget(widget); |
649 } | 648 } |
650 | 649 |
651 return FALSE; // Allow subwidgets to paint. | 650 return FALSE; // Allow subwidgets to paint. |
652 } | 651 } |
653 | 652 |
654 // static | 653 // static |
655 void BrowserWindowGtk::DrawContentShadow(cairo_t* cr, | 654 void BrowserWindowGtk::DrawContentShadow(cairo_t* cr, |
656 BrowserWindowGtk* window) { | 655 BrowserWindowGtk* window) { |
657 // Draw the shadow above the toolbar. Tabs on the tabstrip will draw over us. | 656 // Draw the shadow above the toolbar. Tabs on the tabstrip will draw over us. |
658 GtkThemeProvider* theme_provider = GtkThemeProvider::GetFrom( | 657 ThemeProvider* theme_provider = |
659 window->browser()->profile()); | 658 window->browser()->profile()->GetThemeProvider(); |
660 int left_x, top_y; | 659 int left_x, top_y; |
661 gtk_widget_translate_coordinates(window->content_vbox_, | 660 gtk_widget_translate_coordinates(window->content_vbox_, |
662 GTK_WIDGET(window->window_), 0, 0, &left_x, | 661 GTK_WIDGET(window->window_), 0, 0, &left_x, |
663 &top_y); | 662 &top_y); |
664 int width = window->content_vbox_->allocation.width; | 663 int width = window->content_vbox_->allocation.width; |
665 | 664 |
666 CairoCachedSurface* top_center = theme_provider->GetSurfaceNamed( | 665 GdkPixbuf* top_center = |
667 IDR_CONTENT_TOP_CENTER, window->content_vbox_); | 666 theme_provider->GetPixbufNamed(IDR_CONTENT_TOP_CENTER); |
668 top_center->SetSource(cr, left_x, top_y - kContentShadowThickness); | 667 gdk_cairo_set_source_pixbuf(cr, top_center, |
| 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 top_center->Height()); | 671 gdk_pixbuf_get_height(top_center)); |
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 CairoCachedSurface* top_left = theme_provider->GetSurfaceNamed( | 683 GdkPixbuf* top_left = |
684 IDR_CONTENT_TOP_LEFT_CORNER, window->content_vbox_); | 684 theme_provider->GetPixbufNamed(IDR_CONTENT_TOP_LEFT_CORNER); |
685 top_left->SetSource( | 685 gdk_cairo_set_source_pixbuf(cr, top_left, |
686 cr, left_x - kContentShadowThickness, top_y - kContentShadowThickness); | 686 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 CairoCachedSurface* top_right = theme_provider->GetSurfaceNamed( | 699 GdkPixbuf* top_right = |
700 IDR_CONTENT_TOP_RIGHT_CORNER, window->content_vbox_); | 700 theme_provider->GetPixbufNamed(IDR_CONTENT_TOP_RIGHT_CORNER); |
701 top_right->SetSource(cr, right_x - 1, top_y - kContentShadowThickness); | 701 gdk_cairo_set_source_pixbuf(cr, top_right, |
| 702 right_x - 1, top_y - kContentShadowThickness); |
702 cairo_rectangle(cr, | 703 cairo_rectangle(cr, |
703 right_x, | 704 right_x, |
704 top_y - kContentShadowThickness, | 705 top_y - kContentShadowThickness, |
705 kContentShadowThickness, | 706 kContentShadowThickness, |
706 top_corner_height); | 707 top_corner_height); |
707 cairo_fill(cr); | 708 cairo_fill(cr); |
708 | 709 |
709 // Fill in the sides. As above, we only draw 2 of the 3 columns on Linux. | 710 // Fill in the sides. As above, we only draw 2 of the 3 columns on Linux. |
710 int height = window->content_vbox_->allocation.height; | 711 int height = window->content_vbox_->allocation.height; |
711 int bottom_y = top_y + height; | 712 int bottom_y = top_y + height; |
712 // |side_y| is where to start drawing the side shadows. The top corners draw | 713 // |side_y| is where to start drawing the side shadows. The top corners draw |
713 // the sides down to the bottom of the toolbar. | 714 // the sides down to the bottom of the toolbar. |
714 int side_y = top_y - kContentShadowThickness + top_corner_height; | 715 int side_y = top_y - kContentShadowThickness + top_corner_height; |
715 // |side_height| is how many pixels to draw for the side borders. We do one | 716 // |side_height| is how many pixels to draw for the side borders. We do one |
716 // pixel before the bottom of the web contents because that extra pixel is | 717 // pixel before the bottom of the web contents because that extra pixel is |
717 // drawn by the bottom corners. | 718 // drawn by the bottom corners. |
718 int side_height = bottom_y - side_y - 1; | 719 int side_height = bottom_y - side_y - 1; |
719 if (side_height > 0) { | 720 if (side_height > 0) { |
720 CairoCachedSurface* left = theme_provider->GetSurfaceNamed( | 721 GdkPixbuf* left = theme_provider->GetPixbufNamed(IDR_CONTENT_LEFT_SIDE); |
721 IDR_CONTENT_LEFT_SIDE, window->content_vbox_); | 722 gdk_cairo_set_source_pixbuf(cr, left, |
722 left->SetSource(cr, left_x - kContentShadowThickness, side_y); | 723 left_x - kContentShadowThickness, side_y); |
723 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); | 724 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); |
724 cairo_rectangle(cr, | 725 cairo_rectangle(cr, |
725 left_x - kContentShadowThickness, | 726 left_x - kContentShadowThickness, |
726 side_y, | 727 side_y, |
727 kContentShadowThickness, | 728 kContentShadowThickness, |
728 side_height); | 729 side_height); |
729 cairo_fill(cr); | 730 cairo_fill(cr); |
730 | 731 |
731 CairoCachedSurface* right = theme_provider->GetSurfaceNamed( | 732 GdkPixbuf* right = theme_provider->GetPixbufNamed(IDR_CONTENT_RIGHT_SIDE); |
732 IDR_CONTENT_RIGHT_SIDE, window->content_vbox_); | 733 gdk_cairo_set_source_pixbuf(cr, right, right_x - 1, side_y); |
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 CairoCachedSurface* bottom_left = theme_provider->GetSurfaceNamed( | 745 GdkPixbuf* bottom_left = |
746 IDR_CONTENT_BOTTOM_LEFT_CORNER, window->content_vbox_); | 746 theme_provider->GetPixbufNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER); |
747 bottom_left->SetSource(cr, left_x - kContentShadowThickness, bottom_y - 1); | 747 gdk_cairo_set_source_pixbuf(cr, bottom_left, |
| 748 left_x - kContentShadowThickness, bottom_y - 1); |
748 cairo_paint(cr); | 749 cairo_paint(cr); |
749 | 750 |
750 CairoCachedSurface* bottom_right = theme_provider->GetSurfaceNamed( | 751 GdkPixbuf* bottom_right = |
751 IDR_CONTENT_BOTTOM_RIGHT_CORNER, window->content_vbox_); | 752 theme_provider->GetPixbufNamed(IDR_CONTENT_BOTTOM_RIGHT_CORNER); |
752 bottom_right->SetSource(cr, right_x - 1, bottom_y - 1); | 753 gdk_cairo_set_source_pixbuf(cr, bottom_right, |
| 754 right_x - 1, bottom_y - 1); |
753 cairo_paint(cr); | 755 cairo_paint(cr); |
754 | 756 |
755 // Finally, draw the bottom row. Since we don't overlap the contents, we clip | 757 // Finally, draw the bottom row. Since we don't overlap the contents, we clip |
756 // the top row of pixels. | 758 // the top row of pixels. |
757 CairoCachedSurface* bottom = theme_provider->GetSurfaceNamed( | 759 GdkPixbuf* bottom = |
758 IDR_CONTENT_BOTTOM_CENTER, window->content_vbox_); | 760 theme_provider->GetPixbufNamed(IDR_CONTENT_BOTTOM_CENTER); |
759 bottom->SetSource(cr, left_x + 1, bottom_y - 1); | 761 gdk_cairo_set_source_pixbuf(cr, bottom, |
| 762 left_x + 1, bottom_y - 1); |
760 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); | 763 cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT); |
761 cairo_rectangle(cr, | 764 cairo_rectangle(cr, |
762 left_x + 1, | 765 left_x + 1, |
763 bottom_y, | 766 bottom_y, |
764 width - 2, | 767 width - 2, |
765 kContentShadowThickness); | 768 kContentShadowThickness); |
766 cairo_fill(cr); | 769 cairo_fill(cr); |
767 } | 770 } |
768 | 771 |
769 void BrowserWindowGtk::Show() { | 772 void BrowserWindowGtk::Show() { |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2153 // special-case the ones where the custom frame should be used. These names | 2156 // special-case the ones where the custom frame should be used. These names |
2154 // are taken from the WMs' source code. | 2157 // are taken from the WMs' source code. |
2155 return (wm_name == "Blackbox" || | 2158 return (wm_name == "Blackbox" || |
2156 wm_name == "compiz" || | 2159 wm_name == "compiz" || |
2157 wm_name == "e16" || // Enlightenment DR16 | 2160 wm_name == "e16" || // Enlightenment DR16 |
2158 wm_name == "KWin" || | 2161 wm_name == "KWin" || |
2159 wm_name == "Metacity" || | 2162 wm_name == "Metacity" || |
2160 wm_name == "Openbox" || | 2163 wm_name == "Openbox" || |
2161 wm_name == "Xfwm4"); | 2164 wm_name == "Xfwm4"); |
2162 } | 2165 } |
OLD | NEW |