Code Monkey home page Code Monkey logo

Comments (8)

tb2097 avatar tb2097 commented on June 8, 2024

It'll take a little bit of time but I think I'd prefer to redo this chunk of code using MapToOutput. The transform matrix method is horribly kludgy but at the time I wrote it originally MapToOutput wasn't an option. It will also allow me to properly support more than 2 monitors but this might take a bit to test/flesh out properly.

from wacom-gui.

tb2097 avatar tb2097 commented on June 8, 2024

New release posted. It uses display order in accordance to how it is detected by the OS so if someone puts their displays in an odd order it might jump around. However, it should map correctly to any screen layout. Please test if this works better for you:
https://github.com/tb2097/wacom-gui/releases/tag/V0.1.10

from wacom-gui.

jcpearson avatar jcpearson commented on June 8, 2024

Fails if you only have one monitor:

Traceback (most recent call last):
  File "wacom-gui.py", line 249, in <module>
    main()    
  File "wacom-gui.py", line 182, in main
    window = WacomGui()
  File "wacom-gui.py", line 23, in __init__
    self.initUI()
  File "wacom-gui.py", line 32, in initUI
    self.options       = otherOptions(self.pad.Tablet.Name)
  File "/tmp/wacom-gui-master/wacom-gui/options.py", line 14, in __init__
    self.initUI()
  File "/tmp/wacom-gui-master/wacom-gui/options.py", line 32, in initUI
    self.getCurrentScreen()
  File "/tmp/wacom-gui-master/wacom-gui/options.py", line 234, in getCurrentScreen
    self.screenLeft.enabled = False 
AttributeError: 'otherOptions' object has no attribute 'screenLeft'

I believe the following patch fixes this:

--- options.py.dist     2018-05-09 20:29:53.000000000 +0100
+++ options.py  2018-05-10 15:15:25.578078059 +0100
@@ -230,14 +230,8 @@ class otherOptions(QtGui.QWidget):
 
     def getCurrentScreen(self):
         # check if we actually have more that 1 screen
-        if QtGui.QDesktopWidget().numScreens() < 2 or QtGui.QDesktopWidget().numScreens() > 2:
-            self.screenLeft.enabled = False 
-            self.screenRight.enabled = False 
-            self.screenFull.enabled = False 
-            if QtGui.QDesktopWidget().numScreens() > 2:
-                print "More that 2 monitors; this isn't available yet.  Disabling tablet area option"
+        if QtGui.QDesktopWidget().numScreens() > 1:
         # set correct check box for active area... if it is valid
-        else:
             self.getTabletArea()
     
     def setDevices(self, devices):

Otherwise, appears to work - although I don't have access to a machine with more than 2 monitors to see it that works OK (works with 2 monitors)

from wacom-gui.

tb2097 avatar tb2097 commented on June 8, 2024

Patch implemented. I only tested the 2/3 screen setup, which is why I missed the legacy code that should've been removed. Please verify the new release is working as intended.

from wacom-gui.

jcpearson avatar jcpearson commented on June 8, 2024

Still fails :-)

Traceback (most recent call last):
  File "wacom-gui.py", line 249, in <module>
    main()    
  File "wacom-gui.py", line 182, in main
    window = WacomGui()
  File "wacom-gui.py", line 23, in __init__
    self.initUI()
  File "wacom-gui.py", line 32, in initUI
    self.options       = otherOptions(self.pad.Tablet.Name)
  File "/usr/local/wacom-gui/options.py", line 13, in __init__
    self.initUI()
  File "/usr/local/wacom-gui/options.py", line 29, in initUI
    self.getCurrentScreen()
  File "/usr/local/wacom-gui/options.py", line 167, in getCurrentScreen
    self.screenFull.enabled = False
AttributeError: 'otherOptions' object has no attribute 'screenFull'

The issue is that self.screenFull is not defined when there is only one monitor - as screenOptions() does:

    def screenOptions(self):
        if QtGui.QDesktopWidget().numScreens() == 1:
            return None

i.e. returns None before self.screenFull is set up ...

from wacom-gui.

tb2097 avatar tb2097 commented on June 8, 2024

nuked getCurrentScreen() function and just call getTabletArea() if multiple screens are detected (I really need to do a proper code cleanup...). Replaced the downloads on the latest release as it was a very minor change.

from wacom-gui.

jcpearson avatar jcpearson commented on June 8, 2024

Thanks - that appears to work OK with one monitor

from wacom-gui.

tb2097 avatar tb2097 commented on June 8, 2024

Closing issue

from wacom-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.