Commit 387671b3 authored by Adrien Plazas's avatar Adrien Plazas
Browse files

Rename the Logo key to the Super Key

This matches how it is typically called on free desktops.
parent b8d36855
......@@ -98,7 +98,7 @@ enum key_modifier_type {
modifier_shift = 1,
modifier_capslock = 2,
modifier_ctrl = 4,
modifier_logo = 64,
modifier_super = 64,
modifier_altgr = 128,
};
......@@ -115,7 +115,7 @@ enum key_type {
keytype_arrow_right,
keytype_arrow_down,
keytype_ctrl,
keytype_logo,
keytype_super,
keytype_esc,
};
......@@ -183,7 +183,7 @@ static const struct key normal_keys[] = {
{ keytype_esc, "esc", "esc", "esc", NULL, KEY_ESC, 1},
{ keytype_ctrl, "Ctrl", "Ctrl", "Ctrl", NULL, 0, 2},
{ keytype_logo, "Logo", "Logo", "Logo", NULL, 0, 2},
{ keytype_super, "Super", "Super", "Super", NULL, 0, 2},
{ keytype_space, "", "", "", NULL, 0, 3},
{ keytype_arrow_up, "↑", "↑", "↑", NULL, 0, 1},
{ keytype_arrow_left, "←", "←", "←", NULL, 0, 1},
......@@ -373,7 +373,7 @@ struct keyboard {
enum keyboard_state state;
bool ctrl_on;
bool logo_on;
bool super_on;
uint32_t scale; // output scale
double width; // width in output units
......@@ -446,7 +446,7 @@ draw_key(struct keyboard *keyboard, const struct key *key, cairo_t *cr,
cairo_clip(cr);
if ((key->key_type == keytype_ctrl && keyboard->ctrl_on) ||
(key->key_type == keytype_logo && keyboard->logo_on)) {
(key->key_type == keytype_super && keyboard->super_on)) {
cairo_rectangle(cr,
col * key_width, row * key_height,
key->width * key_width, key_height);
......@@ -683,7 +683,7 @@ append(char *s1, const char *s2)
static void keyboard_update_mods(struct keyboard *keyboard) {
unsigned mods = keyboard->ctrl_on ? modifier_ctrl : modifier_none;
mods |= keyboard->logo_on ? modifier_logo : modifier_none;
mods |= keyboard->super_on ? modifier_super : modifier_none;
unsigned locked = 0;
switch(keyboard->state) {
case KEYBOARD_STATE_DEFAULT:
......@@ -726,7 +726,7 @@ keyboard_handle_key(struct keyboard *keyboard, const struct layout *layout,
case keytype_default:
if (!keyboard->keyboard->current.active
|| keyboard->ctrl_on
|| keyboard->logo_on) {
|| keyboard->super_on) {
zwp_virtual_keyboard_v1_key(keyboard->keyboard->virtual_keyboard,
time, key->keycode, key_state);
break;
......@@ -744,7 +744,7 @@ keyboard_handle_key(struct keyboard *keyboard, const struct layout *layout,
|| (strlen(keyboard->keyboard->preedit_string) == 0
&& strlen(keyboard->keyboard->current.surrounding_text) == 0)
|| keyboard->ctrl_on
|| keyboard->logo_on) {
|| keyboard->super_on) {
zwp_virtual_keyboard_v1_key(keyboard->keyboard->virtual_keyboard,
time,
KEY_BACKSPACE, key_state);
......@@ -774,7 +774,7 @@ keyboard_handle_key(struct keyboard *keyboard, const struct layout *layout,
case keytype_space:
if (!keyboard->keyboard->current.active
|| keyboard->ctrl_on
|| keyboard->logo_on) {
|| keyboard->super_on) {
zwp_virtual_keyboard_v1_key(keyboard->keyboard->virtual_keyboard,
time, KEY_SPACE, key_state);
break;
......@@ -871,10 +871,10 @@ keyboard_handle_key(struct keyboard *keyboard, const struct layout *layout,
keyboard->ctrl_on ^= true;
keyboard_update_mods(keyboard);
break;
case keytype_logo:
case keytype_super:
if (state != WL_POINTER_BUTTON_STATE_PRESSED)
break;
keyboard->logo_on ^= true;
keyboard->super_on ^= true;
keyboard_update_mods(keyboard);
break;
default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment