void client_foreach_ancestor(ObClient *self, ObClientForeachFunc func, void *data)
{
if (self->transient_for) {
void client_foreach_ancestor(ObClient *self, ObClientForeachFunc func, void *data)
{
if (self->transient_for) {
if (!func(self->transient_for, data)) return;
client_foreach_ancestor(self->transient_for, func, data);
} else {
if (!func(self->transient_for, data)) return;
client_foreach_ancestor(self->transient_for, func, data);
} else {
/* use the first value that we know about in the array */
for (i = 0; i < num; ++i) {
if (val[i] == prop_atoms.net_wm_window_type_desktop)
/* use the first value that we know about in the array */
for (i = 0; i < num; ++i) {
if (val[i] == prop_atoms.net_wm_window_type_desktop)
else if (val[i] == prop_atoms.kde_net_wm_window_type_override) {
/* prevent this window from getting any decor or
functionality */
else if (val[i] == prop_atoms.kde_net_wm_window_type_override) {
/* prevent this window from getting any decor or
functionality */
/*the window type hint was not set, which means we either classify
ourself as a normal window or a dialog, depending on if we are a
transient. */
if (self->transient)
/*the window type hint was not set, which means we either classify
ourself as a normal window or a dialog, depending on if we are a
transient. */
if (self->transient)
self->decorations = Decor_Titlebar | Decor_Handle | Decor_Border |
Decor_Icon | Decor_AllDesktops | Decor_Iconify | Decor_Maximize |
Decor_Shade;
self->decorations = Decor_Titlebar | Decor_Handle | Decor_Border |
Decor_Icon | Decor_AllDesktops | Decor_Iconify | Decor_Maximize |
Decor_Shade;
}
if (!(self->min_size.width < self->max_size.width ||
self->min_size.height < self->max_size.height)) {
self->decorations &= ~(Decor_Maximize | Decor_Handle);
}
if (!(self->min_size.width < self->max_size.width ||
self->min_size.height < self->max_size.height)) {
self->decorations &= ~(Decor_Maximize | Decor_Handle);
/* normal windows retain all of the possible decorations and
functionality, and are the only windows that you can fullscreen */
/* normal windows retain all of the possible decorations and
functionality, and are the only windows that you can fullscreen */
if (self->mwmhints.flags & OB_MWM_FLAG_FUNCTIONS) {
if (! (self->mwmhints.functions & OB_MWM_FUNC_ALL)) {
if (! (self->mwmhints.functions & OB_MWM_FUNC_RESIZE))
if (self->mwmhints.flags & OB_MWM_FLAG_FUNCTIONS) {
if (! (self->mwmhints.functions & OB_MWM_FUNC_ALL)) {
if (! (self->mwmhints.functions & OB_MWM_FUNC_RESIZE))
/* dont let mwm hints kill the close button
if (! (self->mwmhints.functions & MwmFunc_Close))
self->functions &= ~Func_Close; */
/* dont let mwm hints kill the close button
if (! (self->mwmhints.functions & MwmFunc_Close))
self->functions &= ~Func_Close; */
- if (!((self->functions & Func_Move) && (self->functions & Func_Resize)))
- self->functions &= ~(Func_Maximize | Func_Fullscreen);
+ if (!((self->functions & OB_CLIENT_FUNC_MOVE) &&
+ (self->functions & OB_CLIENT_FUNC_RESIZE)))
+ self->functions &= ~(OB_CLIENT_FUNC_MAXIMIZE |
+ OB_CLIENT_FUNC_FULLSCREEN);
/* if we don't have a titlebar, then we cannot shade! */
if (!(self->decorations & Decor_Titlebar))
/* if we don't have a titlebar, then we cannot shade! */
if (!(self->decorations & Decor_Titlebar))
client_set_desktop(self, DESKTOP_ALL, FALSE);
/* adjust the client's decorations, etc. */
client_reconfigure(self);
} else {
/* this makes sure that these windows appear on all desktops */
client_set_desktop(self, DESKTOP_ALL, FALSE);
/* adjust the client's decorations, etc. */
client_reconfigure(self);
} else {
/* this makes sure that these windows appear on all desktops */
actions[num++] = prop_atoms.net_wm_action_maximize_horz;
actions[num++] = prop_atoms.net_wm_action_maximize_vert;
}
actions[num++] = prop_atoms.net_wm_action_maximize_horz;
actions[num++] = prop_atoms.net_wm_action_maximize_vert;
}
if (self->frame) client_shade(self, FALSE);
else self->shaded = FALSE;
}
if (self->frame) client_shade(self, FALSE);
else self->shaded = FALSE;
}
g_message("UNSETTING ICONIC");
if (self->frame) client_iconify(self, FALSE, TRUE);
else self->iconic = FALSE;
}
g_message("UNSETTING ICONIC");
if (self->frame) client_iconify(self, FALSE, TRUE);
else self->iconic = FALSE;
}
if (self->frame) client_fullscreen(self, FALSE, TRUE);
else self->fullscreen = FALSE;
}
if (self->frame) client_fullscreen(self, FALSE, TRUE);
else self->fullscreen = FALSE;
}
if (self->frame) client_maximize(self, FALSE, 0, TRUE);
else self->max_vert = self->max_horz = FALSE;
}
if (self->frame) client_maximize(self, FALSE, 0, TRUE);
else self->max_vert = self->max_horz = FALSE;
}
- else if (self->type == Type_Desktop) l = Layer_Desktop;
- else if (self->type == Type_Dock) {
+ else if (self->type == OB_CLIENT_TYPE_DESKTOP) l = Layer_Desktop;
+ else if (self->type == OB_CLIENT_TYPE_DOCK) {
- return ! (self->type == Type_Desktop || self->type == Type_Dock ||
- self->type == Type_Splash);
+ return ! (self->type == OB_CLIENT_TYPE_DESKTOP ||
+ self->type == OB_CLIENT_TYPE_DOCK ||
+ self->type == OB_CLIENT_TYPE_SPLASH);
- if (!(self->functions & Func_Fullscreen) || /* can't */
- self->fullscreen == fs) return; /* already done */
+ if (!(self->functions & OB_CLIENT_FUNC_FULLSCREEN) || /* can't */
+ self->fullscreen == fs) return; /* already done */
self->shaded == shade) return; /* already done */
/* when we're iconic, don't change the wmstate */
self->shaded == shade) return; /* already done */
/* when we're iconic, don't change the wmstate */
/* si is the smallest image >= req */
/* li is the largest image < req */
unsigned long size, smallest = 0xffffffff, largest = 0, si = 0, li = 0;
/* si is the smallest image >= req */
/* li is the largest image < req */
unsigned long size, smallest = 0xffffffff, largest = 0, si = 0, li = 0;