Carlos Garnacho [Tue, 19 Jun 2018 11:17:57 +0000 (13:17 +0200)]
gtkwidget: Avoid doubly coordinate conversion when emulating press
We are poking again into the event propagation machinery, which
expects events in toplevel coordinates. Since we can't fetch the
original event back at this point, translate the coordinates
back to the toplevel so the emulated press ends up in the right
place.
https://gitlab.gnome.org/GNOME/gtk/issues/1159
Closes: #1159
Timm Bäder [Mon, 18 Jun 2018 17:39:32 +0000 (19:39 +0200)]
themes: Don't handle box.linked special
We don't reverse the css nodes anymore in RTL layouts.
Timm Bäder [Mon, 18 Jun 2018 15:24:57 +0000 (17:24 +0200)]
filechooserbutton: Remove priv pointer
Timm Bäder [Mon, 18 Jun 2018 13:25:25 +0000 (15:25 +0200)]
GtkStyleContext: Remove the frame clock
It's unused within GtkStyleContext.
Timm Bäder [Mon, 18 Jun 2018 13:04:00 +0000 (15:04 +0200)]
dnd: Fix up a comment
The below function does not take a GtkIconHelper anymore.
Timm Bäder [Mon, 18 Jun 2018 12:28:19 +0000 (14:28 +0200)]
colorscale: Remove priv pointer
Timm Bäder [Mon, 18 Jun 2018 11:11:06 +0000 (13:11 +0200)]
fontbutton: Remove priv pointer
Timm Bäder [Mon, 18 Jun 2018 10:33:37 +0000 (12:33 +0200)]
radiobutton: remove priv pointer
Timm Bäder [Mon, 18 Jun 2018 10:23:56 +0000 (12:23 +0200)]
picture: Fix up some docs
Use nullable instead of allow-none consistently, remove trailing
whitespace and fix some c&p problems.
Timm Bäder [Mon, 18 Jun 2018 09:17:41 +0000 (11:17 +0200)]
drawingarea: Clarify some comments
Timm Bäder [Mon, 18 Jun 2018 09:14:36 +0000 (11:14 +0200)]
messagedialog: Remove priv pointer
Timm Bäder [Sat, 16 Jun 2018 18:58:50 +0000 (20:58 +0200)]
paned: Allocation x/y are always 0
The allocation position we get passed to size_allocate is always 0/0
these days.
Timm Bäder [Sat, 16 Jun 2018 18:58:17 +0000 (20:58 +0200)]
paned: Remove handle_pos member
Query the handle bounds on demand instead.
Timm Bäder [Sat, 16 Jun 2018 18:31:48 +0000 (20:31 +0200)]
paned: Chain up in snapshot
No need to snapshot all child widgets ourselves, the implementation in
GtkWidget can just do it for us.
Timm Bäder [Sat, 16 Jun 2018 18:15:18 +0000 (20:15 +0200)]
paned: Remove unnecessary local variable
We can just pass the given allocation on.
Timm Bäder [Sat, 16 Jun 2018 18:13:07 +0000 (20:13 +0200)]
paned: Don't unnecessarily redraw handle in size_allocate
We size_allocate it after all, which will redraw it.
Timm Bäder [Sat, 16 Jun 2018 15:19:30 +0000 (17:19 +0200)]
paned: Store GParamSpecs
So we can use the more efficient g_object_notify_by_pspec everywhere.
Timm Bäder [Sat, 16 Jun 2018 14:10:00 +0000 (16:10 +0200)]
Remove gtk_css_node_reverse_children
Not needed anymore.
Timm Bäder [Sat, 16 Jun 2018 14:09:14 +0000 (16:09 +0200)]
toolbar: Stop reordering css nodes based on text direction
Timm Bäder [Sat, 16 Jun 2018 14:05:05 +0000 (16:05 +0200)]
headerbar: Stop reordering css nodes depending on text direction
Timm Bäder [Sat, 16 Jun 2018 13:56:55 +0000 (15:56 +0200)]
notebook: Stop reversing tabs based on text direction
Timm Bäder [Sat, 16 Jun 2018 13:25:14 +0000 (15:25 +0200)]
builder: Fix g-i annotations of _get_translation_domain
The return value can be null and is (transfer none).
Timm Bäder [Sat, 16 Jun 2018 12:59:49 +0000 (14:59 +0200)]
builder: Use TRUE/FALSE for error return values
Instead of guint and 0/1.
Timm Bäder [Sat, 16 Jun 2018 12:51:12 +0000 (14:51 +0200)]
builder: Remove priv pointer
Timm Bäder [Sun, 10 Jun 2018 19:54:25 +0000 (21:54 +0200)]
box: Don't reorder children based on text direction
Make :first-child always be the first child, i.e. the leftest one in LTR
and the rightest one in RTL.
Timm Bäder [Sun, 10 Jun 2018 19:47:35 +0000 (21:47 +0200)]
paned: Don't reorder css nodes based on text direction
Timm Bäder [Sun, 10 Jun 2018 19:35:19 +0000 (21:35 +0200)]
center box: Don't reorder css nodes in RTL
So widget order matches css order. We will do the same thing with GtkBox
eventually.
Timm Bäder [Sat, 16 Jun 2018 09:47:06 +0000 (11:47 +0200)]
scrolledwindow: Remove priv pointer
Matthias Clasen [Mon, 18 Jun 2018 11:36:09 +0000 (11:36 +0000)]
Merge branch 'window-activate-grab-4-again' into 'master'
gdk: activate surface on keyboard grabs
Closes #85
See merge request GNOME/gtk!174
Samuel Thibault [Fri, 1 Jun 2018 14:43:01 +0000 (16:43 +0200)]
gdk: activate surface on keyboard grabs
In
01455399e83a ("gdk: do not deactivate surface on keyboard grabs"), we
made gdk avoid deactivating surfaces when another application takes a
keyboard grab, by using has_focus_window instead of has_focus. That however
broke activating surfaces when the gdk application acquired a grab itself,
in which case has_focus_window is false but has_focus is true.
We thus actually need to use both: surfaces should be activated either
because we have normal keyboard focus, or because we grabbed the keyboard.
This also renames HAS_FOCUS to APPEARS_FOCUSED to better reflect its
role.
Fixes #85
Piotr Drąg [Sun, 17 Jun 2018 15:24:07 +0000 (17:24 +0200)]
Update Polish translation
Timm Bäder [Sat, 16 Jun 2018 08:15:57 +0000 (10:15 +0200)]
search bar example: remove unused function
Timm Bäder [Sun, 10 Jun 2018 19:30:23 +0000 (21:30 +0200)]
center box: Remove snapshot implementation
Timm Bäder [Sun, 10 Jun 2018 12:41:43 +0000 (14:41 +0200)]
gl renderer: call glViewport directly
Timm Bäder [Sun, 10 Jun 2018 11:39:30 +0000 (13:39 +0200)]
button: Remove measure implementation
This is already done by GtkBin.
Timm Bäder [Sun, 10 Jun 2018 10:25:44 +0000 (12:25 +0200)]
combobox: Remove priv pointer
Matthias Clasen [Fri, 15 Jun 2018 16:27:44 +0000 (16:27 +0000)]
Merge branch 'wip/lantw/fix-gtkdoc-build-without-wayland' into 'master'
docs: Fix gtk-doc build when wayland is disabled
See merge request GNOME/gtk!193
Ting-Wei Lan [Fri, 15 Jun 2018 15:51:15 +0000 (23:51 +0800)]
docs: Fix gtk-doc build when wayland is disabled
Unconditionally putting 'gdkwayland_inc' in src_dir argument of gtkdoc
call tells gtkdoc-scan to scan source files in a non-existent build
directory, gdk/wayland. To avoid causing build failure when a specific
backend is disabled, we should include directories conditionally.
Matthias Clasen [Fri, 15 Jun 2018 02:00:57 +0000 (02:00 +0000)]
Merge branch 'design_by' into 'master'
aboutbox: use a more fitting 'design by" role
Closes #1153
See merge request GNOME/gtk!192
Mohammed Sadiq [Thu, 14 Jun 2018 17:53:14 +0000 (23:23 +0530)]
examples: Simplify handling events in search-bar
In search-bar example, we can use gtk_search_bar_set_key_capture_widget()
which would simplify handling keyboard events.
Jakub Steiner [Thu, 14 Jun 2018 14:36:38 +0000 (16:36 +0200)]
aboutbox: use a more fitting 'design by" role
- in most cases, authors listed under "artwork by" are actually responsible for
the design of the app as a whole
Fixes issue #1153
Mohammed Sadiq [Thu, 14 Jun 2018 05:45:14 +0000 (11:15 +0530)]
Revert "imcontext: Make size arguments be gsize and not int"
This was committed accidently.
This reverts commit
eefd2d6f104973d1461feee0b94dff8af991e145.
Mohammed Sadiq [Thu, 14 Jun 2018 05:39:19 +0000 (11:09 +0530)]
examples: Fix alignment of search-bar example
The search entry was taking the whole window size.
Let's reduce the size so as to have more natural size.
Benjamin Otte [Wed, 13 Jun 2018 19:40:38 +0000 (21:40 +0200)]
imcontext: Make size arguments be gsize and not int
Otherwise gcc complains when we use these as arguments to g_new() on
32bit architectures with:
../gtk/gtkcomposetable.c: In function ‘gtk_compose_table_list_add_array’:
/usr/include/glib-2.0/glib/gmem.h:217:10: warning: argument 1 range [
2147483648,
4294967295] exceeds maximum object size
2147483647 [-Walloc-size-larger-than=]
__p = g_##func##_n (__n, __s); \
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmem.h:279:42: note: in expansion of macro ‘_G_NEW’
#define g_new0(struct_type, n_structs) _G_NEW (struct_type, n_structs, malloc0)
^~~~~~
../gtk/gtkcomposetable.c:851:22: note: in expansion of macro ‘g_new0’
gtk_compose_seqs = g_new0 (guint16, length);
^~~~~~
/usr/include/glib-2.0/glib/gmem.h:96:10: note: in a call to allocation function ‘g_malloc0_n’ declared here
gpointer g_malloc0_n (gsize n_blocks,
^~~~~~~~~~~
Mohammed Sadiq [Thu, 14 Jun 2018 00:00:21 +0000 (05:30 +0530)]
docs: Update getting started docs
We have removed references to private members in our examples.
Let the docs be updated to reflect that.
Mohammed Sadiq [Wed, 13 Jun 2018 14:45:20 +0000 (20:15 +0530)]
docs: Use gtk_widget_show() to show window
gtk_window_show_all() is no longer available (and no longer needed)
Mohammed Sadiq [Wed, 13 Jun 2018 14:28:01 +0000 (19:58 +0530)]
snapshot: Trivial typo fix in comment
Rico Tzschichholz [Wed, 13 Jun 2018 11:08:28 +0000 (13:08 +0200)]
picture: Fix g-i annotation warning
Mohammed Sadiq [Mon, 11 Jun 2018 15:14:23 +0000 (20:44 +0530)]
build: Fix compiler warnings
Mohammed Sadiq [Mon, 11 Jun 2018 12:10:05 +0000 (17:40 +0530)]
overlay: Use the right property variable name
Benjamin Otte [Mon, 11 Jun 2018 11:55:09 +0000 (11:55 +0000)]
Merge branch 'wip/sadiq/fixes' into 'master'
overlay: Add support for clipping overlay widgets
See merge request GNOME/gtk!189
Mohammed Sadiq [Mon, 11 Jun 2018 10:36:22 +0000 (16:06 +0530)]
overlay: Add support for clipping overlay widgets
Sometimes users may want to restrict the growth of child
widgets in a GtkOverlay to grow atmost the size of the overlay.
Let's add a support for that.
Matthias Clasen [Sun, 10 Jun 2018 23:14:42 +0000 (23:14 +0000)]
Merge branch 'lrn/gtk4warnings' into 'master'
Fix a lot of warnings in GTK4
See merge request GNOME/gtk!188
Matthias Clasen [Sun, 10 Jun 2018 23:05:50 +0000 (23:05 +0000)]
Merge branch 'master' into 'master'
gtk: Add gtk_is_initialized() and gtk_get_main_thread()
See merge request GNOME/gtk!186
Matthias Clasen [Sun, 10 Jun 2018 22:05:12 +0000 (22:05 +0000)]
Merge branch 'lrn/aligned-alloc' into 'master'
Aligned allocators for GTK4
Closes #856
See merge request GNOME/gtk!187
Руслан Ижбулатов [Sun, 10 Jun 2018 21:05:30 +0000 (21:05 +0000)]
Use correct stat struct for ftw()
check_dir_mtime() is called by ftw() and is given
the real stat struct, not its glib version (which may
or may not be the same as "struct stat").
This is irrelevant for MSVC (it has no ftw()) and
works correctly for MinGW-w64 (which declares stat
structures correctly). If mingw.org complains, add
a special ifdef for it later.
Руслан Ижбулатов [Sun, 10 Jun 2018 21:04:50 +0000 (21:04 +0000)]
See if _MSC_VER is defined before checking its value
Руслан Ижбулатов [Sun, 10 Jun 2018 21:04:27 +0000 (21:04 +0000)]
Fix missing default switch case in DllMain
Руслан Ижбулатов [Sun, 10 Jun 2018 21:04:03 +0000 (21:04 +0000)]
Fix missing default switch cases in gtkimcontextsimple
Руслан Ижбулатов [Sun, 10 Jun 2018 21:02:56 +0000 (21:02 +0000)]
Fix some warnings in W32 part of gtkmain
* Add missing default cases
* Cast string literals as non-const
Руслан Ижбулатов [Sun, 10 Jun 2018 21:01:49 +0000 (21:01 +0000)]
Fix a typo in W32 event-handling code
It's quite old, but mostly harmless (both "message == WM_KEYUP"
and "message = WM_KEYUP" evaluate to not-FALSE, and message
value is not used after that line).
Руслан Ижбулатов [Sun, 10 Jun 2018 21:00:31 +0000 (21:00 +0000)]
Fix a warning about uninitialized variable
Руслан Ижбулатов [Sun, 10 Jun 2018 21:00:05 +0000 (21:00 +0000)]
Remove unused code in gdksurface-win32.c
Руслан Ижбулатов [Sun, 10 Jun 2018 20:59:30 +0000 (20:59 +0000)]
Fix more signedness issues in W32 backend
Руслан Ижбулатов [Sun, 10 Jun 2018 20:58:19 +0000 (20:58 +0000)]
A quick and dirty fix for a circular allocation issue
query_targets() tried to write to struct that
wasn't yet allocated.
This code is going to change soon, so this is a temporary
fix until then.
Руслан Ижбулатов [Sun, 10 Jun 2018 20:57:18 +0000 (20:57 +0000)]
Fix a missing default case warning
It shouldn't be possible to get DPI_STATUS_PENDING here.
If it does happen, that would be a bug that should be fixed.
Руслан Ижбулатов [Sun, 10 Jun 2018 20:56:49 +0000 (20:56 +0000)]
Remove unused functions in W32 backend
Руслан Ижбулатов [Sun, 10 Jun 2018 20:56:10 +0000 (20:56 +0000)]
Fix signedness issues, remove unused code
Руслан Ижбулатов [Sun, 10 Jun 2018 20:55:46 +0000 (20:55 +0000)]
Remove some more unused variables
Руслан Ижбулатов [Sun, 10 Jun 2018 20:53:46 +0000 (20:53 +0000)]
Fix various type mismatch warnings
Руслан Ижбулатов [Sun, 10 Jun 2018 20:53:25 +0000 (20:53 +0000)]
Fix gdk_win32_cairo_context_end_frame prototype
Руслан Ижбулатов [Sun, 10 Jun 2018 20:51:05 +0000 (20:51 +0000)]
Remove unused variables (mostly in W32 code)
Руслан Ижбулатов [Sun, 10 Jun 2018 20:49:47 +0000 (20:49 +0000)]
Fix wrong format strings in various places
Руслан Ижбулатов [Sat, 9 Jun 2018 14:06:55 +0000 (14:06 +0000)]
Use aligned allocators for GtkSnapshot
Any data that is later fed to graphene must be
allocated with proper alignment, if graphene
uses SSE2 or GCC vector instructions.
This adds custom array code (a streamlined copy
of GArray with all unnecessary bells and whistles removed),
which is then used for the state_stack instead of GArray.
There's also a runtime check for the size of GtkSnapshotState
itself being a multiple of 16. If that is not so, any array
elements past the 0th element will lose alignment.
There are probably struct attributes that can
make GtkSnapshotState always have size that is a multiple
of 16, but we'll burn that bridge if we cross it.
Piotr Drąg [Sun, 10 Jun 2018 13:35:50 +0000 (15:35 +0200)]
Update Polish translation
Piotr Drąg [Sun, 10 Jun 2018 13:19:06 +0000 (15:19 +0200)]
Update POTFILES.in
Benjamin Otte [Sun, 10 Jun 2018 00:56:18 +0000 (02:56 +0200)]
picture: Don't use g_str_equal() with potential NULLs
Benjamin Otte [Thu, 7 Jun 2018 11:17:20 +0000 (13:17 +0200)]
docs: Add GtkEventControllerKey to index
Benjamin Otte [Thu, 31 May 2018 19:44:38 +0000 (21:44 +0200)]
dnd: Ref the GdkDrop during the DND operation
It might go away if the DND takes too long otherwise...
Benjamin Otte [Thu, 7 Jun 2018 03:22:18 +0000 (05:22 +0200)]
quartz: Remove gtkdnd-quartz.c
It shows up in my git diff calls and is completely broken.
Benjamin Otte [Wed, 6 Jun 2018 03:33:30 +0000 (05:33 +0200)]
x11: Remove useless check
The check survived from GTK2 when that function could still return
GdkPixmap and GdkFont objects and was accompanied by this comment:
/* We may receive events such as NoExpose/GraphicsExpose
* and ShmCompletion for pixmaps
*/
Benjamin Otte [Thu, 31 May 2018 19:29:02 +0000 (21:29 +0200)]
clipboard: Remove return statements from void function
Benjamin Otte [Sat, 9 Jun 2018 23:28:08 +0000 (01:28 +0200)]
gtk-demo: Use GtkImages to select the puzzle
Benjamin Otte [Sat, 9 Jun 2018 22:38:06 +0000 (00:38 +0200)]
iconhelper: Always size contents to icon size
No more special casing for paintables. If you want the special case for
paintables, you should use GtkPicture.
Benjamin Otte [Sat, 9 Jun 2018 21:36:56 +0000 (23:36 +0200)]
image: Remove gtk_image_set_keep_aspect_ratio()
and gtk_image_set_can_shrink().
Images are meant to always be icon-sized, they can never shrink below
that.
And images are icons, so they are meant to be square. If they are
not, we pretned that's by accident and keep aspect ratio.
Benjamin Otte [Sat, 9 Jun 2018 21:30:11 +0000 (23:30 +0200)]
gtk-demo: Make sliding puzzle demo use GtkPicture
Benjamin Otte [Sat, 9 Jun 2018 21:12:00 +0000 (23:12 +0200)]
gtk-demo: Port images demo to use a GtkPicture in places
Benjamin Otte [Sat, 9 Jun 2018 20:54:04 +0000 (22:54 +0200)]
video: Use a Picture instead of an Image
Benjamin Otte [Sat, 9 Jun 2018 20:48:06 +0000 (22:48 +0200)]
picture: Introduce
This commit introduces GtkPicture, which is supposed to complement
GtkImage.
GtkImage will be adapted to always display an icon, while
GtkPicture displays regular imagery.
Matthias Clasen [Sat, 9 Jun 2018 23:14:08 +0000 (19:14 -0400)]
puzzle: fix some compiler warnings
These slipped under the radar, sorry.
Timm Bäder [Sat, 9 Jun 2018 18:03:44 +0000 (20:03 +0200)]
widget: Use priv pointer less
Instead declare a priv local. We should do this even if we don't remove
the priv pointer from GtkWidget entirely, just to stay consistent with
new code we introduce.
Руслан Ижбулатов [Sat, 9 Jun 2018 14:05:49 +0000 (14:05 +0000)]
Use aligned allocators for GskRenderNode
Any data that is later fed to graphene must be
allocated with proper alignment, if graphene
uses SSE2 or GCC vector instructions.
Руслан Ижбулатов [Sat, 9 Jun 2018 14:01:03 +0000 (14:01 +0000)]
Add aligned allocator functions to GSK
The code is mostly stolen from graphene.
Allocators support any alignment, but their implementation
only calls system aligned allocator functions if malloc()
is not aligned to 16-byte boundaries. If it is aligned,
the implementation just calls malloc() regardless of which
alignment is requested by the caller.
This can be fixed by saving the result of meson malloc()
alignment check and adding a few conditions to the implementation,
but right now GSK and GTK only need 16-byte alignment either way.
Руслан Ижбулатов [Sat, 9 Jun 2018 13:52:42 +0000 (13:52 +0000)]
Add aligned allocator support to meson
* A bunch of new variables for config.h.meson
* A check for aligned allocation being necessary at all
(graphene must use GCC vector instructions or SSE2)
* A check for C malloc() being aligned at 16-byte boundaries
* A check for a few special aligned allocator functions being
present and not being built-ins (posix_memalign is a builtin
in GCC, even on platforms where there is no posix_memalign
system function)
* Added -mstackrealign flag on Windows, since otherwise
stack variables may become unaligned when the stack briefly
passes through OS code (such as in various callbacks and
handlers)
Philippe Normand [Fri, 8 Jun 2018 17:10:59 +0000 (18:10 +0100)]
gtkmain: Add gtk_get_main_thread()
This utility function can be useful to know which thread was initialized for
GTK+.
Philippe Normand [Fri, 8 Jun 2018 17:03:22 +0000 (18:03 +0100)]
gtkmain: Add gtk_is_initialized()
This utility function can be useful to check whether GTK+ was already
initialized or not.
Fran Dieguez [Fri, 8 Jun 2018 08:09:57 +0000 (08:09 +0000)]
Update Galician translation
Matthias Clasen [Thu, 7 Jun 2018 21:38:24 +0000 (17:38 -0400)]
puzzle: Add mouse support
Make it so that clicking on a puzzle piece moves enough
pieces to move the empty space there, if it is possible.
Matthias Clasen [Thu, 7 Jun 2018 17:06:07 +0000 (13:06 -0400)]
puzzle: Use plain labels
The previous code looked cool in the UI, but was too much
of a hack in the code.
Matthias Clasen [Wed, 6 Jun 2018 01:02:57 +0000 (21:02 -0400)]
Add tweaks
Allow setting the puzzle size, and allow chosing between
the rose and the radioactive animation. Change the default
size to 3. 6 is just too hard.