diff options
author | mgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 17:07:55 +0000 |
---|---|---|
committer | mgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-08 17:07:55 +0000 |
commit | 3def6f5f173e65faf0fc765ab98704c2bf39d77b (patch) | |
tree | f03a56305e153474215de99f3aee3a402f61bf40 /ui | |
parent | 851353960f6afa2f64a0a8679fc85801a2c4d453 (diff) | |
download | chromium_src-3def6f5f173e65faf0fc765ab98704c2bf39d77b.zip chromium_src-3def6f5f173e65faf0fc765ab98704c2bf39d77b.tar.gz chromium_src-3def6f5f173e65faf0fc765ab98704c2bf39d77b.tar.bz2 |
On Linux, the App Launcher is now shown in the taskbar.
Widget::InitParams: Added override_show_in_taskbar value to force popup
and bubble windows (including the App Launcher) to appear in the taskbar
when they otherwise would not.
BUG=332007
TEST=Launch App Launcher. It should appear in the Unity launcher.
Review URL: https://codereview.chromium.org/122353003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app_list/views/app_list_view.cc | 3 | ||||
-rw-r--r-- | ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc | 7 | ||||
-rw-r--r-- | ui/views/widget/widget.cc | 6 | ||||
-rw-r--r-- | ui/views/widget/widget.h | 5 |
4 files changed, 16 insertions, 5 deletions
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc index 27b48a6..4101472 100644 --- a/ui/app_list/views/app_list_view.cc +++ b/ui/app_list/views/app_list_view.cc @@ -329,6 +329,9 @@ void AppListView::OnBeforeBubbleWidgetInit( // Set up a custom WM_CLASS for the app launcher window. This allows task // switchers in X11 environments to distinguish it from main browser windows. params->wm_class_name = kAppListWMClass; + // Show the window in the taskbar, even though it is a bubble, which would not + // normally be shown. + params->force_show_in_taskbar = true; #endif } diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc index 52203d1..6128940 100644 --- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc @@ -1016,9 +1016,10 @@ void DesktopWindowTreeHostX11::InitX11Window( // List of window state properties (_NET_WM_STATE) to set, if any. std::vector< ::Atom> state_atom_list; - // Remove popup windows from taskbar. - if (params.type == Widget::InitParams::TYPE_POPUP || - params.type == Widget::InitParams::TYPE_BUBBLE) { + // Remove popup windows from taskbar unless overridden. + if ((params.type == Widget::InitParams::TYPE_POPUP || + params.type == Widget::InitParams::TYPE_BUBBLE) && + !params.force_show_in_taskbar) { state_atom_list.push_back( atom_cache_.GetAtom("_NET_WM_STATE_SKIP_TASKBAR")); } diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc index 179ccc6..c250961 100644 --- a/ui/views/widget/widget.cc +++ b/ui/views/widget/widget.cc @@ -128,7 +128,8 @@ Widget::InitParams::InitParams() desktop_root_window_host(NULL), top_level(false), layer_type(ui::LAYER_TEXTURED), - context(NULL) { + context(NULL), + force_show_in_taskbar(false) { } Widget::InitParams::InitParams(Type type) @@ -152,7 +153,8 @@ Widget::InitParams::InitParams(Type type) desktop_root_window_host(NULL), top_level(false), layer_type(ui::LAYER_TEXTURED), - context(NULL) { + context(NULL), + force_show_in_taskbar(false) { } Widget::InitParams::~InitParams() { diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h index cdcf573..a2d267e 100644 --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h @@ -225,6 +225,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // where it wants your window placed.) NULL is not allowed if you are using // aura. gfx::NativeView context; + // If true, forces the window to be shown in the taskbar, even for window + // types that do not appear in the taskbar by default (popup and bubble). + // Currently only used by X11. + // TODO(mgiuca): Respect this flag in Windows (http://crbug.com/332277). + bool force_show_in_taskbar; // Only used by X11, for root level windows. Specifies the res_name and // res_class fields, respectively, of the WM_CLASS window property. Controls // window grouping and desktop file matching in Linux window managers. |