--- /dev/null
+Use this command to create a new .po
+
+msginit --locale xx_YY file.pot
void action_raiselower(union ActionData *data)
{
ObClient *c = data->client.any.c;
- GList *it;
- gboolean raise = FALSE;
-
- for (it = stacking_list; it; it = g_list_next(it)) {
- if (WINDOW_IS_CLIENT(it->data)) {
- ObClient *cit = it->data;
-
- if (cit == c) break;
- if (client_normal(cit) == client_normal(c) &&
- cit->layer == c->layer &&
- cit->frame->visible &&
- !client_search_transient(c, cit))
- {
- if (RECT_INTERSECTS_RECT(cit->frame->area, c->frame->area)) {
- raise = TRUE;
- break;
- }
- }
- }
- }
- if (raise)
- action_raise(data);
- else
- action_lower(data);
+ client_action_start(data);
+ stacking_restack_request(c, NULL, Opposite, FALSE);
+ client_action_end(data);
}
void action_raise(union ActionData *data)
client_set_desktop_recursive(it->data, target, donthide);
}
-void client_set_desktop(ObClient *self, guint target,
- gboolean donthide)
+void client_set_desktop(ObClient *self, guint target, gboolean donthide)
{
self = client_search_top_normal_parent(self);
client_set_desktop_recursive(self, target, donthide);
}
#define WANT_EDGE(cur, c) \
- if(cur == c) \
+ if (cur == c) \
continue; \
- if(!client_normal(cur)) \
+ if (c->desktop != cur->desktop && cur->desktop != DESKTOP_ALL && \
+ cur->desktop != screen_desktop) \
continue; \
- if(screen_desktop != cur->desktop && cur->desktop != DESKTOP_ALL) \
- continue; \
- if(cur->iconic) \
+ if (cur->iconic) \
continue;
#define HIT_EDGE(my_edge_start, my_edge_end, his_edge_start, his_edge_end) \
/* crossing events for menu */
event_handle_menu(e);
} else if (e->type == FocusIn) {
+ if (client &&
+ e->xfocus.detail == NotifyInferior)
+ {
+ ob_debug_type(OB_DEBUG_FOCUS,
+ "Focus went to the frame window");
+
+ focus_left_screen = FALSE;
+
+ focus_fallback(FALSE, FALSE);
+
+ /* We don't get a FocusOut for this case, because it's just moving
+ from our Inferior up to us. This happens when iconifying a
+ window with RevertToParent focus */
+ frame_adjust_focus(client->frame, FALSE);
+ /* focus_set_client(NULL) has already been called */
+ client_calc_layer(client);
+ }
if (e->xfocus.detail == NotifyPointerRoot ||
e->xfocus.detail == NotifyDetailNone ||
e->xfocus.detail == NotifyInferior ||
{
XEvent ce;
- ob_debug_type(OB_DEBUG_FOCUS, "Focus went to root, "
- "pointer root/none or "
- "the frame window\n");
+ ob_debug_type(OB_DEBUG_FOCUS,
+ "Focus went to root or pointer root/none\n");
if (e->xfocus.detail == NotifyInferior ||
e->xfocus.detail == NotifyNonlinear)
/* If you send focus to a window and then it disappears, you can
get the FocusIn for it, after it is unmanaged.
- Just wait for the next FocusOut/FocusIn pair. */
+ Just wait for the next FocusOut/FocusIn pair, but make note that
+ the window that was focused no longer is. */
+ focus_set_client(NULL);
}
else if (client != focus_client) {
focus_left_screen = FALSE;
it = (found ? g_list_previous(it) :g_list_next(it)))
if (WINDOW_IS_CLIENT(it->data)) {
ObClient *c = it->data;
- if (found) {
+ if (found && !c->iconic &&
+ (c->desktop == DESKTOP_ALL || client->desktop == DESKTOP_ALL ||
+ c->desktop == client->desktop))
+ {
if (RECT_INTERSECTS_RECT(c->frame->area, client->frame->area))
{
if (sibling != NULL) {
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)
for (it = stacking_list; it; it = g_list_next(it))
if (WINDOW_IS_CLIENT(it->data)) {
ObClient *c = it->data;
- if (found) {
+ if (found && !c->iconic &&
+ (c->desktop == DESKTOP_ALL || client->desktop == DESKTOP_ALL ||
+ c->desktop == client->desktop))
+ {
if (RECT_INTERSECTS_RECT(c->frame->area, client->frame->area))
{
if (sibling != NULL) {
void stacking_restack_request(ObClient *client, ObClient *sibling,
gint detail, gboolean activate)
{
+ if (sibling && ((client->desktop != sibling->desktop &&
+ client->desktop != DESKTOP_ALL &&
+ sibling->desktop != DESKTOP_ALL) ||
+ sibling->iconic))
+ {
+ ob_debug("Setting restack sibling to NULL, they are not on the same "
+ "desktop or it is iconified\n");
+ sibling = NULL;
+ }
+
switch (detail) {
case Below:
ob_debug("Restack request Below for client %s sibling %s\n",
*/
void stacking_restack_request(struct _ObClient *client,
struct _ObClient *sibling,
- gint detail, gboolean);
+ gint detail, gboolean activate);
#endif