Fix lua stack pops in one of error branches

Remove some code added by accident; reduce change list.
Fix mouse_enter and mouse_leave events.

Signed-off-by: Tin <tin.svagelj@live.com>
This commit is contained in:
Tin 2023-11-07 23:06:34 +01:00 committed by Brenden Matthews
parent 189d243623
commit 8195533bb3
No known key found for this signature in database
GPG Key ID: 137B7AC2BDFD8DF0
3 changed files with 5 additions and 4 deletions

View File

@ -157,7 +157,7 @@ const char builtin_config_magic[] = "==builtin==";
#undef SIGNAL_BLOCKING
/* debugging level, used by logging.h */
int global_debug_level = 2;
int global_debug_level = 0;
/* disable inotify auto reload feature if desired */
static conky::simple_config_setting<bool> disable_auto_reload(

View File

@ -451,6 +451,7 @@ static void on_pointer_enter(void *data, wl_pointer *pointer, uint32_t serial,
abs_x,
abs_y
};
llua_mouse_hook(event);
}
static void on_pointer_leave(void *data,
@ -472,6 +473,7 @@ static void on_pointer_leave(void *data,
abs_x,
abs_y
};
llua_mouse_hook(event);
}
static void on_pointer_motion(void *data,
@ -628,7 +630,6 @@ bool display_output_wayland::initialize() {
wl_seat_add_listener(wl_globals.seat, &listener, global_window);
#endif /* BUILD_MOUSE_EVENTS */
wl_surface_set_buffer_scale(global_window->surface, global_window->scale);
wl_surface_commit(global_window->surface);
wl_display_roundtrip(global_display);
wayland_create_window();
@ -1262,7 +1263,7 @@ struct window *window_create(struct wl_surface *surface, struct wl_shm *shm,
window->rectangle.y = 0;
window->rectangle.width = width;
window->rectangle.height = height;
window->scale = 1;
window->scale = 0;
window->pending_scale = 1;
window->surface = surface;

View File

@ -531,7 +531,7 @@ bool llua_mouse_hook(const EventT &ev) {
lua_pop(lua_L, 1);
} else {
NORM_ERR("llua_mouse_hook: hook %s is not defined", hook_name.c_str());
lua_pop(lua_L, 1);
lua_pop(lua_L, 2);
return false;
}
} else if (ty != LUA_TFUNCTION) {