#include "screen.h"
#include "group.h"
#include "prop.h"
-#include "dispatch.h"
#include "focus.h"
#include "stacking.h"
#include "popup.h"
#include <assert.h>
ObClient *focus_client;
-GList **focus_order = NULL; /* these lists are created when screen_startup
- sets the number of desktops */
+GList **focus_order; /* these lists are created when screen_startup
+ sets the number of desktops */
-static ObClient *focus_cycle_target = NULL;
-static Popup *focus_cycle_popup = NULL;
+static ObClient *focus_cycle_target;
+static Popup *focus_cycle_popup;
void focus_startup()
{
PROP_SET32(RootWindow(ob_display, ob_screen),
net_active_window, window, active);
}
-
- if (focus_client != NULL)
- dispatch_client(Event_Client_Focus, focus_client, 0, 0);
- if (old != NULL)
- dispatch_client(Event_Client_Unfocus, old, 0, 0);
}
static gboolean focus_under_pointer()
}
}
+#if 0
/* try for group relations */
if (old->group) {
GSList *sit;
return;
}
}
+#endif
}
for (it = focus_order[screen_desktop]; it != NULL; it = it->next)
*/
/* XXX the size and the font extents need to be related on some level
*/
- popup_size(focus_cycle_popup, 320, 48);
+ popup_size(focus_cycle_popup, POPUP_WIDTH, POPUP_HEIGHT);
/* use the transient's parent's title/icon */
while (p->transient_for && p->transient_for != OB_TRAN_GROUP)
}
ObClient *focus_cycle(gboolean forward, gboolean linear, gboolean done,
- gboolean cancel)
+ gboolean cancel)
{
static ObClient *first = NULL;
static ObClient *t = NULL;
goto done_cycle;
} else if (done) {
if (focus_cycle_target)
- client_activate(focus_cycle_target);
+ client_activate(focus_cycle_target, FALSE);
goto done_cycle;
}
- if (!first)
- grab_pointer(TRUE, None);
if (!first) first = focus_client;
if (!focus_cycle_target) focus_cycle_target = focus_client;
desktop */
if (ft->transients == NULL && client_normal(ft) &&
((ft->can_focus || ft->focus_notify) &&
+ !ft->skip_taskbar &&
(ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL))) {
if (ft != focus_cycle_target) { /* prevents flicker */
if (focus_cycle_target)
order = NULL;
popup_cycle(ft, FALSE);
- grab_pointer(FALSE, None);
return NULL;
}