Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion 4 new revisions pushed by andreas....@gmail.com on 2012-08-03 19:07 GMT

Received: by 10.58.128.198 with SMTP id nq6mr846109veb.4.1344020882359;
        Fri, 03 Aug 2012 12:08:02 -0700 (PDT)
X-BeenThere: pyglet-commits@googlegroups.com
Received: by 10.220.119.137 with SMTP id z9ls3532618vcq.2.gmail; Fri, 03 Aug
 2012 12:08:01 -0700 (PDT)
Received: by 10.58.2.40 with SMTP id 8mr469132ver.14.1344020881771;
        Fri, 03 Aug 2012 12:08:01 -0700 (PDT)
Received: by 10.58.2.40 with SMTP id 8mr469131ver.14.1344020881761;
        Fri, 03 Aug 2012 12:08:01 -0700 (PDT)
Return-Path: <3kSEcUAYODso5Ew1u9w44w1us4tu.s425Ew1u9-s422y98w44w1uw74A58....@codesite.bounces.google.com>
Received: from mail-vb0-f75.google.com (mail-vb0-f75.google.com [209.85.212.75])
        by gmr-mx.google.com with ESMTPS id c10si682511vdu.1.2012.08.03.12.08.01
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 03 Aug 2012 12:08:01 -0700 (PDT)
Received-SPF: pass (google.com: domain of 3kSEcUAYODso5Ew1u9w44w1us4tu.s425Ew1u9-s422y98w44w1uw74A58....@codesite.bounces.google.com designates 209.85.212.75 as permitted sender) client-ip=209.85.212.75;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of 3kSEcUAYODso5Ew1u9w44w1us4tu.s425Ew1u9-s422y98w44w1uw74A58....@codesite.bounces.google.com designates 209.85.212.75 as permitted sender) smtp.mail=3kSEcUAYODso5Ew1u9w44w1us4tu.s425Ew1u9-s422y98w44w1uw74A58....@codesite.bounces.google.com
Received: by vbbfn1 with SMTP id fn1so5216vbb.0
        for <pyglet-commits@googlegroups.com>; Fri, 03 Aug 2012 12:08:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.224.219.205 with SMTP id hv13mr1462353qab.5.1344020881596;
 Fri, 03 Aug 2012 12:08:01 -0700 (PDT)
X-Generated-By: Google Code
Message-ID: <20cf3074d53e37e39b04c6613fd2@google.com>
Date: Fri, 03 Aug 2012 19:08:01 +0000
Subject: [pyglet] 4 new revisions pushed by andreas....@gmail.com on
 2012-08-03 19:07 GMT
From: pyg...@googlecode.com
To: pyglet-commits@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes

4 new revisions:

Revision: 366115f05fe5
Author:   Andre D <an...@andred.ca>
Date:     Sun Jul 22 23:59:36 2012
Log:      Fixed lib.py failing in python3
http://code.google.com/p/pyglet/source/detail?r=366115f05fe5

Revision: 20fec3d828ee
Author:   Andre D <an...@andred.ca>
Date:     Sun Jul 22 22:55:17 2012
Log:      Corrected X11 resize
http://code.google.com/p/pyglet/source/detail?r=20fec3d828ee

Revision: e361f696b159
Author:   Andre D <an...@andred.ca>
Date:     Thu Jul 26 18:49:00 2012
Log:      Update view size on map
http://code.google.com/p/pyglet/source/detail?r=e361f696b159

Revision: 37270a64e461
Author:   Andre D <an...@andred.ca>
Date:     Thu Jul 26 19:47:51 2012
Log:      Fixed set_location() being incorrect in tiling (non-reparenting)  
windo...
http://code.google.com/p/pyglet/source/detail?r=37270a64e461

==============================================================================
Revision: 366115f05fe5
Author:   Andre D <an...@andred.ca>
Date:     Sun Jul 22 23:59:36 2012
Log:      Fixed lib.py failing in python3
http://code.google.com/p/pyglet/source/detail?r=366115f05fe5

Modified:
  /pyglet/lib.py

=======================================
--- /pyglet/lib.py	Sat Jun 16 09:49:26 2012
+++ /pyglet/lib.py	Sun Jul 22 23:59:36 2012
@@ -115,9 +115,9 @@
                      lib = _TraceLibrary(lib)
                  return lib
              except OSError, o:
-                if ((self.linux_not_found_error not in o.message) and
-                    (self.darwin_not_found_error not in o.message)):
-                    print "Unexpected error loading library %s: %s" %  
(name, o.message)
+                if ((self.linux_not_found_error not in o.args[0]) and
+                    (self.darwin_not_found_error not in o.args[0])):
+                    print "Unexpected error loading library %s: %s" %  
(name, o.args[0])
                      raise
                  path = self.find_library(name)
                  if path:

==============================================================================
Revision: 20fec3d828ee
Author:   Andre D <an...@andred.ca>
Date:     Sun Jul 22 22:55:17 2012
Log:      Corrected X11 resize
http://code.google.com/p/pyglet/source/detail?r=20fec3d828ee

Modified:
  /pyglet/window/xlib/__init__.py

=======================================
--- /pyglet/window/xlib/__init__.py	Wed Apr 25 13:37:41 2012
+++ /pyglet/window/xlib/__init__.py	Sun Jul 22 22:55:17 2012
@@ -1225,9 +1225,9 @@
          w, h = ev.xconfigure.width, ev.xconfigure.height
          x, y = ev.xconfigure.x, ev.xconfigure.y
          if self._width != w or self._height != h:
-            self._update_view_size()
              self._width = w
              self._height = h
+            self._update_view_size()
              self._needs_resize = True
          if self._x != x or self._y != y:
              self.dispatch_event('on_move', x, y)

==============================================================================
Revision: e361f696b159
Author:   Andre D <an...@andred.ca>
Date:     Thu Jul 26 18:49:00 2012
Log:      Update view size on map
http://code.google.com/p/pyglet/source/detail?r=e361f696b159

Modified:
  /pyglet/window/xlib/__init__.py

=======================================
--- /pyglet/window/xlib/__init__.py	Sun Jul 22 22:55:17 2012
+++ /pyglet/window/xlib/__init__.py	Thu Jul 26 18:49:00 2012
@@ -403,7 +403,9 @@
          if self._override_redirect:
              # Possibly an override_redirect issue.
              self.activate()
-
+
+        self._update_view_size()
+
          self.dispatch_event('on_resize', self._width, self._height)
          self.dispatch_event('on_show')
          self.dispatch_event('on_expose')

==============================================================================
Revision: 37270a64e461
Author:   Andre D <an...@andred.ca>
Date:     Thu Jul 26 19:47:51 2012
Log:      Fixed set_location() being incorrect in tiling (non-reparenting)  
window managers
http://code.google.com/p/pyglet/source/detail?r=37270a64e461

Modified:
  /pyglet/window/xlib/__init__.py

=======================================
--- /pyglet/window/xlib/__init__.py	Thu Jul 26 18:49:00 2012
+++ /pyglet/window/xlib/__init__.py	Thu Jul 26 19:47:51 2012
@@ -433,6 +433,18 @@
                                    byref(attributes))
          return attributes.root

+    def _is_reparented(self):
+        root = c_ulong()
+        parent = c_ulong()
+        children = pointer(c_ulong())
+        n_children = c_uint()
+
+        xlib.XQueryTree(self._x_display, self._window,
+                        byref(root), byref(parent), byref(children),
+                        byref(n_children))
+
+        return root.value != parent.value
+
      def close(self):
          if not self._window:
              return
@@ -506,16 +518,17 @@
          return self._width, self._height

      def set_location(self, x, y):
-        # Assume the window manager has reparented our top-level window
-        # only once, in which case attributes.x/y give the offset from
-        # the frame to the content window.  Better solution would be
-        # to use _NET_FRAME_EXTENTS, where supported.
-        attributes = xlib.XWindowAttributes()
-        xlib.XGetWindowAttributes(self._x_display, self._window,
-                                  byref(attributes))
-        # XXX at least under KDE's WM these attrs are both 0
-        x -= attributes.x
-        y -= attributes.y
+        if self._is_reparented():
+            # Assume the window manager has reparented our top-level window
+            # only once, in which case attributes.x/y give the offset from
+            # the frame to the content window.  Better solution would be
+            # to use _NET_FRAME_EXTENTS, where supported.
+            attributes = xlib.XWindowAttributes()
+            xlib.XGetWindowAttributes(self._x_display, self._window,
+                                      byref(attributes))
+            # XXX at least under KDE's WM these attrs are both 0
+            x -= attributes.x
+            y -= attributes.y
          xlib.XMoveWindow(self._x_display, self._window, x, y)

      def get_location(self):