Request ignores changes to properties that don't apply to it

This commit is contained in:
Sasha Koshka 2024-07-11 16:22:48 -04:00
parent f4fadc0d3b
commit e15687c71e

View File

@ -255,6 +255,10 @@ func (request *Request) HandlePropertyNotify (
connection *xgbutil.XUtil, connection *xgbutil.XUtil,
event xevent.PropertyNotifyEvent, event xevent.PropertyNotifyEvent,
) { ) {
// ignore events that don't apply to our window's destination property
if event.Window != request.requestor.Window().Id { return }
if event.Atom != request.destination { return }
// the only valid state that we can process a PropertyNotify event in // the only valid state that we can process a PropertyNotify event in
if request.state != selReqStateAwaitChunk { return } if request.state != selReqStateAwaitChunk { return }
if event.State != xproto.PropertyNewValue { return } if event.State != xproto.PropertyNewValue { return }