} else
windows = NULL;
- PROP_SETA32(ob_root, net_client_list, window, (guint32*)windows, size);
+ PROP_SETA32(RootWindow(ob_display, ob_screen),
+ net_client_list, window, (guint32*)windows, size);
if (windows)
g_free(windows);
XWMHints *wmhints;
XWindowAttributes attrib;
- XQueryTree(ob_display, ob_root, &w, &w, &children, &nchild);
+ XQueryTree(ob_display, RootWindow(ob_display, ob_screen),
+ &w, &w, &children, &nchild);
/* remove all icon windows from the list */
for (i = 0; i < nchild; i++) {
focus_order_add_new(self);
/* focus the new window? */
- if (ob_state != OB_STATE_STARTING && config_focus_new &&
+ if (ob_state() != OB_STATE_STARTING && config_focus_new &&
(self->type == OB_CLIENT_TYPE_NORMAL || self->type == OB_CLIENT_TYPE_DIALOG)) {
gboolean group_foc = FALSE;
/* called by client_unmanage() to close any menus referencing this client */
void client_close_menus(gpointer key, gpointer value, gpointer self)
{
- if (((Menu *)value)->client == (ObClient *)self)
- menu_hide((Menu *)value);
+ if (((ObMenu *)value)->client == (ObClient *)self)
+ menu_hide((ObMenu *)value);
}
void client_unmanage(ObClient *self)
frame_release_client(self->frame, self);
self->frame = NULL;
- if (ob_state != OB_STATE_EXITING) {
+ if (ob_state() != OB_STATE_EXITING) {
/* these values should not be persisted across a window
unmapping/mapping */
prop_erase(self->window, prop_atoms.net_wm_desktop);
group */
if (t == self->group->leader ||
t == None ||
- t == ob_root) {
+ t == RootWindow(ob_display, ob_screen)) {
/* window is a transient for its group! */
c = OB_TRAN_GROUP;
}
/* only do this when first managing the window *AND* when we aren't
starting up! */
- if (ob_state != OB_STATE_STARTING && self->frame == NULL)
+ if (ob_state() != OB_STATE_STARTING && self->frame == NULL)
if (hints->flags & StateHint)
self->iconic = hints->initial_state == IconicState;