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

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

Issue 8774029: Delete desktop/shell instance correctly when chrome is shutting down (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: close windows before observers are destroyed. Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/desktop_host.h" 5 #include "ui/aura/desktop_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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 xevent.xmotion.x_root = point.x(); 585 xevent.xmotion.x_root = point.x();
586 xevent.xmotion.y_root = point.y(); 586 xevent.xmotion.y_root = point.y();
587 } 587 }
588 default: 588 default:
589 break; 589 break;
590 } 590 }
591 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); 591 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent);
592 } 592 }
593 593
594 void DesktopHostLinux::WillDestroyCurrentMessageLoop() { 594 void DesktopHostLinux::WillDestroyCurrentMessageLoop() {
595 desktop_->DeleteInstance(); 595 aura::Desktop::DeleteInstance();
596 } 596 }
597 597
598 bool DesktopHostLinux::IsWindowManagerPresent() { 598 bool DesktopHostLinux::IsWindowManagerPresent() {
599 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership 599 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership
600 // of WM_Sn selections (where n is a screen number). 600 // of WM_Sn selections (where n is a screen number).
601 ::Atom wm_s0_atom = XInternAtom(xdisplay_, "WM_S0", False); 601 ::Atom wm_s0_atom = XInternAtom(xdisplay_, "WM_S0", False);
602 return XGetSelectionOwner(xdisplay_, wm_s0_atom) != None; 602 return XGetSelectionOwner(xdisplay_, wm_s0_atom) != None;
603 } 603 }
604 604
605 } // namespace 605 } // namespace
606 606
607 // static 607 // static
608 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { 608 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) {
609 return new DesktopHostLinux(bounds); 609 return new DesktopHostLinux(bounds);
610 } 610 }
611 611
612 // static 612 // static
613 gfx::Size DesktopHost::GetNativeScreenSize() { 613 gfx::Size DesktopHost::GetNativeScreenSize() {
614 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); 614 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay();
615 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 615 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
616 } 616 }
617 617
618 } // namespace aura 618 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_extra_parts_aura.cc ('k') | ui/aura_shell/shelf_layout_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698