gtk4.git
7 years agomagnifier: Redo with GtkWidgetPaintable
Benjamin Otte [Fri, 23 Mar 2018 04:01:11 +0000 (05:01 +0100)]
magnifier: Redo with GtkWidgetPaintable

7 years agogtk: Add GtkWidgetPaintable
Benjamin Otte [Thu, 22 Mar 2018 19:47:28 +0000 (20:47 +0100)]
gtk: Add GtkWidgetPaintable

A GtkWidgetPaintable is a paintable that observes a given GtkWidget and
renders that widget into a paintable.

7 years agowidget: Cache the render node
Benjamin Otte [Tue, 20 Mar 2018 17:55:33 +0000 (18:55 +0100)]
widget: Cache the render node

This requires a bunch of refactorings:

1. Don't pass the current clip region to gtk_widget_snapshot()
   so we don't create full widget contents
3. Have a widget->priv->draw_needed that we invalidate on every
   queue_draw() call and set on every snapshot()
2. In queue_draw(), walk the widget chain to invalidate the
   render nodes of all parents

7 years agorendernode: Add gsk_render_node_diff()
Benjamin Otte [Tue, 20 Mar 2018 00:37:05 +0000 (01:37 +0100)]
rendernode: Add gsk_render_node_diff()

... and gsk_render_node_can_diff(). Those are vfuncs to compute a region
containing all the pixels that differ between the two nodes.

This is just the plumbing that chains into node classes. No node
implements it yet.

7 years agofont button: fix compiler warnings
Matthias Clasen [Thu, 5 Apr 2018 10:22:43 +0000 (06:22 -0400)]
font button: fix compiler warnings

A PangoLanguage is not a string.

7 years agoMerge branch 'text-changed-delete-4' into 'master'
Benjamin Otte [Wed, 4 Apr 2018 18:19:08 +0000 (18:19 +0000)]
Merge branch 'text-changed-delete-4' into 'master'

gtkentryaccessible: Fix text-changed::delete length

See merge request GNOME/gtk!100

7 years agoMerge branch 'textview-delete-4' into 'master'
Benjamin Otte [Wed, 4 Apr 2018 18:18:49 +0000 (18:18 +0000)]
Merge branch 'textview-delete-4' into 'master'

gtktextviewaccessible: update cursor position after text suppression

See merge request GNOME/gtk!102

7 years agogtktextviewaccessible: update cursor position after text suppression
Samuel Thibault [Wed, 4 Apr 2018 16:18:29 +0000 (18:18 +0200)]
gtktextviewaccessible: update cursor position after text suppression

delete_range_cb is set to be called before the text suppression done by
the gtktextlayout (otherwise it does not work properly). But at that
point the cursor position is not yet up to date.  We thus need to move
the accessibility cursor notification to after the actual text
suppression, by using another callback.

This fixes cursor position in brltty screen reading.

(cherry picked from commit fa6994d0331a219e85dce01007b2d6f3f7fd43c9)

7 years agogtkentryaccessible: Fix text-changed::delete length
Samuel Thibault [Wed, 4 Apr 2018 15:56:38 +0000 (17:56 +0200)]
gtkentryaccessible: Fix text-changed::delete length

The second parameter of the text-changed::delete event is to be the length,
not the end position.  This fixes spurious text removals in brltty
screen reading.

(cherry picked from commit 209f908a03a9d27508704425a57dcd533fab4c7d)

7 years agoGLArea: Remove wrong transfer annotation on new()
Daniel Boles [Wed, 4 Apr 2018 11:00:52 +0000 (12:00 +0100)]
GLArea: Remove wrong transfer annotation on new()

Like other widgets, this returns a floating reference, so
(transfer full) is wrong. Just omit the annotation as others do,
thus implying (transfer none).

Close https://gitlab.gnome.org/GNOME/gtk/issues/156

7 years agoimwayland: destroy objects only if it matches our manager object
Lionel Landwerlin [Tue, 27 Mar 2018 18:42:43 +0000 (19:42 +0100)]
imwayland: destroy objects only if it matches our manager object

Should fix one of the crash from #129.

7 years agofont chooser: Remove some dead code
Matthias Clasen [Mon, 2 Apr 2018 21:46:41 +0000 (17:46 -0400)]
font chooser: Remove some dead code

This is leftover code from already removed debug spew.

7 years agofont button: Fix a crash
Matthias Clasen [Mon, 2 Apr 2018 21:45:48 +0000 (17:45 -0400)]
font button: Fix a crash

Since we are now storing the language as a PangoLanguage,
we must not free it anymore.

7 years agofont chooser: Make the language property writable
Matthias Clasen [Mon, 2 Apr 2018 17:34:22 +0000 (13:34 -0400)]
font chooser: Make the language property writable

This is meant as an input to the font chooser.
We don't want the user to select a language, but
rather have fonts presented as they would work for
the current language. Therefore, do away with the
lang/script combo on the tweak page.

7 years agogtk, demos: Fix builds without HarfBuzz and PangoFT
Chun-wei Fan [Wed, 28 Mar 2018 04:57:28 +0000 (12:57 +0800)]
gtk, demos: Fix builds without HarfBuzz and PangoFT

Really exclude the portions in the gtkfontchooserwidget.c that are built
when HarfBuzz and PangoFT2 are built, and update the Meson files to
exclude such sources as well from the main GTK SO/DLL and from the
gtk4-demo program.

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

7 years agotestsuite/gsk/test-render-nodes.c: Avoid VLA usage
Chun-wei Fan [Wed, 28 Mar 2018 04:17:39 +0000 (12:17 +0800)]
testsuite/gsk/test-render-nodes.c: Avoid VLA usage

Just #define N as 5, instead of using a const int, which is not enough
to justify that as non-VLA usage.

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

7 years ago[gtk|demos/gtk-demo]/language-names.c: Fix build on non-GCC/CLang
Chun-wei Fan [Wed, 28 Mar 2018 03:59:11 +0000 (11:59 +0800)]
[gtk|demos/gtk-demo]/language-names.c: Fix build on non-GCC/CLang

Remove g_auto*() usage from these sources and use the traditional
g_free(), as g_auto*() are GCCisms (or CLangisms).

Also, don't include unistd.h unconditionally and stop including
langinfo.h and dirent.h, since they seem to be unused.

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

7 years agobuild: Fix linking demos on Visual Studio
Chun-wei Fan [Wed, 28 Mar 2018 04:13:08 +0000 (12:13 +0800)]
build: Fix linking demos on Visual Studio

The demos are now built as GUI programs, which will require the presence
of WinMain() on Visual Studio builds, unless we specify the entry point.

Pass the /entry:mainCRTStartup linker flag on Visual Studio builds for
the demo programs so that they can link properly.

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

7 years agofont chooser: Add examples for font features
Matthias Clasen [Sun, 1 Apr 2018 23:35:55 +0000 (19:35 -0400)]
font chooser: Add examples for font features

For some font features, we can figure out affected
glyphs, and show before/after. For some others, we
hardcode typical sequences.

Still to do: figure out how to find ligatures and
show them.

7 years agowidget-factory: Enable all details in the font chooser
Matthias Clasen [Sun, 1 Apr 2018 23:34:27 +0000 (19:34 -0400)]
widget-factory: Enable all details in the font chooser

We want to see this here.

7 years agoUpdate POTFILES.in
Piotr Drąg [Sun, 1 Apr 2018 13:00:07 +0000 (15:00 +0200)]
Update POTFILES.in

7 years agoW32: Link GTK to pangowin32
Руслан Ижбулатов [Sun, 4 Mar 2018 02:48:10 +0000 (02:48 +0000)]
W32: Link GTK to pangowin32

Needed for pango_win32_font_logfont() from gtkimcontextime.

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

7 years agoMerge branch 'lrn/issue-147' into 'master'
LRN [Sun, 1 Apr 2018 10:33:43 +0000 (10:33 +0000)]
Merge branch 'lrn/issue-147' into 'master'

Fix cursor handling in GTK4 on W32

Closes #147

See merge request GNOME/gtk!92

7 years agoFix some g-i annotation warnings
Rico Tzschichholz [Sun, 1 Apr 2018 07:15:08 +0000 (09:15 +0200)]
Fix some g-i annotation warnings

7 years agoEnable variations and features for font explorer
Matthias Clasen [Sun, 1 Apr 2018 01:31:11 +0000 (21:31 -0400)]
Enable variations and features for font explorer

7 years agofont chooser: Align level value names
Matthias Clasen [Sun, 1 Apr 2018 01:01:47 +0000 (21:01 -0400)]
font chooser: Align level value names

In the backport, I used the plural for variations, and that
is a better name, so use it here too.

7 years agofont chooser: Align property defaults
Matthias Clasen [Sun, 1 Apr 2018 00:59:35 +0000 (20:59 -0400)]
font chooser: Align property defaults

Set the default font chooser level to the same value we use
in the backports, to preserve font chooser behavior.

7 years agoFont chooser: Hide tweak button sometimes
Matthias Clasen [Sat, 31 Mar 2018 22:57:06 +0000 (18:57 -0400)]
Font chooser: Hide tweak button sometimes

When there is no chance of tweaking anything, don't
show a tweak button.

7 years agoDefeat compiler optimization
Matthias Clasen [Sat, 31 Mar 2018 22:49:15 +0000 (18:49 -0400)]
Defeat compiler optimization

We always want to call both update functions here, and
the compiler unhelpfully optimizes out the second call
if the first one returns TRUE.

7 years agoGskRenderer: Remove outdated documentation comment
Timm Bäder [Sat, 31 Mar 2018 11:52:19 +0000 (13:52 +0200)]
GskRenderer: Remove outdated documentation comment

All render node trees are immutable

7 years agosnapshot: Plug memory leak when collecting rounded clip nodes
Timm Bäder [Sat, 31 Mar 2018 09:41:13 +0000 (11:41 +0200)]
snapshot: Plug memory leak when collecting rounded clip nodes

7 years agogl renderer: Don't highlight cairo nodes as fallback
Timm Bäder [Fri, 30 Mar 2018 21:32:19 +0000 (23:32 +0200)]
gl renderer: Don't highlight cairo nodes as fallback

7 years agoProgressBar: Drop leftover "superimposed" mention
Daniel Boles [Sat, 31 Mar 2018 11:27:21 +0000 (12:27 +0100)]
ProgressBar: Drop leftover "superimposed" mention

This was missed from the commit that dropped other mentions to the
previous ability to superimpose text.

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

7 years agoappchooserwidget: search text using g_str_match_string()
Nelson Benítez León [Wed, 15 Nov 2017 14:46:31 +0000 (19:46 +0500)]
appchooserwidget: search text using g_str_match_string()

so we match on diacritics (eg. accented letters) and also
search on text tokens. As a plus we also reduce code size.

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

7 years agotogglebutton: Remove priv pointer
Timm Bäder [Thu, 29 Mar 2018 18:20:35 +0000 (20:20 +0200)]
togglebutton: Remove priv pointer

7 years agopopover: Remove priv pointer
Timm Bäder [Thu, 29 Mar 2018 18:15:39 +0000 (20:15 +0200)]
popover: Remove priv pointer

7 years agoshaderbuilder: Insert newlines directly after defines
Timm Bäder [Thu, 29 Mar 2018 16:16:58 +0000 (18:16 +0200)]
shaderbuilder: Insert newlines directly after defines

Instead of doing that in the loop in the last interation, we can just do
it after the loop.

7 years agogl renderer: Remover unused mask uniform
Timm Bäder [Thu, 29 Mar 2018 14:37:20 +0000 (16:37 +0200)]
gl renderer: Remover unused mask uniform

7 years agoshader builder: Remove unused members
Timm Bäder [Thu, 29 Mar 2018 14:15:40 +0000 (16:15 +0200)]
shader builder: Remove unused members

7 years agoshader builder: Reuse GString for shader code
Timm Bäder [Thu, 29 Mar 2018 14:14:18 +0000 (16:14 +0200)]
shader builder: Reuse GString for shader code

7 years agowidget: Fix snapshot condition
Timm Bäder [Thu, 29 Mar 2018 07:00:48 +0000 (09:00 +0200)]
widget: Fix snapshot condition

Of course, we only need to snapshot if both width and height > 0,
otherwise the result is invisible.

7 years agoentrybuffer: Remove priv pointer
Timm Bäder [Thu, 29 Mar 2018 06:40:46 +0000 (08:40 +0200)]
entrybuffer: Remove priv pointer

7 years agomenubar: Don't crash when cycling through menubars
Timm Bäder [Thu, 29 Mar 2018 06:32:51 +0000 (08:32 +0200)]
menubar: Don't crash when cycling through menubars

7 years agoMerge branch 'im-wayland-reset' into 'master'
Matthias Clasen [Fri, 30 Mar 2018 20:14:40 +0000 (20:14 +0000)]
Merge branch 'im-wayland-reset' into 'master'

wayland: Don't emit signals if nothing changed

See merge request GNOME/gtk!83

7 years agofishbowl: Make stats tracking work somewhat with broken X servers
Benjamin Otte [Fri, 30 Mar 2018 16:25:48 +0000 (18:25 +0200)]
fishbowl: Make stats tracking work somewhat with broken X servers

Broken X servers being the ones that don't support NET_WM_TIMINGS (ie
every WM but mutter and XWayland).

7 years agodemos: Improve frame rate tracking for fishbowl demo
Benjamin Otte [Fri, 30 Mar 2018 14:47:52 +0000 (16:47 +0200)]
demos: Improve frame rate tracking for fishbowl demo

We now properly use GdkFrameTimings and can therefor check for dropping
even a single frame in the history (of 16 frames or 1/4 of a second).
Once that happens, we immediately stop adding new items to the bowl.

A side effect is that the number of icons is now a *lot* smaller.

7 years agox11: Always request frame updates
Benjamin Otte [Fri, 30 Mar 2018 13:36:54 +0000 (15:36 +0200)]
x11: Always request frame updates

This ensures that the frame clock gets updated with correct presentation
times even if nothing was drawn.

This is necessary for benchmarking but would also be relevant for videos
that want to sync to the frame clock but draw frames a lot less.

7 years agox11: Make the frame clock work in GL and Vulkan
Benjamin Otte [Fri, 30 Mar 2018 08:43:26 +0000 (10:43 +0200)]
x11: Make the frame clock work in GL and Vulkan

7 years agoGDK W32: Remember surface cursor, implicit surface grab
Руслан Ижбулатов [Thu, 29 Mar 2018 23:42:49 +0000 (23:42 +0000)]
GDK W32: Remember surface cursor, implicit surface grab

This commit ensures that each GdkSurface impl remembers the
cursor that GDK sets for it, and that this cursor is set
each time WM_SETCURSOR is called for that sufrace's HWND.
This is needed because W32, unlike X, has no per-window cursors -
the cursor on W32 is a global resource, and we need to keep track
of which cursor should be set when pointer is over which surface
ourselves (WM_SETCURSOR exists exactly for this reason).

This commit also makes GDK remember the surface that has an implicit
grab (since implicit grabs are gone from the upper levels of the toolkit),
and ensures that crossing events are correctly synthesized and the grab
is broken when surface focus changes. This fixes a bug where opening
a new window (by clicking something in some other, pre-existing window)
will make that new window not get any mouse input due to the fact
that the mouse-button-down event from that click caused an implicit
grab on the pre-existing window, and that grab was not released afterward.

7 years agoGDK W32: Use the new cursor class
Руслан Ижбулатов [Thu, 29 Mar 2018 23:40:32 +0000 (23:40 +0000)]
GDK W32: Use the new cursor class

This makes all the code use the new cursor class instead of
raw HCURSOR handles.

7 years agoGDK W32: New cursor class
Руслан Ижбулатов [Thu, 29 Mar 2018 23:38:05 +0000 (23:38 +0000)]
GDK W32: New cursor class

Instead of now-unused GdkWin32Cursor class (a subclass of GdkCursor),
add a stand-alone GdkWin32HCursor class that is a wrapper around
HCURSOR handle.

On creation it's given a display instance, a HCURSOR handle and a boolean
that indicates whether the HCURSOR handle can or cannot be destroyed
(this depends on how the handle was obtained).
That information is stored in a hash table inside the GdkWin32Display
singleton, each entry of that table has reference count.
When the GdkWin32HCursor object is finalized, it reduces the reference
count on the table entry in the GdkWin32Display. When it's created,
it either adds such an entry or refs an existing one.
This way two pieces of code (or the same piece of code called
multiple times) that independently obtain the same HCURSOR from the OS
will get to different GdkWin32HCursor instances, but GdkWin32Display
will know that both use the same handle.

Once the reference count reaches 0 on the table entry, it is freed
and the handle (if destroyable) is put on the destruction list,
and an idle destruction function is queued.

If the same handle is once again registered for use before the
idle destructior is invoked (this happens, for example, when
an old cursor is destroyed and then replaced with a new one),
the handle gets removed from the destruction list.

The destructor just calls DestroyCursor() on each handle, calling
SetCursor(NULL) before doing that when the handle is in use.
This ensures that SetCursor(NULL) (which will cause cursor to disappear,
which is bad by itself, and which will also cause flickering if the
cursor is set to a non-NULL again shortly afterward)
is almost never called, unless GTK messes up and keeps using a cursor
beyond its lifetime.

This scheme also ensures that non-destructable cursors are not destroyed.

It's also possible to call _gdk_win32_display_hcursor_ref()
and _gdk_win32_display_hcursor_unref() manually instead of creating
GdkWin32HCursor objects, but that is not recommended.

7 years agothemes: Make disabled Expander arrow look disabled
Daniel Boles [Thu, 29 Mar 2018 20:23:50 +0000 (21:23 +0100)]
themes: Make disabled Expander arrow look disabled

If GtkExpander:sensitive was FALSE, the arrow still got the normal fg
colour, which made it look clickable, in contrast to the adjacent label.
Fix this by adding selectors to catch the applicable :disabled states.

Note: Needing these may indicate an oops in generic styles elsewhere,
but I couldn’t see any, so let’s just get it looking right for now.

Close https://gitlab.gnome.org/GNOME/gtk/issues/146

7 years agoemojichooser.ui: Add i18n context to all tooltips…
Daniel Boles [Thu, 29 Mar 2018 18:36:40 +0000 (19:36 +0100)]
emojichooser.ui: Add i18n context to all tooltips…

…since, unlike in gtk-3-22, it's not just Objects that already had that
here in the title labels. Thanks to Piotr for spotting this!

7 years agoUpdate POTFILES.in
Piotr Drąg [Thu, 29 Mar 2018 18:28:53 +0000 (20:28 +0200)]
Update POTFILES.in

7 years agoemojichooser.ui: Reuse headings as button tooltips
Daniel Boles [Thu, 1 Mar 2018 20:16:02 +0000 (20:16 +0000)]
emojichooser.ui: Reuse headings as button tooltips

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

7 years agoWidget: Fix doc of default ::keynav-failed handler
Tomasz Miąsko [Thu, 1 Feb 2018 00:00:00 +0000 (00:00 +0000)]
Widget: Fix doc of default ::keynav-failed handler

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

7 years agoGDK W32: the .area member of the expose event is gone
Руслан Ижбулатов [Sat, 24 Mar 2018 19:34:35 +0000 (19:34 +0000)]
GDK W32: the .area member of the expose event is gone

The .area and .count members were removed in commit 5c7ee3a483f1fc59b60da0e8fafb33681bab507d

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

7 years agoGDK W32: Adapt to the window->surface change
Руслан Ижбулатов [Sat, 24 Mar 2018 19:33:14 +0000 (19:33 +0000)]
GDK W32: Adapt to the window->surface change

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

7 years agoGDK W32: gdk_content_formats_builder_free{,_to_formats}
Руслан Ижбулатов [Sat, 24 Mar 2018 19:31:33 +0000 (19:31 +0000)]
GDK W32: gdk_content_formats_builder_free{,_to_formats}

The function was renamed in commit 2cbe094b919442471b54685a0fef0d6f83ce44b3

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

7 years agoGDK W32: Don't use gdk_threads_add_timeout_full()
Руслан Ижбулатов [Sat, 24 Mar 2018 19:30:55 +0000 (19:30 +0000)]
GDK W32: Don't use gdk_threads_add_timeout_full()

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

7 years agoGDK W32: don't use gdk_drag_find_surface() and gdk_drag_motion()
Руслан Ижбулатов [Sat, 24 Mar 2018 19:30:22 +0000 (19:30 +0000)]
GDK W32: don't use gdk_drag_find_surface() and gdk_drag_motion()

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

7 years agoGDK W32: Adapt to event filter removal
Руслан Ижбулатов [Sat, 24 Mar 2018 16:39:13 +0000 (16:39 +0000)]
GDK W32: Adapt to event filter removal

Add a new W32 backend-specific message filtering mechanism.
Works roughly the same way old event filtering did, but without
events (events are GDK/X11 concept that never really made sense
on W32), so there's no functionality for 'altering' events being
emitted. If an event needs to be emitted in response to a message
do it yourself.

Implemented like this, it should give better performance than
if we were to use GLib signals for this, since W32 sends a LOT
of messages (unlike X11, which doesn't send events as often)
all the time, and invoking the signal machinery on *each* message
would probably be bad.

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

7 years agoGDK W32: adapt to GdkDragProtocol removal
Руслан Ижбулатов [Sat, 24 Mar 2018 16:28:52 +0000 (16:28 +0000)]
GDK W32: adapt to GdkDragProtocol removal

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

7 years agoGDK W32: Another massive clipboard and DnD update
Руслан Ижбулатов [Sat, 24 Mar 2018 16:27:11 +0000 (16:27 +0000)]
GDK W32: Another massive clipboard and DnD update

Rename GdkWin32Selection to GdkWin32Clipdrop, since GdkSelection
is mostly gone, and the word "selection" does not reflect the
functionality of this object too well.

Clipboard is now handled by a separate thread, most of the code for
it now lives in gdkclipdrop-win32.c, gdkclipboard-win32.c just uses
clipdrop as a backend.

The DnD source part is also put into a thread.
The DnD target part does not spin the main loop, it just
emits a GDK event and returns a default value if it doesn't get a reply
by the time the event is processed.

Both clipboard and DnD use a new GOutputStream subclass to get data
from GTK and put it into a HGLOBAL.

GdkWin32DragContext is split into GdkWin32DragContext and GdkWin32DropContext,
anticipating a similar change that slated to happen to GdkDragContext.

OLE2 DnD protocol is now used by default, set GDK_WIN32_OLE2_DND envvar to 0
to make GDK use the old LOCAL and DROPFILES protocols.

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

7 years agoHighContrast: Honour .monospace set by GtkTextView
Daniel Boles [Thu, 29 Mar 2018 17:16:57 +0000 (18:16 +0100)]
HighContrast: Honour .monospace set by GtkTextView

Copy the line that sets a monospace family from Adwaita (same place too)

noticed at https://gitlab.gnome.org/GNOME/gtk/issues/141#note_91610

7 years agoci: Manually install Meson from PyPI
Emmanuele Bassi [Thu, 29 Mar 2018 08:48:29 +0000 (09:48 +0100)]
ci: Manually install Meson from PyPI

The Fedora base image we use for our CI doesn't always keep Meson up to
date with our requirements, so it's better if we just install Meson via
Python's pip.

7 years agoAdd an option for building examples
Emmanuele Bassi [Tue, 27 Mar 2018 12:15:21 +0000 (13:15 +0100)]
Add an option for building examples

Examples are not like demos; the latter are installed, and provide a
Flatpak manifest for CI pipelines and GNOME Builder. We should not be
using a single configure time option to gate building both.

7 years agogdkglcontext-win32.c: Fix window->surface changes
Chun-wei Fan [Wed, 28 Mar 2018 04:59:47 +0000 (12:59 +0800)]
gdkglcontext-win32.c: Fix window->surface changes

Rename the GdkSurface variables to surface, and make sure that we are
creating the context GObject correctly.

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

7 years agobuilder: Allow named objects to be used in paintable/pixbuf properties
Benjamin Otte [Thu, 22 Mar 2018 21:03:47 +0000 (22:03 +0100)]
builder: Allow named objects to be used in paintable/pixbuf properties

Instead of erroring if an object by a name already exists, use that
object.

7 years agogsk: Remove gsk_renderer_create_cairo_surface()
Benjamin Otte [Wed, 28 Mar 2018 03:17:06 +0000 (05:17 +0200)]
gsk: Remove gsk_renderer_create_cairo_surface()

It's not used anymore.

7 years agorenderer: Get rid of unused member variable
Benjamin Otte [Wed, 28 Mar 2018 13:03:04 +0000 (15:03 +0200)]
renderer: Get rid of unused member variable

7 years agoframeclockidle: Rename header so it's private now
Benjamin Otte [Wed, 28 Mar 2018 22:07:52 +0000 (00:07 +0200)]
frameclockidle: Rename header so it's private now

7 years agoframeclockidle: Remove nonexisting functions from header
Benjamin Otte [Wed, 28 Mar 2018 22:04:47 +0000 (00:04 +0200)]
frameclockidle: Remove nonexisting functions from header

7 years agovulkan: Reserve 4 images in the swapchain by default
Benjamin Otte [Thu, 29 Mar 2018 02:56:07 +0000 (04:56 +0200)]
vulkan: Reserve 4 images in the swapchain by default

With the previous approach we would spend most of the time waiting for
the swapchain to be filled again because it seems the compositor takes
care of 2 images at once from time to time.

This is not visible in profiles because waiting for a frame is a
read/poll/whatever operation that does not take CPU. It's only
noticeable because the app becomes less responsive.

7 years agoRename gtkkineticscrolling.h to gtkkineticscrollingprivate.h
Timm Bäder [Wed, 28 Mar 2018 14:47:54 +0000 (16:47 +0200)]
Rename gtkkineticscrolling.h to gtkkineticscrollingprivate.h

To match the naming scheme we use for all private header files.

7 years agoexpander: Update css docs
Timm Bäder [Wed, 28 Mar 2018 14:42:53 +0000 (16:42 +0200)]
expander: Update css docs

7 years agotestgtk: don't set a focus adjustment on a box
Timm Bäder [Wed, 28 Mar 2018 14:24:03 +0000 (16:24 +0200)]
testgtk: don't set a focus adjustment on a box

That will make the focus adjustment code in gtkcontainer.c scroll to the
wrong coordinates.

7 years agoRevert "container: Fix scroll adjustment coordinates"
Timm Bäder [Wed, 28 Mar 2018 11:05:01 +0000 (13:05 +0200)]
Revert "container: Fix scroll adjustment coordinates"

This reverts commit 7351848c75e8d6efee154fe77cbd90056ed993b5.

7 years agoexpander: Remove priv pointer
Timm Bäder [Tue, 27 Mar 2018 18:35:21 +0000 (20:35 +0200)]
expander: Remove priv pointer

7 years agobuild: Defer defining HAVE_PANGOFT and HAVE_HARFBUZZ
Chun-wei Fan [Wed, 28 Mar 2018 03:32:53 +0000 (11:32 +0800)]
build: Defer defining HAVE_PANGOFT and HAVE_HARFBUZZ

We forgot to account for the case where we lookup for HarfBuzz manually
under Visual Studio builds, so only set HAVE_HARFBUZZ (and thus
HAVE_PANGOFT, since PangoFT2 depends on HarfBuzz) after we did the
fallback check for HarfBuzz.

Also, check for hb.h instead of harfbuzz/hb.h to be inline with the
pkg-config case, as the sources also include the HarfBuzz header by
using #include <hb.h>, not #include <harfbuzz/hb.h>

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

7 years agogsk/gl: Include cairo.h consistently
Chun-wei Fan [Wed, 28 Mar 2018 03:23:43 +0000 (11:23 +0800)]
gsk/gl: Include cairo.h consistently

Follow the other sources that include cairo.h, by just doing #include
<cairo.h>, not <cairo/cairo.h>.

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

7 years agogtkimcontextime: fix to compile again
Руслан Ижбулатов [Thu, 8 Mar 2018 00:26:39 +0000 (00:26 +0000)]
gtkimcontextime: fix to compile again

This makes the code compile again, though obviously there have been
some substantial changes in how IM contexts work, so it's possible
that IME IM context doesn't work now.

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

7 years agoGDK W32: remove unused client_message
Руслан Ижбулатов [Sat, 24 Mar 2018 13:03:17 +0000 (13:03 +0000)]
GDK W32: remove unused client_message

This seems to be a leftover from API that was removed in
commit c332ac207ab4cac8f4c32aa85cdf6406157340af back in 2011.
The code, as it is now, does not even make sense.

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

7 years agoGDK W32: drop cursor-related GdkWin32Display functions
Руслан Ижбулатов [Sat, 24 Mar 2018 12:58:05 +0000 (12:58 +0000)]
GDK W32: drop cursor-related GdkWin32Display functions

These functions went away in commit 77bab4e027c06dff7726d96fa4e477bc11b23835

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

7 years agoGDK W32: remove the use of GDK_SURFACE_STATE
Руслан Ижбулатов [Sat, 24 Mar 2018 12:56:21 +0000 (12:56 +0000)]
GDK W32: remove the use of GDK_SURFACE_STATE

GDK_WINDOW_STATE (or, after rename, GDK_SURFACE_STATE) got
removed from GDK in commit 11a946df39f29b3cc0ce902c0c3b49abede1ead4

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

7 years agoGDK W32: move GdkWin32MonitorDpiType to a different header
Руслан Ижбулатов [Sat, 24 Mar 2018 12:52:25 +0000 (12:52 +0000)]
GDK W32: move GdkWin32MonitorDpiType to a different header

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

7 years agoCheck for freetype2 version when PangoFT is used
Руслан Ижбулатов [Thu, 11 Jan 2018 17:49:43 +0000 (17:49 +0000)]
Check for freetype2 version when PangoFT is used

Check for freetype2 version, because pangoft works with any version
(pangoft availability does not indicate that ft2 is new enough), unlike
GTK.

On Windows, since pangoft is optional, we check for the presence of
freetype2 .pc file first after finding that we have pangoft, and then
check for FT_Get_Var_Design_Coordinates() manually by looking for the
freetype headers and .lib first, and then looking for the presence of
that symbol, since freetype2's Visual Studio build system does not
generate a .pc file for us.

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

7 years agoGDK W32: _gdk_surface_invalidate_{for_expose,region}
Руслан Ижбулатов [Sat, 24 Mar 2018 19:33:41 +0000 (19:33 +0000)]
GDK W32: _gdk_surface_invalidate_{for_expose,region}

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

7 years agoGDK W32: drop the use of gdk_keymap_get_default()
Руслан Ижбулатов [Thu, 11 Jan 2018 17:48:25 +0000 (17:48 +0000)]
GDK W32: drop the use of gdk_keymap_get_default()

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

7 years agoOnly use gtk_print_backends_init() on UNIX
Руслан Ижбулатов [Sat, 24 Mar 2018 12:59:13 +0000 (12:59 +0000)]
Only use gtk_print_backends_init() on UNIX

It's from gtkprintbackend.c, which is in gtk_unix_print_sources
source list and thus only available on os_unix only.

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

7 years agoAlternative printbackends subdir for non-UNIX OSes
Руслан Ижбулатов [Sat, 3 Mar 2018 21:57:00 +0000 (21:57 +0000)]
Alternative printbackends subdir for non-UNIX OSes

The main buildscript expects 'print_backends' list to be defined.
Since printbackends is os_unix-only, we need to define this list
ourselves for other OSes.

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

7 years agoMake wayland bits in meson.build conditional on wayland use
Руслан Ижбулатов [Sat, 3 Mar 2018 21:55:15 +0000 (21:55 +0000)]
Make wayland bits in meson.build conditional on wayland use

Otherwise the build won't configure due to its inability to find
wayland-scanner program on systems where no such program is availble.

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

7 years agofont chooser: Make levels flags
Matthias Clasen [Tue, 27 Mar 2018 20:10:19 +0000 (16:10 -0400)]
font chooser: Make levels flags

Turn the GtkFontChooserLevel field into flags, and
add flags for OpenType variations and features. The
motivation for this is to make font-features in the UI
opt-in, since applications need to support them by
applying the pango attribute.

7 years agofont chooser widget: Expose tweak-action as property
Matthias Clasen [Tue, 27 Mar 2018 18:50:11 +0000 (14:50 -0400)]
font chooser widget: Expose tweak-action as property

This is necessary for applications that want to embed
the font chooser widget outside of GtkFontChooserDialog,
in order to access the tweak page.

7 years agofont button: notify when ::font-features changes
Matthias Clasen [Tue, 27 Mar 2018 18:47:36 +0000 (14:47 -0400)]
font button: notify when ::font-features changes

Lack of notification was causing the font-features to not
show up in the inspector.

7 years agospinbutton: spinbuttons aren't entries anymore
Timm Bäder [Tue, 27 Mar 2018 17:09:15 +0000 (19:09 +0200)]
spinbutton: spinbuttons aren't entries anymore

Fix a code sample to reflect that.

7 years agospinbutton: Remove queue_resize call from realize
Timm Bäder [Tue, 27 Mar 2018 17:08:50 +0000 (19:08 +0200)]
spinbutton: Remove queue_resize call from realize

No reason for this to be here.

7 years agospinbutton: Fix a copy/paste bug in the docs
Timm Bäder [Tue, 27 Mar 2018 16:25:03 +0000 (18:25 +0200)]
spinbutton: Fix a copy/paste bug in the docs

7 years agogl renderer: Fix some crashes
Timm Bäder [Tue, 27 Mar 2018 11:24:14 +0000 (13:24 +0200)]
gl renderer: Fix some crashes

When the first op is a modelview or projection change.

7 years agoaccellabel: Stop saying it's a GtkLabel
Timm Bäder [Tue, 27 Mar 2018 09:04:23 +0000 (11:04 +0200)]
accellabel: Stop saying it's a GtkLabel

And clean up the includes accordingly.