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

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: support always-on-top change after creation, add unittests and fix XCursorCache issue 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 PointerMotionMask; 277 PointerMotionMask;
278 XSelectInput(xdisplay_, xwindow_, event_mask); 278 XSelectInput(xdisplay_, xwindow_, event_mask);
279 XFlush(xdisplay_); 279 XFlush(xdisplay_);
280 280
281 if (base::MessagePumpForUI::HasXInput2()) 281 if (base::MessagePumpForUI::HasXInput2())
282 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); 282 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_);
283 } 283 }
284 284
285 DesktopHostLinux::~DesktopHostLinux() { 285 DesktopHostLinux::~DesktopHostLinux() {
286 XDestroyWindow(xdisplay_, xwindow_); 286 XDestroyWindow(xdisplay_, xwindow_);
287
288 // Clears XCursorCache.
289 ui::GetXCursor(ui::kCursorClearXCursorCache);
287 } 290 }
288 291
289 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( 292 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch(
290 XEvent* xev) { 293 XEvent* xev) {
291 bool handled = false; 294 bool handled = false;
292 switch (xev->type) { 295 switch (xev->type) {
293 case Expose: 296 case Expose:
294 desktop_->Draw(); 297 desktop_->Draw();
295 handled = true; 298 handled = true;
296 break; 299 break;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 return new DesktopHostLinux(bounds); 486 return new DesktopHostLinux(bounds);
484 } 487 }
485 488
486 // static 489 // static
487 gfx::Size DesktopHost::GetNativeDisplaySize() { 490 gfx::Size DesktopHost::GetNativeDisplaySize() {
488 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); 491 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay();
489 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 492 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
490 } 493 }
491 494
492 } // namespace aura 495 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698