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

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

Issue 1927203003: Add support for X11 workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted ui/views/widget/desktop_aura/x11_desktop_handler.cc Created 4 years, 8 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
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 effa86484cfe77eed5aa00794ace06f8a866a8a6..d54f7b5cd74cb1566acd2efb18f03abd40b74209 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
@@ -1226,6 +1226,9 @@ void DesktopWindowTreeHostX11::InitX11Window(
if (params.visible_on_all_workspaces) {
state_atom_list.push_back(atom_cache_.GetAtom("_NET_WM_STATE_STICKY"));
ui::SetIntProperty(xwindow_, "_NET_WM_DESKTOP", "CARDINAL", kAllDesktops);
+ } else if (params.workspace != -1) {
+ ui::SetIntProperty(xwindow_, "_NET_WM_DESKTOP", "CARDINAL",
+ params.workspace);
}
// Setting _NET_WM_STATE by sending a message to the root_window (with
@@ -1994,6 +1997,11 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
OnWMStateUpdated();
else if (changed_atom == atom_cache_.GetAtom("_NET_FRAME_EXTENTS"))
OnFrameExtentsUpdated();
+ else if (changed_atom == atom_cache_.GetAtom("_NET_WM_DESKTOP")) {
sky 2016/04/29 17:05:45 when you add {} to one branch, then add {} to all
Tom (Use chromium acct) 2016/04/29 19:14:04 Done.
+ int workspace_id;
+ if (ui::GetIntProperty(xwindow_, "_NET_WM_DESKTOP", &workspace_id))
+ OnHostWorkspaceChanged(workspace_id);
+ }
break;
}
case SelectionNotify: {

Powered by Google App Engine
This is Rietveld 408576698