Actual result pointer was being set to the window struct and then
immediately freed causing unpredictable results.
struct quirk *qp;
uint32_t event_mask, i;
xcb_icccm_get_wm_protocols_reply_t wpr;
struct quirk *qp;
uint32_t event_mask, i;
xcb_icccm_get_wm_protocols_reply_t wpr;
- xcb_icccm_get_wm_class_reply_t tmpch;
if ((win = find_window(id)) != NULL)
return (win); /* already being managed */
if ((win = find_window(id)) != NULL)
return (win); /* already being managed */
if (xcb_icccm_get_wm_class_reply(conn,
xcb_icccm_get_wm_class(conn, win->id),
if (xcb_icccm_get_wm_class_reply(conn,
xcb_icccm_get_wm_class(conn, win->id),
- &tmpch, NULL)) {
- win->ch.class_name = tmpch.class_name;
- win->ch.instance_name = tmpch.instance_name;
-
- xcb_icccm_get_wm_class_reply_wipe(&tmpch);
-
DNPRINTF(SWM_D_CLASS, "manage_window: class: %s, name: %s\n",
win->ch.class_name, win->ch.instance_name);
DNPRINTF(SWM_D_CLASS, "manage_window: class: %s, name: %s\n",
win->ch.class_name, win->ch.instance_name);
if (win->wa)
free(win->wa);
if (win->wa)
free(win->wa);
+ xcb_icccm_get_wm_class_reply_wipe(&win->ch);
+
kill_refs(win);
/* paint memory */
kill_refs(win);
/* paint memory */
void
leavenotify(xcb_leave_notify_event_t *e)
{
void
leavenotify(xcb_leave_notify_event_t *e)
{
DNPRINTF(SWM_D_FOCUS, "leavenotify: window: 0x%x, mode: %s(%d), "
"detail: %s(%d), root: 0x%x, subwindow: 0x%x, same_screen_focus: "
"%s, state: %d\n", e->event, get_notify_mode_label(e->mode),
DNPRINTF(SWM_D_FOCUS, "leavenotify: window: 0x%x, mode: %s(%d), "
"detail: %s(%d), root: 0x%x, subwindow: 0x%x, same_screen_focus: "
"%s, state: %d\n", e->event, get_notify_mode_label(e->mode),