summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mouse.py7
-rw-r--r--todo.py9
-rw-r--r--xf86config.py3
3 files changed, 13 insertions, 6 deletions
diff --git a/mouse.py b/mouse.py
index f9d3c9104..94ed8e3fa 100644
--- a/mouse.py
+++ b/mouse.py
@@ -135,11 +135,14 @@ class Mouse (SimpleConfigFile):
def setDevice(self, device):
self.device = device
- def set (self, mouse, emulateThreeButtons, thedev = None):
+ def set (self, mouse, emulateThreeButtons = -1, thedev = None):
(gpm, x11, dev, em) = self.mice[mouse]
self.info["MOUSETYPE"] = gpm
self.info["XMOUSETYPE"] = x11
self.info["FULLNAME"] = mouse
- self.emulate = emulateThreeButtons
+ if emulateThreeButtons != -1:
+ self.emulate = emulateThreeButtons
+ else:
+ self.emu = em
if not self.device and thedev: self.device = thedev
if not self.device: self.device = dev
diff --git a/todo.py b/todo.py
index 342cbc030..9ff2ec748 100644
--- a/todo.py
+++ b/todo.py
@@ -834,13 +834,14 @@ class ToDo:
if (netmask):
dev.set (("netmask", netmask))
- if (todo.instClass.mouse):
- (type, device, emulateThreeButtons) = todo.instClass.mouse
- todo.mouse.set(type, emulateThreeButtons, thedev = device)
-
if (todo.instClass.x):
todo.x = todo.instClass.x
+ if (todo.instClass.mouse):
+ (type, device, emulateThreeButtons) = todo.instClass.mouse
+ todo.mouse.set(type, emulateThreeButtons, thedev = device)
+ todo.x.setMouse(todo.mouse)
+
if todo.instClass.desktop:
todo.desktop.set (todo.instClass.desktop)
diff --git a/xf86config.py b/xf86config.py
index 2add65724..10f282c70 100644
--- a/xf86config.py
+++ b/xf86config.py
@@ -9,6 +9,7 @@ import isys
import time
import os
from kbd import Keyboard
+from mouse import Mouse
def _(x):
return x
@@ -398,6 +399,8 @@ EndSection
"""
def mouseSection (self):
+ if not self.mouse:
+ self.mouse = Mouse(mouseType = ("none", "none", "null"))
return """
# **********************************************************************
# Pointer section