mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
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.
This commit is contained in:
parent
af08a7a3b1
commit
687efc3a5d
@ -524,7 +524,7 @@ gint configure_area(GtkWidget *widget, GdkEventConfigure *event, gpointer data)
|
|||||||
inst->surface = NULL;
|
inst->surface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
inst->surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24,
|
inst->surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
|
||||||
backing_w, backing_h);
|
backing_w, backing_h);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user