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

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

Issue 8387043: [Aura] Support always-on-top top level window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and address oshima's comments in patch 6 Created 9 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) 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 PointerMotionMask; 278 PointerMotionMask;
279 XSelectInput(xdisplay_, xwindow_, event_mask); 279 XSelectInput(xdisplay_, xwindow_, event_mask);
280 XFlush(xdisplay_); 280 XFlush(xdisplay_);
281 281
282 if (base::MessagePumpForUI::HasXInput2()) 282 if (base::MessagePumpForUI::HasXInput2())
283 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); 283 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_);
284 } 284 }
285 285
286 DesktopHostLinux::~DesktopHostLinux() { 286 DesktopHostLinux::~DesktopHostLinux() {
287 XDestroyWindow(xdisplay_, xwindow_); 287 XDestroyWindow(xdisplay_, xwindow_);
288
289 // Clears XCursorCache.
290 ui::GetXCursor(ui::kCursorClearXCursorCache);
288 } 291 }
289 292
290 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( 293 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch(
291 XEvent* xev) { 294 XEvent* xev) {
292 bool handled = false; 295 bool handled = false;
293 switch (xev->type) { 296 switch (xev->type) {
294 case Expose: 297 case Expose:
295 desktop_->Draw(); 298 desktop_->Draw();
296 handled = true; 299 handled = true;
297 break; 300 break;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 return new DesktopHostLinux(bounds); 491 return new DesktopHostLinux(bounds);
489 } 492 }
490 493
491 // static 494 // static
492 gfx::Size DesktopHost::GetNativeDisplaySize() { 495 gfx::Size DesktopHost::GetNativeDisplaySize() {
493 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); 496 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay();
494 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 497 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
495 } 498 }
496 499
497 } // namespace aura 500 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698