1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-29 18:33:33 +02:00

WPrefs: add hotplug monitor option in expert panel

This patch is adding a new HotplugMonitor option
to automatically (de)activate monitors on randr hotplug events.
It is disabled by default.
This commit is contained in:
David Maciejak
2026-03-27 18:48:25 -04:00
committed by Carlos R. Mafra
parent 4b4abf4c50
commit 8e84264036
3 changed files with 12 additions and 1 deletions

View File

@@ -132,6 +132,11 @@ static struct expert_option {
{ N_("Allow windows to take focus using mouse wheel."),
/* default: */ False, OPTION_WMAKER, "MouseWheelFocus"},
#ifdef USE_RANDR
{ N_("Automatically (de)activate monitors on hotplug events."),
/* default: */ False, OPTION_WMAKER, "HotplugMonitor"},
#endif
};

View File

@@ -410,6 +410,9 @@ extern struct WPreferences {
char dont_blink; /* do not blink icon selection */
char keep_dock_on_primary_head; /* keep dock on primary head */
#ifdef USE_RANDR
char hotplug_monitor; /* auto-(de)activate monitors */
#endif
/* Appearance options */
char new_style; /* Use newstyle buttons */

View File

@@ -5,7 +5,6 @@
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2014-2026 Window Maker Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -527,6 +526,10 @@ WDefaultEntry optionList[] = {
{"KeepDockOnPrimaryHead", "NO", NULL,
&wPreferences.keep_dock_on_primary_head, getBool, updateDock,
NULL, NULL},
#ifdef USE_RANDR
{"HotplugMonitor", "NO", NULL,
&wPreferences.hotplug_monitor, getBool, NULL, NULL, NULL},
#endif
{"HotCorners", "NO", NULL,
&wPreferences.hot_corners, getBool, NULL, NULL, NULL},
{"HotCornerDelay", "250", (void *)&wPreferences.hot_corner_delay,