really fix focus_last?
This commit is contained in:
parent
e3c52da8c3
commit
dce6247e69
4 changed files with 8 additions and 3 deletions
|
@ -1071,7 +1071,8 @@ void action_focus(union ActionData *data)
|
||||||
|
|
||||||
void action_unfocus (union ActionData *data)
|
void action_unfocus (union ActionData *data)
|
||||||
{
|
{
|
||||||
client_unfocus(data->client.any.c);
|
if (data->client.any.c == focus_client);
|
||||||
|
focus_fallback(OB_FOCUS_FALLBACK_UNFOCUSING);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_iconify(union ActionData *data)
|
void action_iconify(union ActionData *data)
|
||||||
|
|
|
@ -2833,13 +2833,15 @@ gboolean client_focus(ObClient *self)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Used when the current client is closed, focus_last will then prevent
|
||||||
|
* focus from going to the mouse pointer */
|
||||||
void client_unfocus(ObClient *self)
|
void client_unfocus(ObClient *self)
|
||||||
{
|
{
|
||||||
if (focus_client == self) {
|
if (focus_client == self) {
|
||||||
#ifdef DEBUG_FOCUS
|
#ifdef DEBUG_FOCUS
|
||||||
ob_debug("client_unfocus for %lx\n", self->window);
|
ob_debug("client_unfocus for %lx\n", self->window);
|
||||||
#endif
|
#endif
|
||||||
focus_fallback(OB_FOCUS_FALLBACK_UNFOCUSING);
|
focus_fallback(OB_FOCUS_FALLBACK_CLOSED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,8 @@ ObClient* focus_fallback_target(ObFocusFallbackType type)
|
||||||
|
|
||||||
old = focus_client;
|
old = focus_client;
|
||||||
|
|
||||||
if (type == OB_FOCUS_FALLBACK_UNFOCUSING && old) {
|
if ((type == OB_FOCUS_FALLBACK_UNFOCUSING
|
||||||
|
|| type == OB_FOCUS_FALLBACK_CLOSED) && old) {
|
||||||
if (old->transient_for) {
|
if (old->transient_for) {
|
||||||
gboolean trans = FALSE;
|
gboolean trans = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ void focus_set_client(struct _ObClient *client);
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OB_FOCUS_FALLBACK_UNFOCUSING, /*!< forcefully remove focus from the
|
OB_FOCUS_FALLBACK_UNFOCUSING, /*!< forcefully remove focus from the
|
||||||
current window */
|
current window */
|
||||||
|
OB_FOCUS_FALLBACK_CLOSED, /*!< closed the window with focus */
|
||||||
OB_FOCUS_FALLBACK_NOFOCUS /*!< nothing has focus for some reason */
|
OB_FOCUS_FALLBACK_NOFOCUS /*!< nothing has focus for some reason */
|
||||||
} ObFocusFallbackType;
|
} ObFocusFallbackType;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue