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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2158653002: Linux UI: Add IsVisibleOnAllWorkspaces() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more mac impls Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 2bb3b4bcd7a704e48796f7a5cd5b57d731efe1ee..4296fc11036e5e409b7bfcb4a44daeb3810b2962 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -715,6 +715,7 @@ void DesktopWindowTreeHostX11::SetVisibleOnAllWorkspaces(bool always_visible) {
return;
}
+ workspace_ = base::IntToString(kAllDesktops);
XEvent xevent;
memset (&xevent, 0, sizeof (xevent));
xevent.type = ClientMessage;
@@ -731,6 +732,14 @@ void DesktopWindowTreeHostX11::SetVisibleOnAllWorkspaces(bool always_visible) {
&xevent);
}
+bool DesktopWindowTreeHostX11::IsVisibleOnAllWorkspaces() const {
+ // We don't need a check for _NET_WM_STATE_STICKY because that would specify
+ // that the window remain in a fixed position even if the viewport scrolls.
+ // This is different from the type of workspace that's associated with
+ // _NET_WM_DESKTOP.
+ return GetWorkspace() == base::IntToString(kAllDesktops);
+}
+
bool DesktopWindowTreeHostX11::SetWindowTitle(const base::string16& title) {
if (window_title_ == title)
return false;
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698