opt: optimzie code struct

This commit is contained in:
DreamMaoMao 2026-03-14 13:09:41 +08:00
parent 6bee141749
commit dd5b9cf360
2 changed files with 19 additions and 24 deletions

View file

@ -5664,22 +5664,11 @@ void setup(void) {
* cursor images are available at all scale factors on the screen
* (necessary for HiDPI support). Scaled cursors will be loaded with
* each output. */
// cursor_mgr = wlr_xcursor_manager_create(cursor_theme, 24);
set_xcursor_env();
cursor_mgr =
wlr_xcursor_manager_create(config.cursor_theme, config.cursor_size);
if (config.cursor_size > 0) {
char size_str[16];
snprintf(size_str, sizeof(size_str), "%d", config.cursor_size);
setenv("XCURSOR_SIZE", size_str, 1);
} else {
setenv("XCURSOR_SIZE", "24", 1);
}
if (config.cursor_theme) {
setenv("XCURSOR_THEME", config.cursor_theme, 1);
}
/*
* wlr_cursor *only* displays an image on screen. It does not move
* around when the pointer moves. However, we can attach input devices