mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
core/wayland: thread-safety meta fixes + cleanups + hypr workaround
- fork go-wayland/client and modify to make it thread-safe internally - use sync.Map and atomic values in many places to cut down on mutex boilerplate - do not create extworkspace client unless explicitly requested
This commit is contained in:
33
core/pkg/go-wayland/wayland/client/common.go
Normal file
33
core/pkg/go-wayland/wayland/client/common.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package client
|
||||
|
||||
type Dispatcher interface {
|
||||
Dispatch(opcode uint32, fd int, data []byte)
|
||||
}
|
||||
|
||||
type Proxy interface {
|
||||
Context() *Context
|
||||
SetContext(ctx *Context)
|
||||
ID() uint32
|
||||
SetID(id uint32)
|
||||
}
|
||||
|
||||
type BaseProxy struct {
|
||||
ctx *Context
|
||||
id uint32
|
||||
}
|
||||
|
||||
func (p *BaseProxy) ID() uint32 {
|
||||
return p.id
|
||||
}
|
||||
|
||||
func (p *BaseProxy) SetID(id uint32) {
|
||||
p.id = id
|
||||
}
|
||||
|
||||
func (p *BaseProxy) Context() *Context {
|
||||
return p.ctx
|
||||
}
|
||||
|
||||
func (p *BaseProxy) SetContext(ctx *Context) {
|
||||
p.ctx = ctx
|
||||
}
|
||||
Reference in New Issue
Block a user