Workspace::gotFocusIn and ::shouldGetFocusIn changed to operate on AbstractClient

This commit is contained in:
Martin Gräßlin 2015-07-09 13:16:19 +02:00
parent 726b1addd2
commit 9a8f94f8fc
2 changed files with 5 additions and 5 deletions

View file

@ -526,9 +526,9 @@ void Workspace::setCurrentScreen(int new_screen)
screens()->setCurrent(new_screen); screens()->setCurrent(new_screen);
} }
void Workspace::gotFocusIn(const Client* c) void Workspace::gotFocusIn(const AbstractClient* c)
{ {
if (should_get_focus.contains(const_cast< Client* >(c))) { if (should_get_focus.contains(const_cast< AbstractClient* >(c))) {
// remove also all sooner elements that should have got FocusIn, // remove also all sooner elements that should have got FocusIn,
// but didn't for some reason (and also won't anymore, because they were sooner) // but didn't for some reason (and also won't anymore, because they were sooner)
while (should_get_focus.first() != c) while (should_get_focus.first() != c)
@ -537,7 +537,7 @@ void Workspace::gotFocusIn(const Client* c)
} }
} }
void Workspace::setShouldGetFocus(Client* c) void Workspace::setShouldGetFocus(AbstractClient* c)
{ {
should_get_focus.append(c); should_get_focus.append(c);
updateStackingOrder(); // e.g. fullscreens have different layer when active/not-active updateStackingOrder(); // e.g. fullscreens have different layer when active/not-active

View file

@ -160,8 +160,8 @@ public:
bool allowClientActivation(const AbstractClient* c, xcb_timestamp_t time = -1U, bool focus_in = false, bool allowClientActivation(const AbstractClient* c, xcb_timestamp_t time = -1U, bool focus_in = false,
bool ignore_desktop = false); bool ignore_desktop = false);
void restoreFocus(); void restoreFocus();
void gotFocusIn(const Client*); void gotFocusIn(const AbstractClient*);
void setShouldGetFocus(Client*); void setShouldGetFocus(AbstractClient*);
bool activateNextClient(AbstractClient* c); bool activateNextClient(AbstractClient* c);
bool focusChangeEnabled() { bool focusChangeEnabled() {
return block_focus == 0; return block_focus == 0;