DesktopLayout screen_desktop_layout;
gchar **screen_desktop_names;
Window screen_support_win;
+Time screen_desktop_user_time = CurrentTime;
static Rect **area; /* array of desktop holding array of xinerama areas */
static Rect *monitor_area;
}
if (wait >= timeout) {
- g_message(_("Timeout expired while waiting for the current WM to die"
- " on screen %d"), ob_screen);
+ g_message(_("The WM on screen %d is not exiting"), ob_screen);
return FALSE;
}
}
/* Send client message indicating that we are now the WM */
prop_message(RootWindow(ob_display, ob_screen), prop_atoms.manager,
- timestamp, wm_sn_atom, 0, 0, SubstructureNotifyMask);
-
+ timestamp, wm_sn_atom, screen_support_win, 0,
+ SubstructureNotifyMask);
return TRUE;
}
/* set the _NET_SUPPORTED_ATOMS hint */
num_support = 55;
+#ifdef SYNC
+ num_support += 2;
+#endif
i = 0;
supported = g_new(gulong, num_support);
supported[i++] = prop_atoms.net_wm_full_placement;
supported[i++] = prop_atoms.net_wm_moveresize;
supported[i++] = prop_atoms.net_wm_user_time;
supported[i++] = prop_atoms.net_frame_extents;
+#ifdef SYNC
+ supported[i++] = prop_atoms.net_wm_sync_request;
+ supported[i++] = prop_atoms.net_wm_sync_request_counter;
+#endif
supported[i++] = prop_atoms.ob_wm_state_undecorated;
g_assert(i == num_support);
-/*
- supported[] = prop_atoms.net_wm_action_stick;
-*/
PROP_SETA32(RootWindow(ob_display, ob_screen),
net_supported, atom, supported, num_support);
}
event_ignore_queued_enters();
+
+ if (event_curtime != CurrentTime)
+ screen_desktop_user_time = event_curtime;
}
static void get_row_col(guint d, guint *r, guint *c)
void screen_install_colormap(ObClient *client, gboolean install)
{
- XWindowAttributes wa;
-
if (client == NULL) {
if (install)
XInstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst));
else
XUninstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst));
} else {
- if (XGetWindowAttributes(ob_display, client->window, &wa) &&
- wa.colormap != None) {
- xerror_set_ignore(TRUE);
- if (install)
- XInstallColormap(RrDisplay(ob_rr_inst), wa.colormap);
- else
- XUninstallColormap(RrDisplay(ob_rr_inst), wa.colormap);
- xerror_set_ignore(FALSE);
- }
+ xerror_set_ignore(TRUE);
+ if (install) {
+ if (client->colormap != None)
+ XInstallColormap(RrDisplay(ob_rr_inst), client->colormap);
+ } else
+ XUninstallColormap(RrDisplay(ob_rr_inst), client->colormap);
+ xerror_set_ignore(FALSE);
}
}