Commit Graph

52308 Commits

Author SHA1 Message Date
Matthias Clasen
f9dacd6de0 use the GdkDisplay get_setting vfunc
Instead of calling the GdkScreen implementation, use our
own vfunc now.
2017-10-30 16:44:47 -04:00
Matthias Clasen
19157c5bf4 x11: Implement the GdkDisplay get_setting vfunc
Just call the GdkScreen vfunc.
2017-10-30 16:44:18 -04:00
Matthias Clasen
4ffe9ca70c wayland: Implement the GdkDisplay get_setting vfunc
Just call the GdkScreen vfunc.
2017-10-30 16:43:50 -04:00
Matthias Clasen
729aeef6ab broadway: Implement the GdkDisplay get_setting vfunc
This is just a trivial implementation.
2017-10-30 16:43:13 -04:00
Matthias Clasen
c63c672ba8 quartz: Implement the GdkDisplay get_setting vfunc
Just call the GdkScreen vfunc.
2017-10-30 16:42:49 -04:00
Matthias Clasen
a9ea420b65 mir: Implement the GdkDisplay get_setting vfunc
Just call the corresponding screen vfunc.
2017-10-30 16:41:59 -04:00
Matthias Clasen
f2055bfb7b gdk: Add a get_setting vfunc to GdkDisplay
This will eventually replace the GdkScreen vfunc of the
same name.
2017-10-30 16:39:49 -04:00
Matthias Clasen
a518072e87 Remove GdkScreen api usage
Use GdkDisplay equivalents where they exist.
2017-10-30 16:06:42 -04:00
Matthias Clasen
1f22c6532e Store the display inside GtkSettings
This is a step towards dropping GdkScreen.
2017-10-30 15:56:03 -04:00
Matthias Clasen
209f24f962 Remove gdk_setting_get
This is a minor convenience api, and it is unused.
2017-10-30 15:31:02 -04:00
Matthias Clasen
e99687194a Forgotten files
Clean up the setting event from headers and docs too.
2017-10-30 10:08:32 -04:00
Matthias Clasen
10ba84a6a9 gdk: Drop settings events
We are not emitting these events anymore, so lets remove them
from the api. The GdkSettingAction enum is moved to xsettings-client.c
where its only use remains.
2017-10-30 09:49:02 -04:00
Matthias Clasen
7e8e4dcf76 x11: Stop emitting settings events
Not needed anymore.
2017-10-30 09:49:02 -04:00
Matthias Clasen
5d4c979425 wayland: Stop emitting setting events
Not needed anymore.
2017-10-30 09:49:02 -04:00
Matthias Clasen
627c0ae549 quartz: Stop emitting setting events
Not needed anymore.
2017-10-30 09:49:02 -04:00
Matthias Clasen
d3e45cf087 mir: Stop emitting setting events
Not needed anymore.
2017-10-30 09:49:02 -04:00
Matthias Clasen
2926669a9b gtk: Stop handling settings events
We don't need this anymore, now that we use the ::setting-changed
signal.
2017-10-30 09:48:51 -04:00
Matthias Clasen
a8aff6ef8f gtk: Connect to GdkDisplay::setting-changed
We still handle the setting event, for now.
That will be removed in a future commit.
2017-10-30 09:29:54 -04:00
Matthias Clasen
8686526b4a x11: Emit GdkDisplay::setting-changed
We still generate the event too.
That will be removed in a future commit.
2017-10-30 09:29:09 -04:00
Matthias Clasen
3c0614994f wayland: Emit GdkDisplay::setting-changed
We still generate the event too.
That will be removed in a future commit.
2017-10-30 09:28:29 -04:00
Matthias Clasen
36a94b49c7 quartz: Emit GdkDisplay::setting-changed
We still generate the event too.
That will be removed in a future commit.
2017-10-30 09:27:59 -04:00
Matthias Clasen
bb6c8a475f mir: Emit GdkDisplay::setting-changed
We still generate the event too.
That will be removed in a future commit.
2017-10-30 09:23:16 -04:00
Matthias Clasen
61d13b0f14 gdk: Add settings api to GdkDisplay
This commit adds gdk_display_get_setting and a ::setting-changed
signal, which will replace the settings event we use now. Note
that I've done away with the GdkSettingAction argument that the
event has, since we are not using it at all.
2017-10-30 09:21:47 -04:00
Lukas K
15491cf6e4 make GDK_DEBUG=opengl work on win32 2017-10-30 14:39:55 +08:00
Chun-wei Fan
64a489adbf input/IME: Defer the emit of the "commit" signal
On Windows, when IME is used, each keystroke results in the
WM_IME_COMPOSITION event being sent first.  This means that in our case
when one decides on to accept the input that is in the preedit buffer,
we first get from Windows the WM_IME_COMPOSITION event
(where we emit the commit signal), followed by the WM_IME_ENDCOMPOSITION
event (where we emit the pair of preedit-changed and preedit-end
signals).

Since commit f11f989 (GtkEntry: Remove recompute idle), we do the input
recomputation directly, this will cause a pair of "Pango-WARNING:
Assertion failed: (index >= 0 && index <= layout->length)" being shown,
as gtkentry.c's priv->preedit_length and priv->preedit_cursor was unable
to be reset to 0 in time as a result of the recomputation triggered by
the commit being done before the reset of priv->preedit_length and
priv->preedit_cursor (which are no longer valid as we essentially say
that we are done with the preedit buffer).

As we could only acquire the final string that was entered in this
preedit session when we handle the WM_IME_COMPOSITION event, fix this by
saving up the final string we acquire from Windows IME in UTF-8 when we
handle the WM_IME_COMPOSITION event from Windows, and emit the commit
signal with that string after we emit the preedit-changed and
preedit-end signals when we handle the WM_IME_ENDCOMPOSITION event from
Windows, which comes afterwards.

Also fix the formatting of the code around the parts of the files that
was changed.

https://bugzilla.gnome.org/show_bug.cgi?id=787142
2017-10-30 14:33:06 +08:00
Benjamin Otte
916981f66e cssimagescaled: Remove now unused struct member 2017-10-30 02:55:46 +01:00
Benjamin Otte
f29b7744bb gdk: Remove leftovers from GdkScreen::size-changed removal 2017-10-30 02:30:44 +01:00
Benjamin Otte
481189867a inspector: Use the new monitor change signals
And on't use the GdkScreen anymore now that the GdkDisplay provides all
the information we care about.
2017-10-30 02:30:44 +01:00
Benjamin Otte
d5155ef982 screen: Remove unused vfuncs 2017-10-30 02:30:44 +01:00
Timm Bäder
91f40eb088 widget: Make parent property read-only 2017-10-29 18:03:10 +01:00
Timm Bäder
09239eb670 widget: Don't notify :parent when rearranging widgets
gtk_widget_reposition_after is also valid to call if the widget already
has a parent, so don't notify the parent property in that case.
2017-10-29 17:27:53 +01:00
Timm Bäder
ff6cd8f75e widget: Remove parent-set signal
When a widget unparents its child widget manually in finalize, this can
lead to the parent-set signal being emitted for those child widgets. The
parent already has a ref_count of 0 though, so it can't be used in a
meaningful way. Specifically, emitting the signal will already try to
ref the parent which prints a critical.

Since GtkWidget already has a "parent" property, one can use its notify
signal instead to get notified when the parent widget changes.
2017-10-29 17:24:12 +01:00
Timm Bäder
0be4166b89 inspector: Remove node != NULL check from recorder model
We use NULL to remove the selection.
2017-10-29 13:44:12 +01:00
Timm Bäder
8b0f60bb6f checkbutton: Destroy indicator widget when draw-indicator is FALSE 2017-10-29 13:27:03 +01:00
Benjamin Otte
457bd2b9ee cssimagescaled: Just return the computed image
... instead of returning either itself with uncomputed images or a
copy of itself with only one computed image and lots of other
uncomputed images that we're never gonna look at again.

This fixes expressions like -gtk-scaled(-gtk-recolor(...),-gtk-recolor(...))
which Adwaita uses for checkmarks and bullets.
2017-10-29 06:41:12 -04:00
Matthias Clasen
598d22d194 Avoid creating trivial shadow nodes
The Vulkan renderer creates a fallback surface for each shadow
node, even if we end up not rendering anything to it. Avoiding
this is a nice optimization.
2017-10-28 16:10:46 -04:00
Matthias Clasen
99d3d31314 Adwaita: Use scaled icons for checks and bullets
This gives us crip rendering on hidpi screens.
2017-10-28 15:22:54 -04:00
Matthias Clasen
1dbc50f3f8 Adwaita: Add scaled version of bullets and checks
We use these assets as .symbolic.png now, so for hidpi, we
should provide @2 variants.
2017-10-28 15:20:11 -04:00
Matthias Clasen
ca7c148687 gsk: Apply scale factor for fallback rendering
This fixes blurry text and icons whenever we apply shadows
in a hidpi window. Shadow nodes are the last ones that we
still use fallback for, and this was causing us to render
the text blurry.
2017-10-28 14:38:49 -04:00
Matthias Clasen
439e1054c4 Triival cleanup
No need to go to the window, we store a copy of the scale factor
in the render pass object.
2017-10-28 14:38:21 -04:00
Matthias Clasen
a48015d3c6 inspector: Show details for shadow nodes
One of the few node types that we're not detailing yet.
2017-10-28 14:30:03 -04:00
Matthias Clasen
a0bbd14325 gsk: Scale glyphs in the glyph cache
Pass a scale factor when caching glyphs or looking them
up in the cache. The glyphs in the cache are rendered
with subpixel precision determined by the scale. Update
all callers to pass a scale factor according to the window
scale. This lets us render crisp glyphs on hidpi systems.
2017-10-28 13:13:31 -04:00
Matthias Clasen
6560961c59 vulkan: Handle changing window scale
The code that checks for the proper size of the our swapchain
was not taking window scale fully into account. With this change,
setting the window scale to 2 in the inspector causes the window
to grow and rendering to be scaled up as expected, with Vulkan,
in the same way it already is with cairo.
2017-10-28 11:57:53 -04:00
Matthias Clasen
dc0570cc17 gsk: Drop the GskRenderer::scale-factor property
This is can always be obtained from the window that is already
associated with the renderer, no need to maintain a separate
property for it.
2017-10-28 11:49:39 -04:00
Emmanuele Bassi
02eb344950 x11: Query whether we have GLX support
Epoxy 1.4 has new ad hoc API that we can use to check whether GLX is
available on the current system.

If we didn't use this API, we'd have to manually dlopen libGL (or its
equivalent on different OSes) and check if it had GLX symbols; since
Epoxy already does all of this internally, we can simply ask it instead.

https://bugzilla.gnome.org/show_bug.cgi?id=775279
2017-10-28 09:46:15 -04:00
Emmanuele Bassi
183538c2e2 Bump up the dependency on libepoxy
We are going to use new API to detect whether or not GLX is available
before calling GL API.

https://bugzilla.gnome.org/show_bug.cgi?id=775279
2017-10-28 09:46:15 -04:00
Timm Bäder
50d9484083 Adwaita: Add back visible focus outlines for list rows 2017-10-28 11:46:35 +02:00
Timm Bäder
4dee08dd52 sizerequest: Don't pass uninitialized values to measure
The GtkWidgetClass::measure vfunc is not required to assign a value to
any of the (out) parameters, so we need to initialize the locals we pass
to it, otherwise we can end up with a garbage size request.
2017-10-28 11:42:08 +02:00
Federico Mena Quintero
559d32420c GtkPathBar: Centralize handling of outstanding cancellables
The path bar would crash if we disposed it before all pending I/O
operations had finished.  Now we remember all the outstanding
operations directly in the GtkPathBarPrivate, and deal with them
consistently.
2017-10-27 17:18:38 -05:00
Matthias Clasen
ea91ab1d99 gsk: Make text nodes more compact
The copy of the PangoGlyphString we do here was showing up
in some profiles. To avoid it, allocate the PangoGlyphInfo array
as part of the node itself. Update all callers to deal with
the slight api change required for this.
2017-10-27 17:13:40 -04:00