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

Side by Side Diff: ui/aura/root_window_host_linux.cc

Issue 9348113: Fix two crash and potential leak&crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/root_window_host.h" 5 #include "ui/aura/root_window_host.h"
6 6
7 #include <X11/cursorfont.h> 7 #include <X11/cursorfont.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 handled = root_window_->DispatchKeyEvent(&keyup_event); 420 handled = root_window_->DispatchKeyEvent(&keyup_event);
421 break; 421 break;
422 } 422 }
423 case ButtonPress: 423 case ButtonPress:
424 case ButtonRelease: { 424 case ButtonRelease: {
425 MouseEvent mouseev(xev); 425 MouseEvent mouseev(xev);
426 handled = root_window_->DispatchMouseEvent(&mouseev); 426 handled = root_window_->DispatchMouseEvent(&mouseev);
427 break; 427 break;
428 } 428 }
429 case FocusOut: 429 case FocusOut:
430 /*
sky 2012/02/15 00:02:04 ?
oshima 2012/02/15 00:18:00 I thought i reverted this file. Sorry about that.
430 if (xev->xfocus.mode != NotifyGrab) 431 if (xev->xfocus.mode != NotifyGrab)
431 root_window_->SetCapture(NULL); 432 root_window_->SetCapture(NULL);
433 */
432 break; 434 break;
433 case ConfigureNotify: { 435 case ConfigureNotify: {
434 if (xev->xconfigure.window == x_root_window_) { 436 if (xev->xconfigure.window == x_root_window_) {
435 root_window_->OnNativeScreenResized( 437 root_window_->OnNativeScreenResized(
436 gfx::Size(xev->xconfigure.width, xev->xconfigure.height)); 438 gfx::Size(xev->xconfigure.width, xev->xconfigure.height));
437 handled = true; 439 handled = true;
438 break; 440 break;
439 } 441 }
440 442
441 DCHECK_EQ(xwindow_, xev->xconfigure.window); 443 DCHECK_EQ(xwindow_, xev->xconfigure.window);
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 return new RootWindowHostLinux(bounds); 724 return new RootWindowHostLinux(bounds);
723 } 725 }
724 726
725 // static 727 // static
726 gfx::Size RootWindowHost::GetNativeScreenSize() { 728 gfx::Size RootWindowHost::GetNativeScreenSize() {
727 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); 729 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay();
728 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 730 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
729 } 731 }
730 732
731 } // namespace aura 733 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698