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

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

Issue 661237: This adds in the ability for Chrome to generate windows with snapshots of all... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 | « gfx/skbitmap_operations.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkx.h> 8 #include <gdk/gdkx.h>
9 #include <X11/extensions/shape.h> 9 #include <X11/extensions/shape.h>
10 10
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 // ignoring the 2press/3press events as they are duplicate. To make this 1103 // ignoring the 2press/3press events as they are duplicate. To make this
1104 // work right we need to write our own code that detects if the press is a 1104 // work right we need to write our own code that detects if the press is a
1105 // double/triple. For now we're completely punting, which means we always 1105 // double/triple. For now we're completely punting, which means we always
1106 // get single clicks. 1106 // get single clicks.
1107 // TODO: fix this. 1107 // TODO: fix this.
1108 return true; 1108 return true;
1109 } 1109 }
1110 1110
1111 // An event may come from a contained widget which has its own gdk window. 1111 // An event may come from a contained widget which has its own gdk window.
1112 // Translate it to the widget's coordinates. 1112 // Translate it to the widget's coordinates.
1113 int x, y; 1113 int x = 0;
1114 int y = 0;
1114 GetContainedWidgetEventCoordinates(event, &x, &y); 1115 GetContainedWidgetEventCoordinates(event, &x, &y);
1115 last_mouse_event_was_move_ = false; 1116 last_mouse_event_was_move_ = false;
1116 MouseEvent mouse_pressed(Event::ET_MOUSE_PRESSED, x, y, 1117 MouseEvent mouse_pressed(Event::ET_MOUSE_PRESSED, x, y,
1117 GetFlagsForEventButton(*event)); 1118 GetFlagsForEventButton(*event));
1118 1119
1119 if (root_view_->OnMousePressed(mouse_pressed)) { 1120 if (root_view_->OnMousePressed(mouse_pressed)) {
1120 is_mouse_down_ = true; 1121 is_mouse_down_ = true;
1121 if (!has_capture_) 1122 if (!has_capture_)
1122 DoGrab(); 1123 DoGrab();
1123 return true; 1124 return true;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 GtkWindow* window = GTK_WINDOW(element->data); 1427 GtkWindow* window = GTK_WINDOW(element->data);
1427 DCHECK(window); 1428 DCHECK(window);
1428 RootView *root_view = FindRootView(window); 1429 RootView *root_view = FindRootView(window);
1429 if (root_view) 1430 if (root_view)
1430 root_view->NotifyLocaleChanged(); 1431 root_view->NotifyLocaleChanged();
1431 } 1432 }
1432 g_list_free(window_list); 1433 g_list_free(window_list);
1433 } 1434 }
1434 1435
1435 } // namespace views 1436 } // namespace views
OLDNEW
« no previous file with comments | « gfx/skbitmap_operations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698