mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-02 02:38:08 +02:00
desktop-shell: support disallow-output-changed-move
With this, when unplugging an extended display, the view displayed on the extended display won't be re-positioned to other displays. On some embedded devices, the views are often fullscreen displayed, even on the extended displays. When disconnecting the extended displays, the views are not desired to be moved onto the existing displays. Without this change, we can see the view flash across the existing displays even though the UI program hides the view as soon as it can, which is unexpected. Signed-off-by: Paul Pu <hui.pu@gehealthcare.com>
This commit is contained in:
parent
89f77176b6
commit
ddb6225338
3 changed files with 15 additions and 2 deletions
|
|
@ -524,6 +524,7 @@ shell_configuration(struct desktop_shell *shell)
|
|||
struct weston_config *config;
|
||||
char *s, *client;
|
||||
bool allow_zap;
|
||||
bool disallow_output_changed_move;
|
||||
|
||||
config = wet_get_config(shell->compositor);
|
||||
section = weston_config_get_section(config, "shell", NULL, NULL);
|
||||
|
|
@ -536,6 +537,11 @@ shell_configuration(struct desktop_shell *shell)
|
|||
"allow-zap", &allow_zap, true);
|
||||
shell->allow_zap = allow_zap;
|
||||
|
||||
weston_config_section_get_bool(section,
|
||||
"disallow-output-changed-move",
|
||||
&disallow_output_changed_move, false);
|
||||
shell->disallow_output_changed_move = disallow_output_changed_move;
|
||||
|
||||
shell->binding_modifier = weston_config_get_binding_modifier(config, MODIFIER_SUPER);
|
||||
|
||||
weston_config_section_get_string(section, "animation", &s, "none");
|
||||
|
|
@ -4568,7 +4574,9 @@ shell_output_destroy(struct shell_output *shell_output)
|
|||
{
|
||||
struct desktop_shell *shell = shell_output->shell;
|
||||
|
||||
shell_for_each_layer(shell, shell_output_changed_move_layer, NULL);
|
||||
if (!shell->disallow_output_changed_move) {
|
||||
shell_for_each_layer(shell, shell_output_changed_move_layer, NULL);
|
||||
}
|
||||
|
||||
if (shell_output->panel_surface) {
|
||||
wl_list_remove(&shell_output->panel_surface_listener.link);
|
||||
|
|
@ -4674,7 +4682,7 @@ create_shell_output(struct desktop_shell *shell,
|
|||
&shell_output->destroy_listener);
|
||||
wl_list_insert(shell->output_list.prev, &shell_output->link);
|
||||
|
||||
if (wl_list_length(&shell->output_list) == 1)
|
||||
if (!shell->disallow_output_changed_move && wl_list_length(&shell->output_list) == 1)
|
||||
shell_for_each_layer(shell,
|
||||
shell_output_changed_move_layer, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ struct desktop_shell {
|
|||
} fade;
|
||||
|
||||
bool allow_zap;
|
||||
bool disallow_output_changed_move;
|
||||
uint32_t binding_modifier;
|
||||
enum animation_type win_animation_type;
|
||||
enum animation_type win_close_animation_type;
|
||||
|
|
|
|||
|
|
@ -467,6 +467,10 @@ By default, no animation is used.
|
|||
whether the shell should quit when the Ctrl-Alt-Backspace key combination is
|
||||
pressed
|
||||
.TP 7
|
||||
.BI "disallow-output-changed-move=" false
|
||||
whether the shell should move client's window to a different/another output than the one
|
||||
assigned initially and is no longer available/enabled/plugged in.
|
||||
.TP 7
|
||||
.BI "binding-modifier=" ctrl
|
||||
sets the modifier key used for common bindings (string), such as moving
|
||||
surfaces, resizing, rotating, switching, closing and setting the transparency
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue