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

Side by Side Diff: views/window/window_gtk.cc

Issue 340077: Gets find bar animation/clipping to work on views/gtk. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | Annotate | Revision Log
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 "views/window/window_gtk.h" 5 #include "views/window/window_gtk.h"
6 6
7 #include "app/gfx/path.h" 7 #include "app/gfx/path.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/gfx/rect.h" 9 #include "base/gfx/rect.h"
10 #include "views/event.h" 10 #include "views/event.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 319 }
320 320
321 void WindowGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { 321 void WindowGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) {
322 WidgetGtk::OnSizeAllocate(widget, allocation); 322 WidgetGtk::OnSizeAllocate(widget, allocation);
323 323
324 // The Window's NonClientView may provide a custom shape for the Window. 324 // The Window's NonClientView may provide a custom shape for the Window.
325 gfx::Path window_mask; 325 gfx::Path window_mask;
326 non_client_view_->GetWindowMask(gfx::Size(allocation->width, 326 non_client_view_->GetWindowMask(gfx::Size(allocation->width,
327 allocation->height), 327 allocation->height),
328 &window_mask); 328 &window_mask);
329 GdkRegion* mask_region = window_mask.CreateGdkRegion(); 329 GdkRegion* mask_region = window_mask.CreateNativeRegion();
330 gdk_window_shape_combine_region(GetNativeView()->window, mask_region, 0, 0); 330 gdk_window_shape_combine_region(GetNativeView()->window, mask_region, 0, 0);
331 if (mask_region) 331 if (mask_region)
332 gdk_region_destroy(mask_region); 332 gdk_region_destroy(mask_region);
333 333
334 SaveWindowPosition(); 334 SaveWindowPosition();
335 } 335 }
336 336
337 gboolean WindowGtk::OnWindowStateEvent(GtkWidget* widget, 337 gboolean WindowGtk::OnWindowStateEvent(GtkWidget* widget,
338 GdkEventWindowState* event) { 338 GdkEventWindowState* event) {
339 window_state_ = event->new_window_state; 339 window_state_ = event->new_window_state;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 size.width(), size.height()); 460 size.width(), size.height());
461 SetBounds(bounds, NULL); 461 SetBounds(bounds, NULL);
462 } 462 }
463 463
464 void WindowGtk::OnDestroy() { 464 void WindowGtk::OnDestroy() {
465 non_client_view_->WindowClosing(); 465 non_client_view_->WindowClosing();
466 WidgetGtk::OnDestroy(); 466 WidgetGtk::OnDestroy();
467 } 467 }
468 468
469 } // namespace views 469 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698