Commit b1fdcfd3 authored by Nick Diego Yamane's avatar Nick Diego Yamane Committed by Commit Bot

ozone/x11: Add missing platform window init properties

This CL adds some properties that were missing at PlatformWindow level as well
as code to convert Widget::InitParams into PlatformWindowInitProperties in
DWTHPlatform.

Bug: 789065
Change-Id: Ie224c3ae3434afce0ecdd6d4b044ca9f75f29aca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1718456
Commit-Queue: Nick Yamane <nickdiego@igalia.com>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681403}
parent 146026c9
...@@ -96,7 +96,7 @@ XWindow::Configuration::Configuration() ...@@ -96,7 +96,7 @@ XWindow::Configuration::Configuration()
force_show_in_taskbar(false), force_show_in_taskbar(false),
keep_on_top(false), keep_on_top(false),
visible_on_all_workspaces(false), visible_on_all_workspaces(false),
remove_standard_frame(false), remove_standard_frame(true),
prefer_dark_theme(false) {} prefer_dark_theme(false) {}
XWindow::Configuration::Configuration(const Configuration&) = default; XWindow::Configuration::Configuration(const Configuration&) = default;
......
...@@ -67,15 +67,14 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( ...@@ -67,15 +67,14 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig(
config.activatable = properties.activatable; config.activatable = properties.activatable;
#endif #endif
// TODO(nickdiego): Add missing platform window init properties config.force_show_in_taskbar = properties.force_show_in_taskbar;
// config.force_show_in_taskbar = properties.force_show_in_taskbar; config.keep_on_top = properties.keep_on_top;
// config.keep_on_top = properties.keep_on_top; config.visible_on_all_workspaces = properties.visible_on_all_workspaces;
// config.visible_on_all_workspaces = properties.visible_on_all_workspaces; config.remove_standard_frame = properties.remove_standard_frame;
// config.remove_standard_frame = properties.remove_standard_frame; config.workspace = properties.workspace;
// config.workspace = properties.workspace; config.wm_class_name = properties.wm_class_name;
// config.wm_class_name = properties.wm_class_name; config.wm_class_class = properties.wm_class_class;
// config.wm_class_class = properties.wm_class_class; config.wm_role_name = properties.wm_role_name;
// config.wm_role_name = properties.wm_role_name;
return config; return config;
} }
......
...@@ -58,6 +58,18 @@ struct PlatformWindowInitProperties { ...@@ -58,6 +58,18 @@ struct PlatformWindowInitProperties {
#endif #endif
bool activatable = false; bool activatable = false;
bool force_show_in_taskbar;
bool keep_on_top = false;
bool visible_on_all_workspaces = false;
bool remove_standard_frame = false;
std::string workspace;
// Only used by X11. 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.
std::string wm_role_name;
std::string wm_class_name;
std::string wm_class_class;
}; };
} // namespace ui } // namespace ui
......
...@@ -52,6 +52,15 @@ ui::PlatformWindowInitProperties ConvertWidgetInitParamsToInitProperties( ...@@ -52,6 +52,15 @@ ui::PlatformWindowInitProperties ConvertWidgetInitParamsToInitProperties(
properties.bounds = params.bounds; properties.bounds = params.bounds;
properties.activatable = properties.activatable =
params.activatable == Widget::InitParams::ACTIVATABLE_YES; params.activatable == Widget::InitParams::ACTIVATABLE_YES;
properties.force_show_in_taskbar = params.force_show_in_taskbar;
properties.keep_on_top =
params.EffectiveZOrderLevel() != ui::ZOrderLevel::kNormal;
properties.visible_on_all_workspaces = params.visible_on_all_workspaces;
properties.remove_standard_frame = params.remove_standard_frame;
properties.workspace = params.workspace;
properties.wm_class_name = params.wm_class_name;
properties.wm_class_class = params.wm_class_class;
properties.wm_role_name = params.wm_role_name;
if (params.parent && params.parent->GetHost()) if (params.parent && params.parent->GetHost())
properties.parent_widget = params.parent->GetHost()->GetAcceleratedWidget(); properties.parent_widget = params.parent->GetHost()->GetAcceleratedWidget();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment