Skip to content

Commit

Permalink
Remove redundant checks
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA authored and ddevault committed Aug 12, 2019
1 parent 3af52d8 commit 813e120
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sway/commands/border.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct cmd_results *cmd_border(int argc, char **argv) {
} else if (strcmp(argv[0], "pixel") == 0) {
set_border(container, B_PIXEL);
} else if (strcmp(argv[0], "csd") == 0) {
if (!view || !view->xdg_decoration) {
if (!view->xdg_decoration) {
return cmd_results_new(CMD_INVALID,
"This window doesn't support client side decorations");
}
Expand Down
2 changes: 1 addition & 1 deletion sway/commands/fullscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {

bool is_fullscreen = false;
for (struct sway_container *curr = container; curr; curr = curr->parent) {
if (curr && curr->fullscreen_mode != FULLSCREEN_NONE) {
if (curr->fullscreen_mode != FULLSCREEN_NONE) {
container = curr;
is_fullscreen = true;
break;
Expand Down
3 changes: 1 addition & 2 deletions sway/input/seatop_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
if (cont && is_floating_or_child && !is_fullscreen_or_child &&
state == WLR_BUTTON_PRESSED) {
uint32_t btn_move = config->floating_mod_inverse ? BTN_RIGHT : BTN_LEFT;
if (button == btn_move && state == WLR_BUTTON_PRESSED &&
(mod_pressed || on_titlebar)) {
if (button == btn_move && (mod_pressed || on_titlebar)) {
while (cont->parent) {
cont = cont->parent;
}
Expand Down

0 comments on commit 813e120

Please sign in to comment.