Minor edits
This commit is contained in:
parent
a9b274eb6c
commit
e049fa4868
7
render.c
7
render.c
@ -129,9 +129,9 @@ void render_frame(struct swaylock_surface *surface) {
|
|||||||
cairo_select_font_face(cairo, state->args.font,
|
cairo_select_font_face(cairo, state->args.font,
|
||||||
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
|
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
|
||||||
if (state->args.font_size > 0) {
|
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 {
|
} else {
|
||||||
cairo_set_font_size(cairo, arc_radius / 3.0f);
|
cairo_set_font_size(cairo, arc_radius / 3.0f);
|
||||||
}
|
}
|
||||||
switch (state->auth_state) {
|
switch (state->auth_state) {
|
||||||
case AUTH_STATE_VALIDATING:
|
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);
|
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)) {
|
(state->args.show_keyboard_layout || num_layout > 1)) {
|
||||||
xkb_layout_index_t curr_layout = 0;
|
xkb_layout_index_t curr_layout = 0;
|
||||||
|
|
||||||
@ -265,7 +265,6 @@ void render_frame(struct swaylock_surface *surface) {
|
|||||||
// border
|
// border
|
||||||
cairo_set_source_u32(cairo, state->args.colors.layout_border);
|
cairo_set_source_u32(cairo, state->args.colors.layout_border);
|
||||||
cairo_stroke(cairo);
|
cairo_stroke(cairo);
|
||||||
cairo_new_sub_path(cairo);
|
|
||||||
|
|
||||||
// take font extents and padding into account
|
// take font extents and padding into account
|
||||||
cairo_move_to(cairo,
|
cairo_move_to(cairo,
|
||||||
|
4
seat.c
4
seat.c
@ -22,7 +22,8 @@ static void keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard,
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
struct xkb_keymap *keymap = xkb_keymap_new_from_string(
|
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);
|
munmap(map_shm, size);
|
||||||
close(fd);
|
close(fd);
|
||||||
assert(keymap);
|
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,
|
state->xkb.control = xkb_state_mod_name_is_active(state->xkb.state,
|
||||||
XKB_MOD_NAME_CTRL,
|
XKB_MOD_NAME_CTRL,
|
||||||
XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LATCHED);
|
XKB_STATE_MODS_DEPRESSED | XKB_STATE_MODS_LATCHED);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void keyboard_repeat_info(void *data, struct wl_keyboard *wl_keyboard,
|
static void keyboard_repeat_info(void *data, struct wl_keyboard *wl_keyboard,
|
||||||
|
Loading…
Reference in New Issue
Block a user