Benjamin Otte
b591d7bc20
widget: Don't queue resize handler twice
...
We already queue it when we set_alloc_needed(), so there's no need to do
it again.
2018-04-11 03:16:34 +02:00
Benjamin Otte
d6477d0894
container: Don't store the resize clock
...
Use gtk_widget_get_frame_clock() instead
2018-04-11 03:16:34 +02:00
Benjamin Otte
1738b80efd
Merge branch 'gitlab-ci-mingw' into 'master'
...
gitlab-ci: mingw build
See merge request GNOME/gtk!105
2018-04-10 18:59:49 +00:00
Christoph Reiter
f26b2469af
gitlab-ci: Add a 32bit mingw build
2018-04-10 19:24:15 +02:00
Emmanuele Bassi
14c8a603e3
Terminate strncpy() buffers correctly
...
When using strncpy() with a buffer we need to account for the
terminating NUL character. GCC 8 started warning when using PPD_MAX_NAME
as the buffer length for strncpy() because the buffer we're copying into
has the same length — which means that the terminating NUL may be
skipped if the source string has a length of PPD_MAX_NAME.
The appropriate way to handle the case where we're copying a source with
a length bigger than of PPD_MAX_NAME is, as reported in the strncpy()
documentation, to copy `PPD_MAX_NAME - 1` bytes, and explicitly NUL
terminate the destination buffer. This has the additional benefit of
avoiding the compiler warning.
2018-04-10 14:54:45 +01:00
Benjamin Otte
adc0159bdb
wayland: Factor out frame timings request code
...
Also call the code everywhere we draw and not just with Cairo.
2018-04-10 15:13:38 +02:00
Benjamin Otte
e44bbeb558
filechooserbutton: Fix reserved pointers
...
So gcc stops complaining about unnecessary parenthesis.
2018-04-10 15:13:38 +02:00
Benjamin Otte
12063fe53e
ffmpeg: Fix compile warnings for newest version
2018-04-10 15:13:38 +02:00
Timm Bäder
f24d0725ca
vulkancontext: Add new error enum
2018-04-10 09:53:48 +02:00
Timm Bäder
3db4f805ee
widgetfocus: Use gtk_widget_compute_bounds
...
Instead of gtk_widget_get_allocation.
2018-04-10 09:44:14 +02:00
Timm Bäder
3ce6355bf4
widget: Remove _get_own_allocation
...
Replace all usages of it with _compute_bounds
2018-04-10 09:43:47 +02:00
Timm Bäder
3a5b2f54ea
widget: Remove gtk_widget_get_own_allocation
...
Use compute_bounds everywhere.
2018-04-10 09:43:47 +02:00
Timm Bäder
5d1f93796e
widget: Remove get_own_allocation usages
2018-04-10 09:43:47 +02:00
Timm Bäder
b29ee2dc46
notebook: Use compute_bounds
2018-04-10 09:43:47 +02:00
Timm Bäder
d49d391fcd
popover: Use gtk_widget_compute_bounds
...
Instead of the private get_own_allocation
2018-04-10 09:43:47 +02:00
Timm Bäder
3593fd2a29
toolbar: Avoid a get_own_allocation call
...
We want the content allocation here since we are allocation child
widgets.
2018-04-10 09:43:47 +02:00
Timm Bäder
44390c16b2
widget: Fix typo in compute_bounds docs
2018-04-10 09:43:47 +02:00
Timm Bäder
09f04633ca
gdk: Protect against negative GDK_SCALE values
...
Using those should not happen.
2018-04-10 09:43:47 +02:00
Руслан Ижбулатов
27d9f233d4
GDK W32: use clock after_paint signal for timing updates
...
* Previous commit had misleading info. The code was
added to begin_paint() instead of end_paint(). Though
that did not affect its performance in any visible way.
* Company advised to move the code to an "after_paint" signal
handler, so that it works on all renderers, not just Cairo.
This change caused high fluctuation in FPS values in fishbowl
when it is put in a situation where it cannot achieve 60fps
(such as using Cairo renderer at ultra-high resolution).
This seems to be deliberate and not a bug.
2018-04-09 20:21:16 +00:00
Emmanuele Bassi
410b20f904
docs: Link to GResource
...
Since we're referring to GLib's functionality, might as well save some
time to the reader, and link to the GResource API reference page.
2018-04-09 20:55:51 +01:00
Daniel Boles
fae064d5f9
docs/reference/gtk/getting_started: cgit => GitLab
...
master version of b685eb1779
2018-04-09 20:55:14 +01:00
Руслан Ижбулатов
c7ef697029
GDK W32: set update frequency and timestamp
...
There is no easily apparent way of being notified when frame updates
happene exactly, so we just query frame info at the end of each paint.
If we query too often (faster than DWM refresh rate), we just get
the same values twice in a row, but that is, hopefully, highly unlikely.
2018-04-09 19:07:10 +00:00
Daniel Boles
b7291ce533
AccelGroup: Remove @See_also of deleted function
...
gtk_item_factory_new() is not a thing that exists.
Also, maybe the lack of space after the colon was what stopped the link
from rendering.
2018-04-09 19:45:10 +01:00
Benjamin Otte
0afdd84a2a
css: Clipping changes don't need a queue_allocate() anymore
...
Now that queue_draw() isn't restricted to clip anymore, we don't need to
care about clip in the CSS engine either.
We do keep GTK_CSS_AFFECTS_CLIP around though because GtkWindow does
care for the window's size.
2018-04-09 20:20:55 +02:00
Benjamin Otte
78a9b5d1ed
entry: Stop being activatable
...
Activating entries does not do anything.
Activate the default widget instead.
2018-04-09 20:20:55 +02:00
Daniel Boles
d77ede508c
Merge branch 'master' into 'master'
...
gdk_x11_display_get_monitor: fix monitor number test logic
See merge request GNOME/gtk!107
2018-04-09 17:25:08 +00:00
Sébastien Villemot
bb8debe925
gdk_x11_display_get_monitor: fix monitor number test logic
...
When asked for a nonexistent (positive) monitor number,
gdk_x11_display_get_monitor would (at best) return an uninitialized pointer,
instead of returning NULL.
2018-04-09 18:07:14 +02:00
Benjamin Otte
bb8f6f87ae
glcontext: Store the buffer age regions in the GL context
...
That way, we can store the right region there: The actual painted area
instead of the exposed area (which is way too small).
Also, the GL context is the only user of this data, so storing it there
seems way smarter.
2018-04-09 01:00:31 +02:00
Benjamin Otte
c8e38c6065
vulkan: Use new resize vfunc to recreate swapchain
...
... instead of checking sizes for every frame.
2018-04-09 01:00:31 +02:00
Benjamin Otte
a115f59950
drawcontext: Add a surface_resized() vfunc
...
Call this vfunc whenever the surface's size has changed.
2018-04-09 01:00:31 +02:00
Benjamin Otte
7ed0c85c61
surface: Track all draw contexts created for the surface
2018-04-09 01:00:31 +02:00
Benjamin Otte
e8fef1147f
widget: Don't do a 0-size check before snapshotting
...
Even widgets with an empty allocation may still want to draw stuff.
Examples include shadows or child widgets with negative margins.
Fixes GtkEntry's progressbar not showing up anymore.
2018-04-09 01:00:31 +02:00
Daniel Boles
8d8db89669
testmodelbutton: Test :centered, :icon, :inverted
...
Test more stuff.
2018-04-08 18:48:16 +01:00
Daniel Boles
15b569e64d
testmodelbutton: Fix wrongly overridding MB child
...
I was setting a GtkButton:label, which resulted in the ModelButton's own
custom children getting lost. That doesn't make for a useful test...
2018-04-08 18:48:16 +01:00
Daniel Boles
53a66c0f41
ModelButton: Use WARN_INVALID_PROPERTY, not assert
...
Do the same thing we do everywhere else for invalid properties.
2018-04-08 18:48:16 +01:00
Daniel Boles
7fd0d3ec51
ModelButton: Fix type Wether => Whether
2018-04-08 18:48:16 +01:00
Daniel Boles
08126ffdf2
testmodelbutton: Add explanatory comments to CSS
...
and load at an earlier, more sensible place, before creating any widgets
2018-04-08 18:48:16 +01:00
Daniel Boles
57c58f880b
ModelButton: Protect against nonsensical gbooleans
...
the same way we do normally.
2018-04-08 13:17:18 +01:00
Daniel Boles
5bbb185e14
tests/testmodelbutton: Add this
...
and test whether :action-name, :role, and CSS nodes work as expected
https://gitlab.gnome.org/GNOME/gtk/issues/163
2018-04-08 13:17:18 +01:00
Timm Bäder
6cd53fc491
Merge branch 'wip/sadiq/fixes' into 'master'
...
listbox: Fix signal name is documentation
See merge request GNOME/gtk!106
2018-04-08 07:30:24 +00:00
Mohammed Sadiq
5ad31616e8
listbox: Fix signal name in documentation
2018-04-08 11:02:23 +05:30
Rico Tzschichholz
ff738269b6
Fix some g-i annotation warnings
2018-04-06 16:26:17 +02:00
Timm Bäder
58aa93be41
menu: Avoid an invalid read
2018-04-06 08:24:19 +02:00
Timm Bäder
d4e4904604
lockbutton: Remove priv pointer
2018-04-06 08:24:19 +02:00
Timm Bäder
b7f98314a5
widgetbowl: Add switch demo
2018-04-06 08:24:19 +02:00
Benjamin Otte
fb33110fd1
gtk-demo: Redo viewing of resources
...
1. Don't rely on GtkImage as a detector of file type anymore.
Instead, hardcode all extensions that are in use.
2. Add a display method for videos.
2018-04-06 00:44:18 +02:00
Benjamin Otte
3eddbdc191
video: Add autoplay and loop boolean properties
2018-04-06 00:44:18 +02:00
Piotr Drąg
faaf828c74
Update POTFILES.in
2018-04-05 22:54:03 +02:00
Carlos Garnacho
acb950ffb5
gtkmenushell: Port to using GtkEventControllerKey
2018-04-05 19:26:55 +02:00
Carlos Garnacho
9a80b9e382
gtkcellrendereraccel: Port to using GtkEventControllerKey
2018-04-05 19:26:55 +02:00