have stacking_restack_request return a bool that says if it did something with TopIf/BottomIf (other cases always return true)

This commit is contained in:
Mikael Magnusson 2007-06-01 23:20:05 +00:00
parent 062d4d435d
commit 0f677834e2
2 changed files with 13 additions and 7 deletions

View file

@ -506,7 +506,7 @@ static gboolean stacking_occluded(ObClient *client, ObClient *sibling)
return occluded; 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. against all other clients.
*/ */
static gboolean stacking_occludes(ObClient *client, ObClient *sibling) static gboolean stacking_occludes(ObClient *client, ObClient *sibling)
@ -545,8 +545,8 @@ static gboolean stacking_occludes(ObClient *client, ObClient *sibling)
return occludes; return occludes;
} }
void stacking_restack_request(ObClient *client, ObClient *sibling, gboolean stacking_restack_request(ObClient *client, ObClient *sibling,
gint detail, gboolean activate) gint detail, gboolean activate)
{ {
switch (detail) { switch (detail) {
case Below: case Below:
@ -563,6 +563,8 @@ void stacking_restack_request(ObClient *client, ObClient *sibling,
lower it to the bottom */ lower it to the bottom */
if (stacking_occludes(client, sibling)) if (stacking_occludes(client, sibling))
stacking_lower(CLIENT_AS_WINDOW(client)); stacking_lower(CLIENT_AS_WINDOW(client));
else
return FALSE;
break; break;
case Above: case Above:
ob_debug("Restack request Above for client %s sibling %s\n", ob_debug("Restack request Above for client %s sibling %s\n",
@ -584,7 +586,8 @@ void stacking_restack_request(ObClient *client, ObClient *sibling,
client_activate(client, FALSE, TRUE); client_activate(client, FALSE, TRUE);
else else
stacking_raise(CLIENT_AS_WINDOW(client)); stacking_raise(CLIENT_AS_WINDOW(client));
} } else
return FALSE;
break; break;
case Opposite: case Opposite:
ob_debug("Restack request Opposite for client %s sibling " ob_debug("Restack request Opposite for client %s sibling "
@ -602,4 +605,5 @@ void stacking_restack_request(ObClient *client, ObClient *sibling,
stacking_lower(CLIENT_AS_WINDOW(client)); stacking_lower(CLIENT_AS_WINDOW(client));
break; break;
} }
return TRUE;
} }

View file

@ -67,11 +67,13 @@ void stacking_below(ObWindow *window, ObWindow *below);
@param detail One of Above, Below, TopIf, BottomIf, Opposite @param detail One of Above, Below, TopIf, BottomIf, Opposite
@param activate If TRUE, and if the window is going to be raised, it will @param activate If TRUE, and if the window is going to be raised, it will
be activated instead 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 See http://tronche.com/gui/x/xlib/window/configure.html for details on
how each detail works with and without a sibling. how each detail works with and without a sibling.
*/ */
void stacking_restack_request(struct _ObClient *client, gboolean stacking_restack_request(struct _ObClient *client,
struct _ObClient *sibling, struct _ObClient *sibling,
gint detail, gboolean activate); gint detail, gboolean activate);
#endif #endif