Drawing and mouse in GTK HiDPI aware app (Xorg/Wayland)
- From: Giovanni Panozzo <giovanni panozzo it>
- To: gtk-app-devel-list gnome org
- Subject: Drawing and mouse in GTK HiDPI aware app (Xorg/Wayland)
- Date: Tue, 26 Sep 2017 14:47:33 +0200
Hello,
my GTK application draws some bitmaps on a GtkDrawingArea, and receives
mouse position events from the same widget (or its container widget).
The application is running in a 2x HiDPI scaled desktop, so when the
GtkDrawingArea has a logical size of WxH pixel, it's really taking
2*Wx2*H pixels on the physical screen.
In this situation I can see that both cairo_*() coordinates and
GtkEventMotion/GtkEventButton mouse events for the widgets are all
scaled 2x, so I can have compatibility with unscaled displays. Good.
But now I would like to make my application HiDPI aware and take full
advantage of real screen resolution:
I'm unable to find a simple way/example to totally disable scaling for
both cairo_*() and and mouse position events, only for my widget
(GtkDrawingArea or GtkWidget).
Is it possible to disable HiDPI scaling? Or I'm taking the wrong approach?
Thank you
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]