File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 35
35
#include " wlr-wrap-end.hpp"
36
36
37
37
void Server::focus_view (std::shared_ptr<View>&& view, wlr_surface* surface) {
38
- const wlr_surface* prev_surface = seat->wlr ->keyboard_state .focused_surface ;
38
+ wlr_surface* prev_surface = seat->wlr ->keyboard_state .focused_surface ;
39
39
if (prev_surface == surface && surface != nullptr ) {
40
40
/* Don't re-focus an already focused surface. */
41
41
return ;
42
42
}
43
43
44
44
if (prev_surface != nullptr ) {
45
- wlr_surface* previous = seat->wlr ->keyboard_state .focused_surface ;
46
-
47
- if (const auto * xdg_previous = wlr_xdg_surface_try_from_wlr_surface (previous)) {
45
+ if (const auto * xdg_previous = wlr_xdg_surface_try_from_wlr_surface (prev_surface)) {
48
46
assert (xdg_previous->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
49
47
wlr_xdg_toplevel_set_activated (xdg_previous->toplevel , false );
50
- } else if (auto * xwayland_previous = wlr_xwayland_surface_try_from_wlr_surface (previous )) {
48
+ } else if (auto * xwayland_previous = wlr_xwayland_surface_try_from_wlr_surface (prev_surface )) {
51
49
wlr_xwayland_surface_activate (xwayland_previous, false );
52
50
}
53
51
}
You can’t perform that action at this time.
0 commit comments