mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
view: avoid raising same view over and over
Since view_move_to_front() now does more work than it used to (updating XWayland server stacking order), try to avoid doing that work unnecessarily.
This commit is contained in:
parent
0ddf3c43ad
commit
db591d1400
3 changed files with 31 additions and 4 deletions
|
|
@ -55,9 +55,12 @@ view_impl_map(struct view *view)
|
|||
void
|
||||
view_impl_unmap(struct view *view)
|
||||
{
|
||||
struct seat *seat = &view->server->seat;
|
||||
if (seat->seat->keyboard_state.focused_surface == view->surface) {
|
||||
desktop_focus_topmost_view(view->server);
|
||||
struct server *server = view->server;
|
||||
if (view == server->focused_view) {
|
||||
desktop_focus_topmost_view(server);
|
||||
}
|
||||
if (view == server->last_raised_view) {
|
||||
server->last_raised_view = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue