On Wed, Feb 05, 2020 at 10:02:25AM +0100, Julien ROPE wrote: > > Hi Daniel, > > I looked into this, and I'm not sure how to fix it. > > I'm new to GTK. But from what I can tell, there was no way of accessing > Monitor information before GTK 3.22. > > All those APIs that I'm using were introduced in this version, and in > previous documentation on GTK, I find no equivalent. > > If any of you know differently, I'd be happy to be corrected. > > > If that's the case, it means we can't add this feature on platforms with GTK > < 3.22. > > Now I find code here and there in virt-viewer that are protected with "#if > GTK_CHECK_VERSION(...)" statements (cf. virt_viewer_window_enter_fullscreen() > for instance). > > Should I use something like that to make that code available only with GTK > 3.22 and above?
Yes, you can use conditionals like that. You'll need to squash deprecation warnings as that code does too. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|