return occluded;
}
-/*! Returns TRUE if client is occludes the sibling. If sibling is NULL it tries
+/*! Returns TRUE if client occludes the sibling. If sibling is NULL it tries
against all other clients.
*/
static gboolean stacking_occludes(ObClient *client, ObClient *sibling)
return occludes;
}
-void stacking_restack_request(ObClient *client, ObClient *sibling,
- gint detail, gboolean activate)
+gboolean stacking_restack_request(ObClient *client, ObClient *sibling,
+ gint detail, gboolean activate)
{
switch (detail) {
case Below:
lower it to the bottom */
if (stacking_occludes(client, sibling))
stacking_lower(CLIENT_AS_WINDOW(client));
+ else
+ return FALSE;
break;
case Above:
ob_debug("Restack request Above for client %s sibling %s\n",
client_activate(client, FALSE, TRUE);
else
stacking_raise(CLIENT_AS_WINDOW(client));
- }
+ } else
+ return FALSE;
break;
case Opposite:
ob_debug("Restack request Opposite for client %s sibling "
stacking_lower(CLIENT_AS_WINDOW(client));
break;
}
+ return TRUE;
}
@param detail One of Above, Below, TopIf, BottomIf, Opposite
@param activate If TRUE, and if the window is going to be raised, it will
be activated instead
+ @return false if given TopIf or BottomIf and no action was taken,
+ true otherwise
See http://tronche.com/gui/x/xlib/window/configure.html for details on
how each detail works with and without a sibling.
*/
-void stacking_restack_request(struct _ObClient *client,
- struct _ObClient *sibling,
- gint detail, gboolean activate);
+gboolean stacking_restack_request(struct _ObClient *client,
+ struct _ObClient *sibling,
+ gint detail, gboolean activate);
#endif