dont need the bool
This commit is contained in:
parent
6b79b47f23
commit
1560825d8b
2 changed files with 6 additions and 7 deletions
|
@ -118,14 +118,14 @@ static void focus_desktop()
|
||||||
static void event(ObEvent *e, void *foo)
|
static void event(ObEvent *e, void *foo)
|
||||||
{
|
{
|
||||||
ConfigValue follow_mouse, focus_new;
|
ConfigValue follow_mouse, focus_new;
|
||||||
gboolean r;
|
|
||||||
|
|
||||||
r = config_get("focus.followMouse", Config_Bool, &follow_mouse);
|
if (!config_get("focus.followMouse", Config_Bool, &follow_mouse))
|
||||||
g_assert(r);
|
g_assert_not_reached();
|
||||||
|
|
||||||
switch (e->type) {
|
switch (e->type) {
|
||||||
case Event_Client_Mapped:
|
case Event_Client_Mapped:
|
||||||
r = config_get("focus.focusNew", Config_Bool, &focus_new);
|
if (!config_get("focus.focusNew", Config_Bool, &focus_new))
|
||||||
|
g_assert_not_reached();
|
||||||
if (focus_new.bool && client_normal(e->data.c.client))
|
if (focus_new.bool && client_normal(e->data.c.client))
|
||||||
client_focus(e->data.c.client);
|
client_focus(e->data.c.client);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -49,15 +49,14 @@ static void place_random(Client *c)
|
||||||
static void event(ObEvent *e, void *foo)
|
static void event(ObEvent *e, void *foo)
|
||||||
{
|
{
|
||||||
ConfigValue remember;
|
ConfigValue remember;
|
||||||
gboolean r;
|
|
||||||
|
|
||||||
g_assert(e->type == Event_Client_New);
|
g_assert(e->type == Event_Client_New);
|
||||||
|
|
||||||
/* requested a position */
|
/* requested a position */
|
||||||
if (e->data.c.client->positioned) return;
|
if (e->data.c.client->positioned) return;
|
||||||
|
|
||||||
r = config_get("placement.remember", Config_Bool, &remember);
|
if (!config_get("placement.remember", Config_Bool, &remember))
|
||||||
g_assert(r);
|
g_assert_not_reached();
|
||||||
|
|
||||||
if (!remember.bool || !place_history(e->data.c.client))
|
if (!remember.bool || !place_history(e->data.c.client))
|
||||||
place_random(e->data.c.client);
|
place_random(e->data.c.client);
|
||||||
|
|
Loading…
Reference in a new issue