mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-25 11:50:17 +01:00
desktop-shell: add option to not use locking
Add an option to the desktop-shell ini file that defines whether screen locking is used or not. Useful for testing screensaver interactions without a lock surface. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
28a20707a2
commit
fd83b6d70f
2 changed files with 8 additions and 0 deletions
|
|
@ -96,10 +96,12 @@ static uint32_t key_panel_color;
|
||||||
static char *key_launcher_icon;
|
static char *key_launcher_icon;
|
||||||
static char *key_launcher_path;
|
static char *key_launcher_path;
|
||||||
static void launcher_section_done(void *data);
|
static void launcher_section_done(void *data);
|
||||||
|
static int key_locking = 1;
|
||||||
|
|
||||||
static const struct config_key shell_config_keys[] = {
|
static const struct config_key shell_config_keys[] = {
|
||||||
{ "background-image", CONFIG_KEY_STRING, &key_background_image },
|
{ "background-image", CONFIG_KEY_STRING, &key_background_image },
|
||||||
{ "panel-color", CONFIG_KEY_INTEGER, &key_panel_color },
|
{ "panel-color", CONFIG_KEY_INTEGER, &key_panel_color },
|
||||||
|
{ "locking", CONFIG_KEY_BOOLEAN, &key_locking },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct config_key launcher_config_keys[] = {
|
static const struct config_key launcher_config_keys[] = {
|
||||||
|
|
@ -513,6 +515,11 @@ desktop_shell_prepare_lock_surface(void *data,
|
||||||
{
|
{
|
||||||
struct desktop *desktop = data;
|
struct desktop *desktop = data;
|
||||||
|
|
||||||
|
if (!key_locking) {
|
||||||
|
desktop_shell_unlock(desktop->shell);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!desktop->unlock_dialog) {
|
if (!desktop->unlock_dialog) {
|
||||||
desktop->unlock_dialog = unlock_dialog_create(desktop);
|
desktop->unlock_dialog = unlock_dialog_create(desktop);
|
||||||
desktop->unlock_dialog->desktop = desktop;
|
desktop->unlock_dialog->desktop = desktop;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
[wayland-desktop-shell]
|
[wayland-desktop-shell]
|
||||||
background-image=/usr/share/backgrounds/gnome/Aqua.jpg
|
background-image=/usr/share/backgrounds/gnome/Aqua.jpg
|
||||||
panel-color=0x90ff0000
|
panel-color=0x90ff0000
|
||||||
|
locking=true
|
||||||
|
|
||||||
[launcher]
|
[launcher]
|
||||||
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
|
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue