Esempio n. 1
0
func Stop() {
	if dockProperty != nil {
		dockProperty.destroy()
		dockProperty = nil
	}

	if dockedAppManager != nil {
		dockedAppManager.destroy()
		dockedAppManager = nil
	}

	if region != nil {
		region.destroy()
		region = nil
	}

	if setting != nil {
		setting.destroy()
		setting = nil
	}

	if hideModemanager != nil {
		hideModemanager.destroy()
		hideModemanager = nil
	}

	if entryProxyerManager != nil {
		entryProxyerManager.destroy()
		entryProxyerManager = nil
	}

	if mouseArea != nil {
		mouseArea.destroy()
		xmousearea.DestroyXMouseArea(areaImp)
		mouseArea = nil
	}

	if dpy != nil {
		display.DestroyDisplay(dpy)
		dpy = nil
	}

	if XU != nil {
		XU.Conn().Close()
		XU = nil
	}

	if TrayXU != nil {
		TrayXU.Conn().Close()
		TrayXU = nil
	}

	logger.EndTracing()
}
Esempio n. 2
0
func finalizeDBusIFC() {
	if dspObj != nil {
		libdsp.DestroyDisplay(dspObj)
		dspObj = nil
	}

	if areaObj != nil {
		libarea.DestroyXMouseArea(areaObj)
		areaObj = nil
	}

	if launchObj != nil {
		launcher.DestroyLauncher(launchObj)
		launchObj = nil
	}
}
Esempio n. 3
0
func (*Power) handleIdleOff() {
	for _, c := range stopAnimation {
		close(c)
	}
	stopAnimation = nil

	dpmsOn()
	dp, _ := display.NewDisplay("com.deepin.daemon.Display", "/com/deepin/daemon/Display")
	defer display.DestroyDisplay(dp)
	for _, p := range dp.Monitors.Get() {
		m, _ := display.NewMonitor("com.deepin.daemon.Display", p)
		defer display.DestroyMonitor(m)
		for _, name := range m.Outputs.Get() {
			dp.ResetBrightness(name)
		}
	}
}