mirror of
https://github.com/labwc/labwc.git
synced 2026-02-23 01:40:18 -05:00
treewide: remove empty statements in switch cases
For longer cases, factor out the logic to new functions. For very short cases, just move the declaration before the switch. v2: in one case, replace the switch with if/else.
This commit is contained in:
parent
fbb92e2e30
commit
a3d6226728
5 changed files with 59 additions and 50 deletions
|
|
@ -77,10 +77,9 @@ desktop_focus_view(struct view *view, bool raise)
|
|||
workspaces_switch_to(view->workspace, /*update_focus*/ false);
|
||||
}
|
||||
|
||||
struct seat *seat = &view->server->seat;
|
||||
switch (view_wants_focus(view)) {
|
||||
case VIEW_WANTS_FOCUS_ALWAYS:
|
||||
; /* works around "a label can only be part of a statement" */
|
||||
struct seat *seat = &view->server->seat;
|
||||
if (view->surface != seat->seat->keyboard_state.focused_surface) {
|
||||
seat_focus_surface(seat, view->surface);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue