linuxdeepin / developer-center

Deepin developer center, provide developer wiki and community forum.
445 stars 71 forks source link

The function is3DWM() should include deepin-kwin #2551

Open joeky888 opened 4 years ago

joeky888 commented 4 years ago

The command wmctrl -m gave me

$ wmctrl -m
Name: KWin
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: N/A

and the command QT_QPA_PLATFORMTHEME=deepin dde-control-center -s gave me

[Debug] [0] DSwitchButton::clicked: true ,m_model->is3DWm(): false

whenever I try to enable the "Window Effect" option.

So If I understand correctly, I guess the function is3DWM() in https://github.com/linuxdeepin/dde-daemon/blob/master/dock/dock_manager_init.go

Should include deepin-kwin.

func (m *Manager) is3DWM() (ret bool) {
    m.PropsMu.Lock()

    if m.wmName == "" {
        var err error
        m.wmName, err = m.wmSwitcher.CurrentWM(0)
        if err != nil {
            logger.Warning("failed to get wmSwitcher.CurrentWM:", err)
        }
    }
    if m.wmName == "deepin wm"  { // <---------- Here
        ret = true
    }

    m.PropsMu.Unlock()
    return
}
justforlxz commented 2 years ago

OK, I'll check the problem here.

Decodetalkers commented 1 year ago

m_model->is3DWm(): false show the previous state of DWM, not the changed one . is3DWM is if the wm has opened the special effects, if opened the effects, it is true, else ,it is false

Decodetalkers commented 1 year ago

And the wmname, emm ,it is from the dbus, and ... it is the tears of histroy