Commit Graph

15 Commits

Author SHA1 Message Date
Benjamin Otte
8d54c641f1 screen: Remove unused vfunc
GdkScreenClass.broadcast_client_message was unused, but a bunch of
backends still had functions (not) implementing it.
2016-10-16 18:17:21 +02:00
Benjamin Otte
fec8069e7b API: screen: Stop storing font options
font options are only ever set by the GtkSettings object and only ever
used inside GTK, so just store them there.
2016-10-16 18:17:21 +02:00
Benjamin Otte
9be9e00a0e API: screen: Remove gdk_screen_make_display_name()
It's identical to gdk_display_get_name().
2016-10-16 18:17:21 +02:00
Benjamin Otte
6b9e481e38 API: screen: Remove gdk_screen_get_active_window()
... and gdk_screen_get_window_stack().

Those functions were originally added in
5afb4f0f11 but do not seem to be used as
they are not implemented anywhere but in X.

As GDK is not meant to fulfill window management functionality I'm going
to remove these functions without replacements.
2016-10-16 18:17:21 +02:00
Benjamin Otte
26f9b584be API: gdk: Remove gdk_screen_get_number()
It's useless everywhere but in internal X11 code.
2016-10-16 18:17:21 +02:00
Benjamin Otte
0be88cc76e API: Remove gdk_screen_get_width() and gdk_screen_get_height()
... and gdk_screen_get_width_mm() and gdk_screen_get_height_mm() and
the shortcut counterparts that call these functions on the default
screen.

Modern display servers don't provide an ability to query the size of a
screen or display so we shouldn't allow that either.
2016-10-16 18:17:21 +02:00
Owen W. Taylor
fc6e2cc4b2 Handle resolution changes in the GDK backend code
gdk_x11_display_set_window_scale() affects the interpretation of the
Xft/DPI XSETTING - it is substituted inside GDK with the value of
Gdk/UnscaledDPI xsetting. However, this change is not propagated to
GTK+ and from GTK+ back to gdk_screen_set_resolution() until the
main loop is run.

Fix this by handling the screen resolution directly in gdk/x11.
This requires duplication of code between GDK and GTK+ since we still
have to handle DPI in GTK+ in the case that GdkSettings:gtk-xft-dpi
is set by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=733076
2014-07-13 15:35:23 -04:00
Matthias Clasen
3459a0a273 Revert "Introduce API to get the preferred visual"
This reverts commit 2b95d1a34e.

Conflicts:
	gdk/gdkscreen.c
2014-02-10 22:15:28 -05:00
Matthias Clasen
2b95d1a34e Introduce API to get the preferred visual
Unless GDK_RGBA=0 is set, this will be the RGBA visual.
The new function is called gdk_screen_get_preferred_visual().

https://bugzilla.gnome.org/show_bug.cgi?id=630217
2014-02-04 13:15:46 -05:00
Michael Natterer
8ad851f725 add gdk_screen_ and gdk_window_get_scale_factor()
These report the internal scaling factor, mapping from UI pixels
to hardware pixels.
2013-07-03 12:27:10 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
c6df2828b7 Add gdk_screen_get_monitor_workarea
The function returns the part of a monitors area that should be
used for positioning popups, menus, etc. The only non-trivial
implementation atm is in the X backend, all the other backends
just return the full monitor area. The X implementation is
currently suboptimal, since it requires roundtrips to collect
the necessary information. It should be changed to monitor
the properties for changes, when XFixes allows to monitor
individual properties.
https://bugzilla.gnome.org/show_bug.cgi?id=641999
2011-12-18 14:29:16 -05:00
Matthias Clasen
20c8b765a5 GdkScreen: Struct packing improvements 2011-04-12 12:13:55 -04:00
Matthias Clasen
92f163d40a Consistently hide class structs
And, since we've decided to keep the structs private, there is
no point in having the standard GObject clas macros anymore either.
2010-12-24 15:54:12 -05:00
Matthias Clasen
ea96e5e16f Explode gdkinternals.h into per-class private headers
At the same time, move some more class and instance structs
out of public headers.
2010-12-21 12:06:58 -05:00