不记录鼠标移动事件信息(触发太频繁)

This commit is contained in:
2025-08-25 12:03:43 +08:00
parent 3dd2f80128
commit a46522da3b
2 changed files with 3 additions and 5 deletions

View File

@@ -572,10 +572,6 @@ void expose(expose_event_t *event) {
} }
void motion_notify(motion_notify_event_t *event) { void motion_notify(motion_notify_event_t *event) {
logger("motion: window: 0x%x, root: 0x%x\n", event->window, event->root);
logger("x: %d, y: %d, root_x: %d, root_y: %d\n", event->x, event->y,
event->root_x, event->root_y);
logger("root window: 0x%x\n", get_root_window());
if (event->window != get_root_window()) return; if (event->window != get_root_window()) return;
static monitor_t *mon = NULL; static monitor_t *mon = NULL;

View File

@@ -18,7 +18,6 @@ static void convert_event(xcb_generic_event_t *xcb_event,
generic_event_t *event) { generic_event_t *event) {
uint8_t event_type = XCB_EVENT_RESPONSE_TYPE(xcb_event); uint8_t event_type = XCB_EVENT_RESPONSE_TYPE(xcb_event);
const char *label = xcb_event_get_label(event_type); const char *label = xcb_event_get_label(event_type);
logger("=========================== %s ===========================\n", label);
switch (event_type) { switch (event_type) {
case XCB_MAPPING_NOTIFY: case XCB_MAPPING_NOTIFY:
event->type = EVENT_TYPE_MAPPING_NOTIFY; event->type = EVENT_TYPE_MAPPING_NOTIFY;
@@ -120,6 +119,9 @@ static void convert_event(xcb_generic_event_t *xcb_event,
event->type = -1; event->type = -1;
return; return;
} }
if (event->type != EVENT_TYPE_MOTION_NOTIFY) {
logger("========================== %s ==========================\n", label);
}
} }
event_adapter_t *create_event_adapter(void) { event_adapter_t *create_event_adapter(void) {