Commit Graph

85 Commits

Author SHA1 Message Date
Rui Matos
ae61220c9f gdk/wayland: Handle non-existant gsettings keys
Since we're a library, crashing on gsettings keys, whose presence is out
of our control, isn't appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:17:32 +01:00
Rui Matos
b46da27d34 gdk/wayland: Add support for the gtk-enable-primary-paste gsetting
The gsetting was recently added so that we can have this configurable
on the wayland backend too.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:17:27 +01:00
Benjamin Otte
7c474c689a wayland: Remove all mentions of visuals 2016-11-04 00:17:57 +01:00
Benjamin Otte
4585af5719 gdk: Remove visual APIs from GdkScreen
gdk_screen_list_visuals(), gdk_screen_get_system_visual() and
gdk_screen_get_rgba_visual() are gone now.
2016-11-04 00:02:37 +01:00
Benjamin Otte
d249e77bcb API: screen: Remove gdk_screen_is_composited()
Switch code to use gdk_display_is_composited() instead.

The new code also doesn't use a vfunc to query the property but rather
requires the backend to call set_composited()/set_rgba() to change the
value.
2016-10-29 04:49:47 +02:00
Benjamin Otte
45c0379f87 API: gdk: Remove visual querying APIs
They are unused, only work on the default display anyway and visuals are
on their way out.
2016-10-28 05:22:50 +02:00
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
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
Matthias Clasen
d14305f380 wayland: Survive lack of settings
This can be made to happen eg by setting XDG_DATA_DIRS and
XDG_DATA_HOME to /. Not a useful value, but not a good reason
to crash either.
2016-05-19 07:38:33 -04:00
Matthias Clasen
55ea6e4dcc wayland: Make gdk_display_get_name work
It should just return the same as gdk_screen_make_display_name.
2016-05-01 10:51:41 -04:00
Matthias Clasen
9026289381 wayland: Port to new monitor api 2016-04-27 23:18:16 -04:00
Jonas Ådahl
cb73becfb4 wayland: Clean up naming of GdkWaylandDisplay pointers
The naming of pointers to GdkWaylandDisplay's were inconsistent.
Running the following commands in gtk+/gdk/wayland illustrate the
inconsistency:

$ grep -r '\<display_wayland\>' *.[ch] | wc -l
195
$ grep -r '\<wayland_display\>' *.[ch] | wc -l
81

This patch renames all occurrences of "wayland_display" to
"display_wayland". This is also consistent with naming in the X11
backend. A couple of whitespace changes were done as well in places
where the rename was already done, that added line breaks to long lines
that stood out.

https://bugzilla.gnome.org/show_bug.cgi?id=765474
2016-04-26 08:38:18 -04:00
Matthias Clasen
9bfc8371fe wayland: Remove an unused vfunc 2016-04-03 18:18:17 -04:00
Matthias Clasen
59e40f3d6f wayland: Remove unused field 2016-04-03 18:18:17 -04:00
Matthias Clasen
4c698bc824 wayland: Print out more debug info
Print out the subpixel layout and frame rates that the compositor
sends us.
2016-03-31 20:31:00 -04:00
Matthias Clasen
c6cdddd68d wayland: Fix up visual implementation
Don't return visuals that don't match the requested depth
and/or visual type.
2016-03-26 14:58:48 -04:00
Matthias Clasen
e48e29db3b wayland: Fully initialize the visual
The pixel details (mask, shift and precision) are supposed to
be filled in for TrueColor visuals.
2016-03-26 10:10:57 -04:00
Jonas Ådahl
f68cf698fc wayland: Don't invent our own unstable protocol semantics
The gtk_shell protocol used some half baked unstable protocol semantics
that worked by only allowing binding the exact version of the
interface. This hack is a bit too confusing and it makes it impossible
to do any compatible changes without breaking things.

So, instead rename it to include a number in the interface names. This
way we can add requests and events without causing compatibility issues,
and we can later remove requests and events by bumping the number in
the interface names.

https://bugzilla.gnome.org/show_bug.cgi?id=763001
2016-03-10 12:31:15 +08:00
Matthias Clasen
13a94b66b6 Sync default double-click time with GNOME
The default value for the double-click key in the
org.gnome.settings-daemon.peripherals.mouse schema is 400.
Use the same value as the declared default for the
gtk-double-click-time GTK+ setting, to avoid pointless
differences in corner cases.

https://bugzilla.gnome.org/show_bug.cgi?id=720950
2016-03-07 07:50:29 -05:00
Matthias Clasen
1388b111a8 wayland: Implement gtk-keynav-use-caret setting
This is anticipating the gsetting that will be introduced in
https://bugzilla.gnome.org/show_bug.cgi?id=763123
2016-03-07 07:35:36 -05:00
Lucas Baudin
306ee6d9a5 wayland: recursively search for the settings schema.
On some systems, the gtk settings are not used properly for wayland.
Indeed, g_settings_schema_source_get_default is used, and as the docs says it,
"all lookups performed against the default source should probably be done
recursively.".

https://bugzilla.gnome.org/show_bug.cgi?id=759409
2015-12-14 08:20:04 -05:00
Carlos Garnacho
02f3fe0671 wayland: calculate screen physical size
A simple calculation is done so far (assuming monitor areas never overlap)
so gdk_screen_get_width/height_mm return meaningful values.

https://bugzilla.gnome.org/show_bug.cgi?id=753621
2015-08-15 22:11:10 -04:00
Matthias Clasen
7d87eebfe7 wayland: Return a display name
Make gdk_screen_make_display_name() return a likely correct
name for the Wayland socket we are using.
2015-07-28 00:43:54 -04:00
Jeremy Whiting
f9d903995d Added api to set a window to fullscreen on a given monitor.
https://bugzilla.gnome.org/show_bug.cgi?id=752677
2015-07-25 07:08:59 -06:00
Matthias Clasen
da16947e21 wayland: Add more debug output 2015-04-09 00:13:37 -04:00
Matthias Clasen
94c5d691df wayland: Formatting fixes 2015-02-28 00:02:30 -05:00
Rui Matos
2dd07f346a gdkscreen-wayland: Don't leak wl_output objects
https://bugzilla.gnome.org/show_bug.cgi?id=743633
2015-01-28 17:17:09 +01:00
Alexander Larsson
6717242d26 wayland: Set GdkVisual::bits_per_rgb to 8
This was 0 before.
2014-10-13 10:43:31 -04:00
Matthias Clasen
6604f00236 Implement titlebar action settings for Wayland
https://bugzilla.gnome.org/show_bug.cgi?id=729782
2014-09-25 14:54:49 -04:00
Matthias Clasen
52578945bd Wayland: Fix various compiler warnings
Mostly missing declarations, missing statics and unused functions.
2014-09-05 20:41:06 -04: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
Jasper St. Pierre
cd591a03e7 wayland: Make sure to notify the capability settings when we get capabilities
Otherwise, we won't notice when we get capabilities, and we'll show app
menus, etc.
2014-07-01 15:39:06 -04:00
Florian Müllner
add67b516c wayland: Explicitly handle classic mode for now
There are plans to add session-dependent defaults to GSettings
(based on the newly standardized XDG_CURRENT_DESKTOP); until
then, the WM uses a different schema for its button-layout
setting in classic mode. So for the time being, do the same
and pick the alternative schema when XDG_CURRENT_DESKTOP
indicates that we are in a classic session.
(It's not pretty, but hopefully won't be with us for too long ...)

https://bugzilla.gnome.org/show_bug.cgi?id=731273
2014-06-06 15:32:59 +02:00
Florian Müllner
f4c963ef74 wayland: Set gtk-decoration-layout
Pick up the setting from the org.gnome.desktop.wm.preferences schema
if available. It is slightly more involved than other settings, as
the actual button names used in the schema differ from the ones we
use, so we need an additional translation step.

https://bugzilla.gnome.org/show_bug.cgi?id=731273
2014-06-06 15:32:59 +02:00
Adel Gadllah
b395929a16 gdkscreen-wayland: Emit monitors-changed when the output scale changes
https://bugzilla.gnome.org/show_bug.cgi?id=729013
2014-04-26 17:32:57 +02:00
Matthias Clasen
8e797c1195 Wayland: Set gtk-dialogs-use-header
Since we don't have a setting for this, hardcode the value
for now.
2014-02-06 22:51:05 -05:00
Ryan Lortie
a90bb7de0e Add a GtkSetting for 'shell-shows-desktop'
Add a GtkSetting for whether the desktop shell is showing the desktop
folder icons.

This is on by default because most desktop shells do show the icons on
the desktop.  We already have a patch in gnome-settings-daemon to bind
this to the org.gnome.desktop.background show-desktop-icons GSettings
key which is off by default on GNOME.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-14 15:03:04 -05:00
Giovanni Campagna
7f8bf41633 gtk-shell: extend the protocol with shell capabilities
Add the concept of shell capabilities, which allow the compositor
to advertise support for the app menu and the global menubar,
which are then propagated as GdkSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=707129
2013-09-03 17:03:43 +02:00
Matthias Clasen
f8412eca34 Revert "Deprecate and ignore the cursor blink settings"
This reverts commit b2e666bf8f.

We need to keep cursor blinking configurable for accessibility
reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=704134

Conflicts:
	gdk/win32/gdkproperty-win32.c
	gdk/x11/gdksettings.c
	gtk/gtksettings.c
	gtk/gtktextview.c
2013-08-16 22:45:13 -04:00
Rob Bradford
16e43733b9 wayland: Create a cairo surface for the root window
Many parts of GTK+ assume that all windows have a cairo surface
assoicated with them. This change provides a logically 1x1 cairo surface
(respecting scale) for the root window.

https://bugzilla.gnome.org/show_bug.cgi?id=704554
2013-07-24 18:30:19 +01:00
William Jon McCann
7b66956e63 Deprecate and hardcode default toolbar icon size setting
Toolbar icon size can still be changed on a per-widget basis as
needed by the application developer.
2013-07-08 15:02:28 -04:00
William Jon McCann
425e977bb6 Deprecate and hardcode default toolbar style setting
Toolbar style can still be changed on a per-widget basis as
needed by the application developer.
2013-07-08 15:02:28 -04:00
Alexander Larsson
e8b38fedbd gdk: Convert mouse position to doubles, add new getters
We've long had double precision mouse coordinates on wayland (e.g.
when rotating a window) but with the new scaling we even have it on
X (and, its also in Xinput2), so convert all the internal mouse/device
position getters to use doubles and add new accessors for the
public APIs that take doubles instead of ints.
2013-07-03 14:39:25 +02:00
Alexander Larsson
ce68a2f870 wayland: Implement gdk_screen_get_monitor_scale()
We bind to the newer version of the wl_output which supports
the new done and scale events, and if we use this to get the
scale for each monitor (defaulting to 1 if not supported).
2013-07-03 14:34:13 +02:00
William Jon McCann
b2e666bf8f Deprecate and ignore the cursor blink settings
And hardcode them to reasonable values.
2013-06-26 12:32:31 -04:00
William Jon McCann
7e3a494fac Deprecate and ignore gtk-enable-mnemonics and gtk-auto-mnemonics" properties
They are both enabled by default.
2013-06-26 11:16:12 -04:00
William Jon McCann
e8147d15f7 Deprecate and ignore gtk-menu-images setting
GtkImageMenuItem images can still be enabled selectively by the app author
using the always-show-image property on the item.
2013-06-26 10:53:09 -04:00