mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 00:12:50 -05:00
core: improve evdev capslock detection, wayland context fixes
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
func NewManager(display *wlclient.Display) (*Manager, error) {
|
||||
m := &Manager{
|
||||
display: display,
|
||||
ctx: display.Context(),
|
||||
heads: make(map[uint32]*headState),
|
||||
modes: make(map[uint32]*modeState),
|
||||
cmdq: make(chan cmd, 128),
|
||||
@@ -85,7 +86,6 @@ func (m *Manager) waylandActor() {
|
||||
|
||||
func (m *Manager) setupRegistry() error {
|
||||
log.Info("WlrOutput: starting registry setup")
|
||||
ctx := m.display.Context()
|
||||
|
||||
registry, err := m.display.GetRegistry()
|
||||
if err != nil {
|
||||
@@ -96,7 +96,7 @@ func (m *Manager) setupRegistry() error {
|
||||
registry.SetGlobalHandler(func(e wlclient.RegistryGlobalEvent) {
|
||||
if e.Interface == wlr_output_management.ZwlrOutputManagerV1InterfaceName {
|
||||
log.Infof("WlrOutput: found %s", wlr_output_management.ZwlrOutputManagerV1InterfaceName)
|
||||
manager := wlr_output_management.NewZwlrOutputManagerV1(ctx)
|
||||
manager := wlr_output_management.NewZwlrOutputManagerV1(m.ctx)
|
||||
version := e.Version
|
||||
if version > 4 {
|
||||
version = 4
|
||||
|
||||
@@ -45,6 +45,7 @@ type cmd struct {
|
||||
|
||||
type Manager struct {
|
||||
display *wlclient.Display
|
||||
ctx *wlclient.Context
|
||||
registry *wlclient.Registry
|
||||
manager *wlr_output_management.ZwlrOutputManagerV1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user