-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repair and complete GTK3 preiview #1
Conversation
the GTK3 preview did not render properly, because it attempted to mimic the GTK2 code too closely - the function which draws to the gdk-pixbuf (the return value of the drawing functions), and its GDK2 counterpart which it replaced, did not have feature-parity - i could not find a replacement which does - some of the features of gdk-pixbuf2 appear to be incompatible with GTK3 the GTK2-compatible function recycled the target gdk-pixbuf, composing the final graphic, layer upon layer, with each call - however, each call to the replacement function for GTK3, clobbered the previous gdk-pixbuf; such that the final graphic represented only the work done in the last call; and so the returned graphic was much smaller than expected instead, this change does the incremental compositing, using cairo drawing surfaces, then finally copies the composite at once, onto the GDK pixbuf which is used by the GTK2 implementation, and returned per the 'preview_menu' and 'preview_window' function contracts)
oh, i should add that the deprecation warnings patch is not the most correct solution - it is much cleaner though, than littering the file with pre-processor switches - thats why ... "code review" |
@bill-auger: There is no need to change As for using e.g. |
ok - i will remove that patch for the compiler warning, and make
it a separate ticket
|
ac0daa8
to
9968731
Compare
I don't know all the rules of the LXDE team, but you better fork for pull requests.
|
Patch by bill-auger, part of his pull request #1.
significant changes:
the bottom commit is the most essential - lxappearance-obconf-gtk3 is broken on any distro with a recent cairo - the obconf plugin causes lxappearance to segfault on launch
the GTK3 implementation of the theme preview appears to have been an incomplete WIP
the GTK3 theme preview did not render properly, because it attempted to mimic the GTK2 code too closely - the function which draws to the gdk-pixbuf (the return value of the drawing functions), and its GDK2 counterpart which it replaced, did not have feature-parity - i could not find a replacement which does - some of the features of gdk-pixbuf2 appear to be incompatible with GTK3
the GTK2-compatible function recycled the target gdk-pixbuf, composing the final graphic, layer upon layer, with each call - however, each call to the replacement function for GTK3, clobbered the previous gdk-pixbuf; such that the final graphic represented only the work done in the last call; and so the returned graphic was much smaller than expected
instead, this change does the incremental compositing, using cairo drawing surfaces, then finally copies the composite at once, onto the GDK pixbuf which is used by the GTK2 implementation, and returned per the 'preview_menu' and 'preview_window' function contracts)