raise window during shade hover
BUG: 281435 REVIEW: 104280
This commit is contained in:
parent
c900455599
commit
a9478564d8
3 changed files with 18 additions and 2 deletions
|
@ -667,8 +667,10 @@ void Client::updateUserTime(Time time)
|
|||
time = xTime();
|
||||
if (time != -1U
|
||||
&& (user_time == CurrentTime
|
||||
|| timestampCompare(time, user_time) > 0)) // time > user_time
|
||||
|| timestampCompare(time, user_time) > 0)) { // time > user_time
|
||||
user_time = time;
|
||||
shade_below = NULL; // do not hover re-shade a window after it got interaction
|
||||
}
|
||||
group()->updateUserTime(user_time);
|
||||
}
|
||||
|
||||
|
|
15
client.cpp
15
client.cpp
|
@ -95,6 +95,7 @@ Client::Client(Workspace* ws)
|
|||
, transient_for (NULL)
|
||||
, transient_for_id(None)
|
||||
, original_transient_for_id(None)
|
||||
, shade_below(NULL)
|
||||
, skip_switcher(false)
|
||||
, blocks_compositing(false)
|
||||
, autoRaiseTimer(NULL)
|
||||
|
@ -1099,8 +1100,11 @@ void Client::setShade(ShadeMode mode)
|
|||
plainResize(s);
|
||||
shade_geometry_change = false;
|
||||
if (isActive()) {
|
||||
if (was_shade_mode == ShadeHover)
|
||||
if (was_shade_mode == ShadeHover) {
|
||||
if (shade_below && workspace()->stackingOrder().indexOf(shade_below) > -1)
|
||||
workspace()->restack(this, shade_below);
|
||||
workspace()->activateNextClient(this);
|
||||
}
|
||||
else
|
||||
workspace()->focusToNull();
|
||||
}
|
||||
|
@ -1111,6 +1115,15 @@ void Client::setShade(ShadeMode mode)
|
|||
plainResize(s);
|
||||
if (shade_mode == ShadeHover || shade_mode == ShadeActivated)
|
||||
setActive(true);
|
||||
if (shade_mode == ShadeHover) {
|
||||
ClientList order = workspace()->stackingOrder();
|
||||
int idx = order.indexOf(this) + 1; // this is likely related to the index parameter?!
|
||||
shade_below = (idx < order.count()) ? order.at(idx) : NULL;
|
||||
if (shade_below && shade_below->isNormalWindow())
|
||||
workspace()->raiseClient(this);
|
||||
else
|
||||
shade_below = NULL;
|
||||
}
|
||||
XMapWindow(display(), wrapperId());
|
||||
XMapWindow(display(), window());
|
||||
if (isActive())
|
||||
|
|
1
client.h
1
client.h
|
@ -823,6 +823,7 @@ private:
|
|||
Window original_transient_for_id;
|
||||
ClientList transients_list; // SELI TODO: Make this ordered in stacking order?
|
||||
ShadeMode shade_mode;
|
||||
Client *shade_below;
|
||||
uint active : 1;
|
||||
uint deleting : 1; ///< True when doing cleanup and destroying the client
|
||||
uint keep_above : 1; ///< NET::KeepAbove (was stays_on_top)
|
||||
|
|
Loading…
Reference in a new issue