Commit Graph

8537 Commits

Author SHA1 Message Date
Matthias Clasen
77c0e68b57 gdk: Rename our vulkan context to GTK
Not sure it shows up anywhere, but just for completeness.
2019-02-24 10:53:23 -05:00
Matthias Clasen
fd667bb203 docs: Its just GTK now
Remove the + from GTK+ in more places in the GDK docs.
2019-02-24 10:51:21 -05:00
Matthias Clasen
d773bc0689 docs: Its just GTK now
Remove the + from GTK+ in the GDK docs.
2019-02-24 10:49:01 -05:00
Matthias Clasen
cc216c9e84 Remove gdk_surface_set_user_data
Change gdk_surface_get/set_user_data to private
API and rename them to get/set_widget.
Also remove an unused associated function.

The last two places where the surface API is used
are in gtkroot.c and gtkwidget.c. Make them
use the private api.
2019-02-23 22:24:50 -05:00
Matthias Clasen
b82e57fec6 fixup: warn about nothing events 2019-02-23 21:25:10 -05:00
Matthias Clasen
b6893b6d9f Quietly ignore GDK_NOTHING events
These don't have a surface, so we can't deliver
them via the ::event signal. But then, they're
good for nothing anyway.
2019-02-23 17:09:25 -05:00
Matthias Clasen
ac8b192eab gdk: Document surface signals
At least a little bit.
2019-02-23 16:08:05 -05:00
Matthias Clasen
e16cdb141c Drop gdk_event_handler_set
This is no longer used by GTK.
2019-02-23 14:13:57 -05:00
Matthias Clasen
08badd23cd Drop some dead code
There were some internal uses of GdkEventFunc. Thankfully,
they were unused, so lets just drop them.
2019-02-23 14:13:57 -05:00
Matthias Clasen
23fb77af43 surface: Introduce an ::event signal
This will eventually replace the event handler
as the method to get events over the gdk/gtk
boundary.
2019-02-23 13:45:10 -05:00
Chun-wei Fan
8d987be673 Merge branch 'wip/fanc999/meson.msvc' into 'master'
GTK+ 4: Improve Windows/Visual Studio build experience

See merge request GNOME/gtk!185
2019-02-23 02:13:35 +00:00
Timm Bäder
2146fd28f8 GdkDisplay: Use a GQueue for the events queue 2019-02-10 10:31:27 +01:00
Emmanuele Bassi
22f073b57b docs: Fix references to pkg-config files
The pkg-config files for GDK were dropped in 4.0, and now the GTK
pkg-config files have been renamed.
2019-02-06 10:40:51 +01:00
Emmanuele Bassi
1668496359 docs: Fix GTK links and locations 2019-02-06 10:39:27 +01:00
Emmanuele Bassi
45361e19c3 Rename more GSources to use gtk 2019-02-06 10:37:24 +01:00
Alexander Larsson
ca1ffa0c23 Merge branch 'master' into 'master'
Ensure focus on click ( Fix #1633 )

Closes #1633

See merge request GNOME/gtk!546
2019-02-05 13:05:34 +00:00
Matthias Clasen
101f1c7b42 gdk: Stop using deprecated pango api 2019-02-04 18:28:31 -05:00
Matthias Clasen
2350d0945a gdk: Add a copy of some deprecated pango api
We use pango_find_base_dir() in a few places, and
this api has been deprecated.
2019-02-04 18:28:31 -05:00
Matthias Clasen
dbd360262c Add an explicit fribidi dep
We will use fribidi api to determine text direction.
2019-02-04 18:28:31 -05:00
Mickael Istria
14010899b5 Issue #1633 - Ensure focus on click
This is necessary to give back focus to the Broadway elements when
content is embedded in an IFrame.

Signed-off-by: Mickael Istria <mistria@redhat.com>
2019-02-04 17:46:09 +01:00
Emmanuele Bassi
4040f76529 Use @basename@ in enumeration type templates
The @filename@ directive will use the full path of the file being parsed
for enumeration types; we should use @basename@, instead, as it improves
the reproducibility of the build by using only the file name.
2019-02-04 14:02:45 +01:00
Emmanuele Bassi
35e973d698 docs: Remove <ulink> elements
We use Markdown for documentation, not Docbook.
2019-02-04 09:53:22 +01:00
Matthias Clasen
2de7f760e5 gl texture: fix a typo 2019-01-23 22:33:44 -05:00
Benjamin Otte
359bc7695c build: Reintroduce warning flags from autotools
Some of the flags got lost in the meson transition or were demoted from
error flags to warning flags.
This commit reintroduces them.

It also includes fixes for the code that had warnings with those flags.
The big one being -Wshadow.
2019-01-22 04:33:12 +01:00
Timm Bäder
5c81cc2f36 GdkEvent: Make gdk_event_set_user_data private 2019-01-18 19:43:48 +01:00
Timm Bäder
01e985a830 GdkEvent: Remove unused struct 2019-01-18 19:43:48 +01:00
Timm Bäder
b2eff300b1 GdkEvent: Add a proper user_data member to GdkEventAny
Setting it as qdata on the object doesn't save any memory since we use
the user_data as the event target, which every event has set these days.
This way is also faster since just reffing the object doesn't do any
locking.
2019-01-18 19:43:48 +01:00
Tomasz Miąsko
16867d8abf g-i: Add transfer none annotations for frame clock timings getters 2019-01-17 00:01:38 +01:00
Matthias Clasen
a80007ac12 Fix XChangeProperty calls
They must be long...

Closes: #1556
2019-01-02 19:26:56 -05:00
Tomasz Miąsko
c665a1d5a5 Annotate values of PRIORITY constants
g-ir-scanner incorrectly evaluates macro definition that include
references to other macro definitions. Provide a correct value as an
annotation.

Differences in generated gir files:

```diff
@@ -19017 +19017 @@
-    <constant name="PRIORITY_REDRAW" value="20" c:type="GDK_PRIORITY_REDRAW">
+    <constant name="PRIORITY_REDRAW" value="120" c:type="GDK_PRIORITY_REDRAW">
@@ -74229,3 +74229,3 @@
     </constant>
-    <constant name="PRIORITY_RESIZE" value="10" c:type="GTK_PRIORITY_RESIZE">
+    <constant name="PRIORITY_RESIZE" value="110" c:type="GTK_PRIORITY_RESIZE">
       <doc xml:space="preserve">Use this priority for functionality related to size allocation.
@@ -106786,3 +106786,3 @@
     <constant name="TEXT_VIEW_PRIORITY_VALIDATE"
-              value="5"
+              value="125"
               c:type="GTK_TEXT_VIEW_PRIORITY_VALIDATE">
```

See !472
2018-12-22 18:52:20 +01:00
Peter Hutterer
38cba6895a x11: make the tool lookup dependent on the hw id as well
Tools on the same physical item have the same serial number, so the eraser
and the pen part of a single pen share that serial number. With the current
lookup code, we'll always return whichever tool comes first into proximity.

Change the code to use the hw id in addition to the serial number, this way we
can differ between two tools.
2018-12-18 21:41:49 +01:00
Peter Hutterer
e95e045898 x11: don't add unknown tools to our list
Generic tools (Bamboo, built-in tablets) always have the same serial number
assigned by the wacom driver. This includes the touch tool when the wacom
driver handles the touch evdev node (common where users require the wacom
gestures to work).

When the first device is the touch device, a tool is created with that serial.
All future tools now return the touch tool on lookup since they all share the
same serial number. Worse, this happens *across* devices, so the pen
event node gets assigned the touch tool because they all have the same serial.

Since we don't actually care about the touch as a tool, let's skip any unknown
tool. This captures pads as well.
2018-12-18 21:41:09 +01:00
Peter Hutterer
1b730dcf31 x11: get the tool type from the wacom driver properties
Any wacom device currently sets the tool type to UNKNOWN. The wacom driver has
a property that exports the tool type as one of stylus, eraser, cursor, pad or
touch. Only three of those are useful here but that's better than having all
of them as unknown.
2018-12-18 21:41:08 +01:00
Daniel Boles
a8ac6f833c RGBA: tiny grammar improvements in to_string doc 2018-12-17 20:49:34 +00:00
Daniel Boles
271acaff53 RGBA: Consistently use “” around inline arg names
instead of being inconsistent and not using them later, which leaves a
bunch of single letters floating among real words, not the prettiest.
2018-12-17 20:49:34 +00:00
Daniel Boles
c35e0cba39 RGBA: Fix example to_string output for reality/CSS
* We don't output spaces anywhere in the code, unlike the doc suggested.
* CSS explicitly forbids whitespace between function names and lparens:
  https://stackoverflow.com/questions/13877198
2018-12-17 20:49:34 +00:00
LRN
04aebda1e9 Merge branch 'win32-honest-clipboard-gtk4' into 'master'
GDK W32: Be honest about supported clipboard formats (GTK4)

See merge request GNOME/gtk!399
2018-12-11 13:47:57 +00:00
Christoph Reiter
5612e84551 GDK W32: Always set gtk-font-name to the active UI font. Fixes #1484
This makes apps use "Segoe UI 9" by default instead of whatever matches "Sans 10".
It also cleans up the code and uses some new pango API while at it.

This was previously disabled in 9e686d1fb5 because it led to a poor glyph coverage
on certain versions of Windows which don't default to "Segoe UI 9" (Chinese, Korean, ..)
because the font fallback list was missing in pango.

This is about to get fixed in https://gitlab.gnome.org/GNOME/pango/merge_requests/34
so enable it again when we detect a new enough pango version.

(See !436 for the original MR)
2018-12-10 09:00:50 +01:00
Christoph Reiter
2f29cb9e6f win32: Don't multiply the scroll event deltas by the Windows scroll lines setting. See #1408
GTK widgets expect the scroll deltas to be 1 or -1 and calculate a scroll value from that.
Multiplying the delta by the Windows scroll line setting (which defaults to 3) results
in a much larger delta and vastly different behaviour for running a GTK app on Windows
vs on Linux. For example text view and tree view scroll by 9 lines per scroll wheel tick
per default this way while on Linux it is around 3.

Remove the multiplication for now.

See !426 for the gtk3 MR
2018-12-08 15:28:37 +01:00
Christoph Reiter
67fdfca3ba GDK W32: set default settings for fontconfig.
Enables hinting, antialiasing and set the subpixel orientation according to the
active clear type setting. This ensures that font rendering with the fontconfig backend
looks similar to the win32 backend, at least with the default system font.

See !437
2018-12-08 14:54:15 +01:00
Chun-wei Fan
ed65ab1ba9 meson: Build .rc files for Windows
Build the .rc files for Windows so that one can track the version info
more easily for Windows, as well as giving GTK+ apps a default icon.

Also, move back the manifest embedding for the themed Windows print
dialog back into gtk-win32.rc.body.in, so that we just have one way of
embedding this manifest file, making things easier for ourselves, as
this is supported in the later Visual Studio compilers as well, which is
2013 and later.
2018-12-06 17:07:33 +08:00
Timm Bäder
94745241c2 GdkGLContext: Fix damage computation with buffer_age
As per the spec:

> The back buffer can
> either be reported as invalid (has an age of 0) or it may be
> reported to contain the contents from n frames prior to the
> current frame.

So a  buffer age of 1 means that the buffer was used in the last frame.
We were handling buffer_age==1 the same as buffer_age==0, i.e. we
returned the full damage for the surface.

[1] https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_buffer_age.txt
2018-12-02 13:25:43 +01:00
Timm Bäder
d0f4fcb6fd Merge branch 'akitouni/gdkvulkan-doc-typo' into 'master'
vulkancontext: fix typos in documentation

See merge request GNOME/gtk!417
2018-11-19 07:41:36 +00:00
Christoph Reiter
b061821f24 g-i: Add some nullable annotations
Based on grepping arg docs for NULL.
See https://gitlab.gnome.org/GNOME/pygobject/issues/261
2018-11-18 13:36:50 +01:00
Abderrahim Kitouni
e0833e492c vulkancontext: fix typos in documentation 2018-11-17 19:35:47 +01:00
Timm Bäder
ce3d5fcb0a vulkancontext: Add missing error switch 2018-11-13 15:28:46 +01:00
Matthias Clasen
39f8e1e137 wayland: Adapt to settings portal api change
ReadAll now accepts an array of patterns.
2018-11-12 13:51:56 -05:00
Matthias Clasen
54830a2af3 wayland: Fix a thinko in settings portal support
When we decide to fall back because the settings portal
is not present, adhere to that decision elsewhere. And
treat the fontconfig-timestamp like the other special-cased
settings, with G_TYPE_NONE.
2018-11-05 18:34:13 -05:00
Matthias Clasen
48b569eae0 wayland: Support the settings portal
Under Wayland, we are currently directly using GSettings
for desktop settings. But in a sandbox, we may not have
access to dconf, so this may fail. Use the new settings
portal instead.
2018-11-04 15:44:50 -05:00
Matthias Clasen
8099669466 Move the should_use_portal helper to gdk
We want to use it there too, in the future.
Update all callers.
2018-11-04 08:17:32 -05:00