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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2769773004: X11: Fix task manager able to resize to 1x1px (Closed)
Patch Set: Use read-modify-write Created 3 years, 9 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
« no previous file with comments | « no previous file | 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) 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/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 show_state != ui::SHOW_STATE_NORMAL && 1905 show_state != ui::SHOW_STATE_NORMAL &&
1906 show_state != ui::SHOW_STATE_INACTIVE && 1906 show_state != ui::SHOW_STATE_INACTIVE &&
1907 show_state != ui::SHOW_STATE_MAXIMIZED) { 1907 show_state != ui::SHOW_STATE_MAXIMIZED) {
1908 // It will behave like SHOW_STATE_NORMAL. 1908 // It will behave like SHOW_STATE_NORMAL.
1909 NOTIMPLEMENTED(); 1909 NOTIMPLEMENTED();
1910 } 1910 }
1911 1911
1912 // Before we map the window, set size hints. Otherwise, some window managers 1912 // Before we map the window, set size hints. Otherwise, some window managers
1913 // will ignore toplevel XMoveWindow commands. 1913 // will ignore toplevel XMoveWindow commands.
1914 XSizeHints size_hints; 1914 XSizeHints size_hints;
1915 size_hints.flags = PPosition; 1915 size_hints.flags = 0;
1916 long supplied_return;
1917 XGetWMNormalHints(xdisplay_, xwindow_, &size_hints, &supplied_return);
1918 size_hints.flags |= PPosition;
1916 size_hints.x = bounds_in_pixels_.x(); 1919 size_hints.x = bounds_in_pixels_.x();
1917 size_hints.y = bounds_in_pixels_.y(); 1920 size_hints.y = bounds_in_pixels_.y();
1918 XSetWMNormalHints(xdisplay_, xwindow_, &size_hints); 1921 XSetWMNormalHints(xdisplay_, xwindow_, &size_hints);
1919 1922
1920 // If SHOW_STATE_INACTIVE, tell the window manager not to focus the window 1923 // If SHOW_STATE_INACTIVE, tell the window manager not to focus the window
1921 // when mapping. This is done by setting the _NET_WM_USER_TIME to 0. See e.g. 1924 // when mapping. This is done by setting the _NET_WM_USER_TIME to 0. See e.g.
1922 // http://standards.freedesktop.org/wm-spec/latest/ar01s05.html 1925 // http://standards.freedesktop.org/wm-spec/latest/ar01s05.html
1923 ignore_keyboard_input_ = show_state == ui::SHOW_STATE_INACTIVE; 1926 ignore_keyboard_input_ = show_state == ui::SHOW_STATE_INACTIVE;
1924 unsigned long wm_user_time_ms = 1927 unsigned long wm_user_time_ms =
1925 ignore_keyboard_input_ 1928 ignore_keyboard_input_
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2351 2354
2352 // static 2355 // static
2353 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 2356 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
2354 internal::NativeWidgetDelegate* native_widget_delegate, 2357 internal::NativeWidgetDelegate* native_widget_delegate,
2355 DesktopNativeWidgetAura* desktop_native_widget_aura) { 2358 DesktopNativeWidgetAura* desktop_native_widget_aura) {
2356 return new DesktopWindowTreeHostX11(native_widget_delegate, 2359 return new DesktopWindowTreeHostX11(native_widget_delegate,
2357 desktop_native_widget_aura); 2360 desktop_native_widget_aura);
2358 } 2361 }
2359 2362
2360 } // namespace views 2363 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698