[Python-apps-team] Bug#844505: Fix for 844505

Rami, Elias elias.rami at unwired.at
Sat Jan 14 19:38:40 UTC 2017


Hello,

because disper stopped working for me, i did this to get it back to work
like a charm again

best regards,
-- 
_____________________________________________________
Elias RAMI                                         Unwired Networks GmbH
Support & Technik                                     Tel: +436608377160
elias.rami at unwired.at                                       www.unwired.at
Gonzagagasse 11/25                                 1010 Vienna, Austria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20170114/5c54948f/attachment-0001.html>
-------------- next part --------------
diff -Nru disper-0.3.1/debian/changelog disper-0.3.1/debian/changelog
--- disper-0.3.1/debian/changelog	2014-10-16 09:23:03.000000000 +0200
+++ disper-0.3.1/debian/changelog	2017-01-14 20:24:09.000000000 +0100
@@ -1,3 +1,10 @@
+disper (0.3.1-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Bugfix for #844505 which made disper unusable for me
+
+ -- Elias Rami <elias.rami at unwired.at>  Sat, 14 Jan 2017 20:24:09 +0100
+
 disper (0.3.1-2) unstable; urgency=medium
 
   * Move maintainership of package to the Python Applications Packaging Team
diff -Nru disper-0.3.1/debian/patches/fix-844505 disper-0.3.1/debian/patches/fix-844505
--- disper-0.3.1/debian/patches/fix-844505	1970-01-01 01:00:00.000000000 +0100
+++ disper-0.3.1/debian/patches/fix-844505	2017-01-14 20:24:09.000000000 +0100
@@ -0,0 +1,71 @@
+Description: Load 2 Libarys and define return types
+
+ load libXrandr.so.2 and libX11.so.6 and define
+ xopendisplay = xlib.XOpenDisplay and
+ xrrqueryversion = rr.XRRQueryVersion
+
+ disper (0.3.1-2.1) UNRELEASED; urgency=medium
+ .
+   * Non-maintainer upload.
+   * Bugfix for #844505 which made disper unusable for me
+Author: Elias Rami <elias.rami at unwired.at>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: debian/strech disper 0.3.1-2 http://http.debian.net/debian/pool/main/d/disper/disper_0.3.1-2.dsc
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844505
+Forwarded: <no>
+Last-Update: 2017-01-14
+
+--- disper-0.3.1.orig/src/xrandr/__init__.py
++++ disper-0.3.1/src/xrandr/__init__.py
+@@ -41,6 +41,19 @@ __status__ = "development"
+ from ctypes import *
+ import os
+ 
++class Display(Structure):
++    pass
++
++xlib = cdll.LoadLibrary("libX11.so.6")
++rr = cdll.LoadLibrary("libXrandr.so.2")
++
++xopendisplay = xlib.XOpenDisplay
++xopendisplay.restype = POINTER(Display)
++xopendisplay.argtypes = [c_char_p]
++
++xrrqueryversion = rr.XRRQueryVersion
++xrrqueryversion.restype = c_int
++xrrqueryversion.argtypes = [POINTER(Display), POINTER(c_int), POINTER(c_int)]
+ 
+ RR_ROTATE_0 = 1
+ RR_ROTATE_90 = 2
+@@ -86,7 +99,7 @@ from core import Screen, xlib, rr
+ def get_current_display():
+     """Returns the currently used display"""
+     display_url = os.getenv("DISPLAY")
+-    dpy = xlib.XOpenDisplay(display_url)
++    dpy = xopendisplay(display_url)
+     return dpy
+ 
+ def get_current_screen():
+@@ -98,7 +111,7 @@ def get_current_screen():
+ 
+ def get_screen_of_display(display, count):
+     """Returns the screen of the given display"""
+-    dpy = xlib.XOpenDisplay(display)
++    dpy = xopendisplay(display)
+     return Screen(dpy, count)
+ 
+ def get_version():
+@@ -108,7 +121,7 @@ def get_version():
+     minor = c_int()
+     dpy = get_current_display()
+     if not dpy: return None
+-    res = core.rr.XRRQueryVersion(dpy, byref(major), byref(minor))
++    res = xrrqueryversion(dpy, byref(major), byref(minor))
+     if res:
+         return (major.value, minor.value)
+     return None
diff -Nru disper-0.3.1/debian/patches/series disper-0.3.1/debian/patches/series
--- disper-0.3.1/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ disper-0.3.1/debian/patches/series	2017-01-14 20:24:09.000000000 +0100
@@ -0,0 +1 @@
+fix-844505


More information about the Python-apps-team mailing list