mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
app/internal/window,app/internal/xkb: silence string(int) conversion warnings
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -470,7 +470,7 @@ func (w *window) HWND() (syscall.Handle, int, int) {
|
|||||||
|
|
||||||
func convertKeyCode(code uintptr) (string, bool) {
|
func convertKeyCode(code uintptr) (string, bool) {
|
||||||
if '0' <= code && code <= '9' || 'A' <= code && code <= 'Z' {
|
if '0' <= code && code <= '9' || 'A' <= code && code <= 'Z' {
|
||||||
return string(code), true
|
return string(rune(code)), true
|
||||||
}
|
}
|
||||||
var r string
|
var r string
|
||||||
switch code {
|
switch code {
|
||||||
|
|||||||
@@ -228,10 +228,10 @@ func (x *Context) UpdateMask(depressed, latched, locked, depressedGroup, latched
|
|||||||
|
|
||||||
func convertKeysym(s C.xkb_keysym_t) (string, bool) {
|
func convertKeysym(s C.xkb_keysym_t) (string, bool) {
|
||||||
if 'a' <= s && s <= 'z' {
|
if 'a' <= s && s <= 'z' {
|
||||||
return string(s - 'a' + 'A'), true
|
return string(rune(s - 'a' + 'A')), true
|
||||||
}
|
}
|
||||||
if ' ' <= s && s <= '~' {
|
if ' ' <= s && s <= '~' {
|
||||||
return string(s), true
|
return string(rune(s)), true
|
||||||
}
|
}
|
||||||
var n string
|
var n string
|
||||||
switch s {
|
switch s {
|
||||||
|
|||||||
Reference in New Issue
Block a user