simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Tue Mar 7 23:14:01 GMT 2017
TL;DR:
6422197 Handle deprecation of gtk_menu_popup
8833634 Use CSS to set window backgrounds with GTK+ 3
921afd3 Handle deprecation of gdk_screen_{width,height}
af08a7a Replace deprecated gtk_window_set_wmclass with raw Xlib.
687efc3 Change Cairo image surface type from RGB24 to ARGB32.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2017-03-07 23:14:01
commit 64221972c0de91d01e73ce90d3fa47acf4808bfa
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=64221972c0de91d01e73ce90d3fa47acf4808bfa;hp=2d0b2e97d00c5ca08a6cbd4a7d724b41e1222514
Author: Colin Watson <cjwatson at debian.org>
Date: Sun Mar 5 21:41:21 2017 +0000
Handle deprecation of gtk_menu_popup
GTK+ 3.22 deprecates gtk_menu_popup in favour of various
gtk_menu_popup_at_* functions. gtk_menu_popup_at_pointer seems most
appropriate, but that requires being able to pass it a GdkEvent rather
than just some elements of it. In order to achieve that, I've
rearranged the scroll_event shim to construct a real GdkEventButton and
pass that down to button_internal.
unix/gtkwin.c | 63 +++++++++++++++++++++++++++++++++++++----------------------
1 file changed, 40 insertions(+), 23 deletions(-)
commit 8833634f4756ea0936d6f191d1b0643529ee03db
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8833634f4756ea0936d6f191d1b0643529ee03db;hp=64221972c0de91d01e73ce90d3fa47acf4808bfa
Author: Colin Watson <cjwatson at debian.org>
Date: Sun Mar 5 21:45:04 2017 +0000
Use CSS to set window backgrounds with GTK+ 3
gdk_window_set_background was already deprecated, but with GTK+ 3.22
even gdk_window_set_background_rgba is deprecated, so we need a better
approach. The best seems to be to go with the flow and inject a custom
CSS style for the appropriate widgets.
unix/gtkwin.c | 40 +++++++++++++++++++++++++++-------------
1 file changed, 27 insertions(+), 13 deletions(-)
commit 921afd3716859b2cdbb84478b08e59fd9465e8a7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=921afd3716859b2cdbb84478b08e59fd9465e8a7;hp=8833634f4756ea0936d6f191d1b0643529ee03db
Author: Colin Watson <cjwatson at debian.org>
Date: Sun Mar 5 21:46:53 2017 +0000
Handle deprecation of gdk_screen_{width,height}
GTK+ 3.22 deprecates gdk_screen_{width,height} on the grounds that the
"screen" here actually refers to a virtual screen that may span multiple
monitors, and applications should generally be considering the width and
height of individual monitors. It's not entirely clear to me how this
fits with X geometry specifications, but I've gone with trying to get
hold of the geometry of the monitor that the window in question is on.
unix/gtkwin.c | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
commit af08a7a3b15ea4d8cb10d52465f52ba9633e5ec2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=af08a7a3b15ea4d8cb10d52465f52ba9633e5ec2;hp=921afd3716859b2cdbb84478b08e59fd9465e8a7
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Mar 7 22:57:42 2017 +0000
Replace deprecated gtk_window_set_wmclass with raw Xlib.
Calling gtk_widget_realize to enforce the existence of an underlying
GdkWindow, followed by gdk_window_ensure_native to enforce an
underlying X window in turn, allows me to get hold of an X window id
on which I can call the Xlib function for setting WM_CLASS, still
before the window is mapped.
With this change, plus Colin's preceding patches, the whole code base
_actually_ compiles and links against GTK 3.22 without any deprecation
warnings. (My claim in commit 8ce237234 that it previously did appears
to have been completely wrong - my guess is that I'd forgotten to
'make clean' before testing against 3.22 and so some source files had
already been compiled against earlier GTK headers.)
unix/gtkwin.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
commit 687efc3a5da1fb85c86a3c871b00a7234b97c2e9
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=687efc3a5da1fb85c86a3c871b00a7234b97c2e9;hp=af08a7a3b15ea4d8cb10d52465f52ba9633e5ec2
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Mar 7 22:57:54 2017 +0000
Change Cairo image surface type from RGB24 to ARGB32.
This seems to work around a GTK 3.22 display bug that Colin Watson and
I have both observed on Ubuntu (though I found that proxying the X
server, e.g. by SSH X forwarding or xtruss, inhibited the bug). The
effect of the bug was that the terminal window would appear completely
black and nothing would ever be displayed in it, though the terminal
session was still actually running and keystrokes would be sent to it.
But changing the call to cairo_set_source_surface() to some other
cairo_set_source_foo caused successful drawing of whatever other
source I selected; the problem seemed specific to the image surface.
Also, when I popped up the Ctrl-right-click menu over the terminal
window, the menu didn't disappear when dismissed, i.e. the drawing
area's redraw operation was not drawing in black, but failing to draw
_anything_.
That led me to hypothesise that the draw event handler for the
terminal drawing area might somehow be accidentally inventing 0 rather
than 255 for the implicit alpha channel when using our RGB-type image
surface as a source; so I tried setting the surface type to one with
an explicit alpha channel in the hope that there would no longer be a
need to make up any alpha value at all. And indeed, that seems to
solve the problem for me, so I might as well commit it.
However, I don't know the full details of what the previous problem
was, so this is only an empirical workaround. If it turns out I was
making some other mistake without which a RGB source surface would
have worked for me, then I should probably revert this and do whatever
other fix turns out to be a better plan.
unix/gtkwin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the tartarus-commits
mailing list