this fixes gucharmap.
/* get all the stuff off the window */
client_get_all(self, TRUE);
+ ob_debug("Window type: %d\n", self->type);
+ ob_debug("Window group: 0x%x\n", self->group?self->group->leader:0);
+
/* specify that if we exit, the window should not be destroyed and
should be reparented back to root automatically */
XChangeSaveSet(ob_display, window, SetModeInsert);
client_search_focus_tree_full(self)) &&
/* this checks for focus=false for the window */
(!settings || settings->focus != 0) &&
- focus_valid_target(self, FALSE, TRUE, FALSE, FALSE))
+ focus_valid_target(self, FALSE, FALSE, TRUE, FALSE, FALSE))
{
activate = TRUE;
}
3. it is not shaded
*/
if ((allow_omnipresent || c->desktop == screen_desktop) &&
- focus_valid_target(c, FALSE, FALSE, FALSE, FALSE) &&
+ focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, FALSE) &&
!c->shaded &&
(allow_refocus || client_focus_target(c) != old) &&
client_focus(c))
a splashscreen or a desktop window (save the desktop as a
backup fallback though)
*/
- if (focus_valid_target(c, FALSE, FALSE, FALSE, TRUE) &&
+ if (focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, TRUE) &&
(allow_refocus || client_focus_target(c) != old) &&
client_focus(c))
{
ObClient *c = it->data;
/* check that it's not a helper window to avoid infinite recursion */
if (c != ft && c->type == OB_CLIENT_TYPE_NORMAL &&
- focus_valid_target(c, iconic_windows, all_desktops, FALSE, FALSE))
+ focus_valid_target(c, TRUE, iconic_windows, all_desktops,
+ FALSE, FALSE))
{
return TRUE;
}
}
gboolean focus_valid_target(ObClient *ft,
+ gboolean helper_windows,
gboolean iconic_windows,
gboolean all_desktops,
gboolean dock_windows,
||
/* helper windows are valid targets if... */
(client_helper(ft) &&
- /* ...a window in its group already has focus ... */
- ((focus_client && ft->group == focus_client->group) ||
+ /* ...a window in its group already has focus and we want to
+ include helper windows ... */
+ ((focus_client && ft->group == focus_client->group &&
+ helper_windows) ||
/* ... or if there are no other windows in its group
- that can be cycled to instead */
+ that can be focused instead */
!focus_target_has_siblings(ft, iconic_windows, all_desktops))));
/* it's not set to skip the taskbar (unless it is a type that would be
{
ObClient *cft = client_focus_target(ft);
ok = ok && (ft == cft || !focus_valid_target(cft,
+ TRUE,
iconic_windows,
all_desktops,
dock_windows,
struct _ObClient *focus_order_find_first(guint desktop);
gboolean focus_valid_target(struct _ObClient *ft,
+ gboolean helper_windows,
gboolean iconic_windows,
gboolean all_desktops,
gboolean dock_windows,
/* stop focus cycling if the given client is a valid focus target,
and so the cycling is being disrupted */
if (focus_cycle_target && ifclient &&
- focus_valid_target(ifclient,
+ focus_valid_target(ifclient, TRUE,
focus_cycle_iconic_windows,
focus_cycle_all_desktops,
focus_cycle_dock_windows,
if (it == NULL) it = g_list_last(list);
}
ft = it->data;
- if (focus_valid_target(ft,
+ if (focus_valid_target(ft, TRUE,
focus_cycle_iconic_windows,
focus_cycle_all_desktops,
focus_cycle_dock_windows,
/* the currently selected window isn't interesting */
if (cur == c)
continue;
- if (!focus_valid_target(it->data, FALSE, FALSE, dock_windows,
+ if (!focus_valid_target(it->data, TRUE, FALSE, FALSE, dock_windows,
desktop_windows))
continue;
GList *it;
for (it = focus_order; it; it = g_list_next(it))
- if (focus_valid_target(it->data,
+ if (focus_valid_target(it->data, TRUE,
focus_cycle_iconic_windows,
focus_cycle_all_desktops,
focus_cycle_dock_windows,
for (it = g_list_last(focus_order); it; it = g_list_previous(it)) {
ObClient *ft = it->data;
- if (focus_valid_target(ft,
+ if (focus_valid_target(ft, TRUE,
iconic_windows,
all_desktops,
dock_windows,