doc(keyboard): add deprecated warning
This commit is contained in:
		
							parent
							
								
									58a399b9af
								
							
						
					
					
						commit
						5944989a8a
					
				|  | @ -13,6 +13,7 @@ You must be a member of the input group to use this module. | ||||||
| # CONFIGURATION | # CONFIGURATION | ||||||
| 
 | 
 | ||||||
| *interval*: ++ | *interval*: ++ | ||||||
|  | 	Deprecated, this module use event loop now, the interval has no effect. | ||||||
| 	typeof: integer ++ | 	typeof: integer ++ | ||||||
| 	default: 1 ++ | 	default: 1 ++ | ||||||
| 	The interval, in seconds, to poll the keyboard state. | 	The interval, in seconds, to poll the keyboard state. | ||||||
|  |  | ||||||
|  | @ -110,6 +110,10 @@ waybar::modules::KeyboardState::KeyboardState(const std::string& id, const Bar& | ||||||
|   static struct libinput_interface interface = { |   static struct libinput_interface interface = { | ||||||
|       [](const char* path, int flags, void* user_data) { return open(path, flags); }, |       [](const char* path, int flags, void* user_data) { return open(path, flags); }, | ||||||
|       [](int fd, void* user_data) { close(fd); }}; |       [](int fd, void* user_data) { close(fd); }}; | ||||||
|  |   if (config_["interval"].isUInt()) { | ||||||
|  |     spdlog::warn("keyboard-state: interval is deprecated"); | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   libinput_ = libinput_path_create_context(&interface, NULL); |   libinput_ = libinput_path_create_context(&interface, NULL); | ||||||
| 
 | 
 | ||||||
|   box_.set_name("keyboard-state"); |   box_.set_name("keyboard-state"); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue