#ifndef USE_GTK
output = FRAME_X_OUTPUT (f);
+ x_update_frame_user_time_window (f);
- if (!x_wm_supports (f, dpyinfo->Xatom_net_wm_user_time_window))
+ /* It's been a while since I wrote that code... I don't
+ remember if it can leave `user_time_window' unset or not. */
+ if (output->user_time_window != None)
{
- if (output->user_time_window == None)
- output->user_time_window = FRAME_OUTER_WINDOW (f);
- else if (output->user_time_window != FRAME_OUTER_WINDOW (f))
- {
- XDestroyWindow (dpyinfo->display,
- output->user_time_window);
- XDeleteProperty (dpyinfo->display,
- FRAME_OUTER_WINDOW (f),
- dpyinfo->Xatom_net_wm_user_time_window);
- output->user_time_window = FRAME_OUTER_WINDOW (f);
- }
- }
- else
- {
- if (output->user_time_window == FRAME_OUTER_WINDOW (f)
- || output->user_time_window == None)
- {
- XSetWindowAttributes attrs;
- memset (&attrs, 0, sizeof attrs);
-
- output->user_time_window
- = XCreateWindow (dpyinfo->display, FRAME_X_WINDOW (f),
- -1, -1, 1, 1, 0, 0, InputOnly,
- CopyFromParent, 0, &attrs);
-
- XDeleteProperty (dpyinfo->display,
- FRAME_OUTER_WINDOW (f),
- dpyinfo->Xatom_net_wm_user_time);
- XChangeProperty (dpyinfo->display,
- FRAME_OUTER_WINDOW (f),
- dpyinfo->Xatom_net_wm_user_time_window,
- XA_WINDOW, 32, PropModeReplace,
- (unsigned char *) &output->user_time_window,
- 1);
- }
+ if (dpyinfo->last_user_time)
+ XChangeProperty (dpyinfo->display, output->user_time_window,
+ dpyinfo->Xatom_net_wm_user_time,
+ XA_CARDINAL, 32, PropModeReplace,
+ (unsigned char *) &dpyinfo->last_user_time, 1);
+ else
+ XDeleteProperty (dpyinfo->display, output->user_time_window,
+ dpyinfo->Xatom_net_wm_user_time);
}
-
- if (dpyinfo->last_user_time)
- XChangeProperty (dpyinfo->display,
- output->user_time_window,
- dpyinfo->Xatom_net_wm_user_time,
- XA_CARDINAL, 32, PropModeReplace,
- (unsigned char *) &dpyinfo->last_user_time, 1);
- else
- XDeleteProperty (dpyinfo->display,
- output->user_time_window,
- dpyinfo->Xatom_net_wm_user_time);
#endif
f->output_data.x->asked_for_visible = true;