mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
app/internal/window: use unsafe pointer to array
Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
This commit is contained in:
committed by
Elias Naur
parent
e9a75cc22a
commit
feb93baee0
@@ -459,7 +459,7 @@ func (h *x11EventHandler) handleEvents() bool {
|
|||||||
case w.atoms.targets:
|
case w.atoms.targets:
|
||||||
// The requestor wants the supported clipboard
|
// The requestor wants the supported clipboard
|
||||||
// formats. First write the targets...
|
// formats. First write the targets...
|
||||||
formats := []C.long{
|
formats := [...]C.long{
|
||||||
C.long(w.atoms.targets),
|
C.long(w.atoms.targets),
|
||||||
C.long(w.atoms.utf8string),
|
C.long(w.atoms.utf8string),
|
||||||
C.long(w.atoms.plaintext),
|
C.long(w.atoms.plaintext),
|
||||||
@@ -468,7 +468,7 @@ func (h *x11EventHandler) handleEvents() bool {
|
|||||||
}
|
}
|
||||||
C.XChangeProperty(w.x, cevt.requestor, cevt.property, w.atoms.atom,
|
C.XChangeProperty(w.x, cevt.requestor, cevt.property, w.atoms.atom,
|
||||||
32 /* bitwidth of formats */, C.PropModeReplace,
|
32 /* bitwidth of formats */, C.PropModeReplace,
|
||||||
(*C.uchar)(unsafe.Pointer(&formats[0])), C.int(len(formats)),
|
(*C.uchar)(unsafe.Pointer(&formats)), C.int(len(formats)),
|
||||||
)
|
)
|
||||||
// ...then notify the requestor.
|
// ...then notify the requestor.
|
||||||
notify()
|
notify()
|
||||||
|
|||||||
Reference in New Issue
Block a user