Skip to content

Commit 90f2024

Browse files
authored
Merge branch 'master' into damage-ext-example
2 parents 8fdbcc6 + 64fc9a5 commit 90f2024

File tree

12 files changed

+5529
-23
lines changed

12 files changed

+5529
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ target/
6262

6363
.idea/
6464

65+
/.mypy_cache/

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
NEWS for Python X Library
22

3+
Version 0.25
4+
============
5+
6+
Bug Fixes
7+
---------
8+
9+
- fix increasing memory usage on display instantiation
10+
11+
NV-CONTROL extension
12+
--------------------
13+
14+
- add first implementation by Roberto Leinardi (@leinardi)
15+
16+
---
17+
Version 0.24
18+
============
19+
20+
Bug Fixes
21+
---------
22+
23+
- fix protocol handling: correctly support explicit Unix
24+
connections and fix support fox macOS
25+
- improve Python 3 support: fix events sub-code handling
26+
and possible crashes when unpacking text data
27+
- add support for error handlers to the Composite extension
28+
29+
Misc
30+
----
31+
32+
- fix `xfixes` example
33+
- fix a bunch of typos in the code / documentation
34+
35+
---
336
Version 0.23
437
============
538

Xlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Suite 330,
2020
# Boston, MA 02111-1307 USA
2121

22-
__version__ = (0, 23)
22+
__version__ = (0, 25)
2323

2424
__version_extra__ = ''
2525

Xlib/display.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@
6262
}
6363

6464
class _BaseDisplay(protocol_display.Display):
65-
resource_classes = _resource_baseclasses.copy()
6665

6766
# Implement a cache of atom names, used by Window objects when
6867
# dealing with some ICCCM properties not defined in Xlib.Xatom
6968

7069
def __init__(self, *args, **keys):
70+
self.resource_classes = _resource_baseclasses.copy()
7171
protocol_display.Display.__init__(self, *args, **keys)
7272
self._atom_cache = {}
7373

Xlib/ext/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
('XFIXES', 'xfixes'),
3737
('SECURITY', 'security'),
3838
('XInputExtension', 'xinput'),
39+
('NV-CONTROL', 'nvcontrol'),
3940
('DAMAGE', 'damage'),
4041
]
4142

Xlib/ext/composite.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ class RedirectWindow(rq.Request):
7878
rq.Pad(3),
7979
)
8080

81-
def redirect_window(self, update):
81+
def redirect_window(self, update, onerror = None):
8282
"""Redirect the hierarchy starting at this window to off-screen
8383
storage.
8484
"""
8585
RedirectWindow(display = self.display,
86+
onerror = onerror,
8687
opcode = self.display.get_extension_major(extname),
8788
window = self,
8889
update = update,
@@ -99,11 +100,12 @@ class RedirectSubwindows(rq.Request):
99100
rq.Pad(3),
100101
)
101102

102-
def redirect_subwindows(self, update):
103+
def redirect_subwindows(self, update, onerror = None):
103104
"""Redirect the hierarchies starting at all current and future
104105
children to this window to off-screen storage.
105106
"""
106107
RedirectSubwindows(display = self.display,
108+
onerror = onerror,
107109
opcode = self.display.get_extension_major(extname),
108110
window = self,
109111
update = update,
@@ -120,10 +122,11 @@ class UnredirectWindow(rq.Request):
120122
rq.Pad(3),
121123
)
122124

123-
def unredirect_window(self, update):
125+
def unredirect_window(self, update, onerror = None):
124126
"""Stop redirecting this window hierarchy.
125127
"""
126128
UnredirectWindow(display = self.display,
129+
onerror = onerror,
127130
opcode = self.display.get_extension_major(extname),
128131
window = self,
129132
update = update,
@@ -140,10 +143,11 @@ class UnredirectSubindows(rq.Request):
140143
rq.Pad(3),
141144
)
142145

143-
def unredirect_subwindows(self, update):
146+
def unredirect_subwindows(self, update, onerror = None):
144147
"""Stop redirecting the hierarchies of children to this window.
145148
"""
146149
RedirectWindow(display = self.display,
150+
onerror = onerror,
147151
opcode = self.display.get_extension_major(extname),
148152
window = self,
149153
update = update,
@@ -159,14 +163,15 @@ class CreateRegionFromBorderClip(rq.Request):
159163
rq.Window('window'),
160164
)
161165

162-
def create_region_from_border_clip(self):
166+
def create_region_from_border_clip(self, onerror = None):
163167
"""Create a region of the border clip of the window, i.e. the area
164168
that is not clipped by the parent and any sibling windows.
165169
"""
166170

167171
rid = self.display.allocate_resource_id()
168172
CreateRegionFromBorderClip(
169173
display = self.display,
174+
onerror = onerror,
170175
opcode = self.display.get_extension_major(extname),
171176
region = rid,
172177
window = self,
@@ -185,7 +190,7 @@ class NameWindowPixmap(rq.Request):
185190
rq.Pixmap('pixmap'),
186191
)
187192

188-
def name_window_pixmap(self):
193+
def name_window_pixmap(self, onerror = None):
189194
"""Create a new pixmap that refers to the off-screen storage of
190195
the window, including its border.
191196
@@ -198,6 +203,7 @@ def name_window_pixmap(self):
198203

199204
pid = self.display.allocate_resource_id()
200205
NameWindowPixmap(display = self.display,
206+
onerror = onerror,
201207
opcode = self.display.get_extension_major(extname),
202208
window = self,
203209
pixmap = pid,

0 commit comments

Comments
 (0)