Minor edits

This commit is contained in:
Abdelhakim Qbaich 2019-06-13 17:17:55 -04:00 committed by Simon Ser
parent a9b274eb6c
commit e049fa4868
2 changed files with 5 additions and 6 deletions

View File

@ -129,9 +129,9 @@ void render_frame(struct swaylock_surface *surface) {
cairo_select_font_face(cairo, state->args.font,
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
if (state->args.font_size > 0) {
cairo_set_font_size(cairo, state->args.font_size);
cairo_set_font_size(cairo, state->args.font_size);
} else {
cairo_set_font_size(cairo, arc_radius / 3.0f);
cairo_set_font_size(cairo, arc_radius / 3.0f);
}
switch (state->auth_state) {
case AUTH_STATE_VALIDATING:
@ -160,7 +160,7 @@ void render_frame(struct swaylock_surface *surface) {
}
xkb_layout_index_t num_layout = xkb_keymap_num_layouts(state->xkb.keymap);
if (!state->args.hide_keyboard_layout &&
if (!state->args.hide_keyboard_layout &&
(state->args.show_keyboard_layout || num_layout > 1)) {
xkb_layout_index_t curr_layout = 0;
@ -265,7 +265,6 @@ void render_frame(struct swaylock_surface *surface) {
// border
cairo_set_source_u32(cairo, state->args.colors.layout_border);
cairo_stroke(cairo);
cairo_new_sub_path(cairo);
// take font extents and padding into account
cairo_move_to(cairo,

4
seat.c
View File

@ -22,7 +22,8 @@ static void keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard,
exit(1);
}
struct xkb_keymap *keymap = xkb_keymap_new_from_string(
state->xkb.context, map_shm, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
state->xkb.context, map_shm, XKB_KEYMAP_FORMAT_TEXT_V1,
XKB_KEYMAP_COMPILE_NO_FLAGS);
munmap(map_shm, size);
close(fd);
assert(keymap);
@ -72,7 +73,6 @@ static void keyboard_modifiers(void *data, struct wl_keyboard *wl_keyboard,
state->xkb.control = xkb_state_mod_name_is_active(state->xkb.state,
XKB_MOD_NAME_CTRL,
XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LATCHED);
}
static void keyboard_repeat_info(void *data, struct wl_keyboard *wl_keyboard,