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

Side by Side Diff: views/widget/widget_gtk.cc

Issue 131026: A long standing bug in views!... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | views/widget/widget_win.cc » ('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 "views/widget/widget_gtk.h" 5 #include "views/widget/widget_gtk.h"
6 6
7 #include "app/gfx/path.h" 7 #include "app/gfx/path.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "views/fill_layout.h" 9 #include "views/fill_layout.h"
10 #include "views/widget/default_theme_provider.h" 10 #include "views/widget/default_theme_provider.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 if (transparent_) 429 if (transparent_)
430 ConfigureWidgetForTransparentBackground(); 430 ConfigureWidgetForTransparentBackground();
431 } 431 }
432 // The widget needs to be realized before handlers like size-allocate can 432 // The widget needs to be realized before handlers like size-allocate can
433 // function properly. 433 // function properly.
434 gtk_widget_realize(widget_); 434 gtk_widget_realize(widget_);
435 } 435 }
436 436
437 void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) { 437 void WidgetGtk::OnSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) {
438 root_view_->SetBounds(0, 0, allocation->width, allocation->height); 438 root_view_->SetBounds(0, 0, allocation->width, allocation->height);
439 root_view_->Layout();
440 root_view_->SchedulePaint(); 439 root_view_->SchedulePaint();
441 } 440 }
442 441
443 gboolean WidgetGtk::OnMotionNotify(GtkWidget* widget, GdkEventMotion* event) { 442 gboolean WidgetGtk::OnMotionNotify(GtkWidget* widget, GdkEventMotion* event) {
444 if (has_capture_ && is_mouse_down_) { 443 if (has_capture_ && is_mouse_down_) {
445 last_mouse_event_was_move_ = false; 444 last_mouse_event_was_move_ = false;
446 int flags = Event::GetFlagsFromGdkState(event->state); 445 int flags = Event::GetFlagsFromGdkState(event->state);
447 if (event->state & GDK_BUTTON1_MASK) 446 if (event->state & GDK_BUTTON1_MASK)
448 flags |= Event::EF_LEFT_BUTTON_DOWN; 447 flags |= Event::EF_LEFT_BUTTON_DOWN;
449 if (event->state & GDK_BUTTON2_MASK) 448 if (event->state & GDK_BUTTON2_MASK)
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 void WidgetGtk::HandleGrabBroke() { 810 void WidgetGtk::HandleGrabBroke() {
812 if (has_capture_) { 811 if (has_capture_) {
813 if (is_mouse_down_) 812 if (is_mouse_down_)
814 root_view_->ProcessMouseDragCanceled(); 813 root_view_->ProcessMouseDragCanceled();
815 is_mouse_down_ = false; 814 is_mouse_down_ = false;
816 has_capture_ = false; 815 has_capture_ = false;
817 } 816 }
818 } 817 }
819 818
820 } // namespace views 819 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | views/widget/widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698