Commit Graph

8471 Commits

Author SHA1 Message Date
Mohammed Sadiq
1ce960c85b gdkselectioninputstream-x11: Fix memory leak 2018-09-16 20:08:25 +05:30
Matthias Clasen
e2d691bdb1 gdk: Drop GDK_SURFACE_SUBSURFACE
None of the backends supports this type anymore.
2018-08-18 23:25:12 -04:00
Matthias Clasen
a73f961e65 wayland: drop subsurfaces
We don't use them in GTK+ anymore.
2018-08-18 23:25:05 -04:00
Matthias Clasen
081b45399f gdk/wayland: Avoid idempotent wl_subsurface.set_position calls
These may not result on wl_surface.frame callbacks, yet we do trigger
a frame clock tick that would get stuck on the lack of such callback.

https://bugzilla.gnome.org/show_bug.cgi?id=784314
https://gitlab.gnome.org/GNOME/gtk/issues/844

Closes: #844
2018-08-19 01:26:20 +00:00
Matthias Clasen
0874a54708 gdk/wayland: Always map windows 'moved-to-rect' as popups
Only popups can make use of the move-to-rect semantics so it makes no
sense to try anything other surface type.
2018-08-19 01:26:20 +00:00
Matthias Clasen
cd40ec2200 gdk/wayland: Don't remap non-subsurface as subsurface
Let's just use the fact that a window was mapped as a subsurface to
remap it above another transient parent instead of relying on the more
complicated 'should-map-as-subsurface' helper function.
2018-08-19 01:26:20 +00:00
Руслан Ижбулатов
d64467b334 GDK W32: Support smooth scrolling
Set delta_x or delta_y for GdkScrollEvent.
HIWORD (wParam) in WM_MOUSE(H)WHEEL is the scroll delta.
A delta value of WHEEL_DELTA (which is 120) means scrolling
one full unit of something (for example, a line).

The delta should also be multiplied by the value that the
SystemParametersInfo (SPI_GETWHEELSCROLL(LINES|CHARS), 0, &value, 0)
call gives back, unless it gives back 0xffffffff, in which case
it indicates that scrolling is page- or screen-based, not line-based
(GDK doesn't support that at the moment).

Also, all deltas should be inverted, since MS sends negative deltas
when scrolling down (rotating the wheel back, in the direction of
the user).

With deltas set the mode should be set to GDK_SCROLL_SMOOTH.

Fixes issue 1263.
2018-08-18 17:02:39 +00:00
Guido Günther
72ec8963d7 gdk: Use application_id as xdg_shell's app_id if available
This (manually) reverts commit e1fd87728d

This makes sure xdg_shell's app_id matches the DBus name of the the
appliation when using GtkApplication. It also allows the compositor to
derive the desktop file ID from the app_id:

   https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/xdg-shell/xdg-shell.xml?id=298d888ac718eae57ff2245d373d4327074506ea#n598

Closes #653
2018-08-02 11:03:41 +02:00
Matthias Clasen
ce7956cd50 Merge branch 'issue1214-tooltips-win32-gtk4' into 'master'
Gdk-Win32: Correct handling of transient state changes

See merge request GNOME/gtk!280
2018-07-31 11:37:28 +00:00
Luca Bacci
d29b378fa0 Gdk-Win32: Correct handling of transient state changes
See merge request !248
2018-07-31 11:11:26 +02:00
Benjamin Otte
7e919aaaa5 gdk: Fix Windows and OS X backend for keyevent.string removal 2018-07-30 20:15:16 +02:00
Benjamin Otte
375fbd4e47 gdk: Remove key_event->string and key_event->length
They're unused.
2018-07-30 19:32:38 +02:00
Benjamin Otte
813957a92f gdk: Remove gdk_event_get_string()
You want to use an IM module to get strings out of keypresses, not some
crude hack that only works on X11 and Wayland anyway.
2018-07-30 19:32:38 +02:00
Timm Bäder
798ad9f62a Merge branch 'g-clear-pointer-propagate' into 'master'
Remove GDestroyNotify casts in g_clear_pointer() uses

See merge request GNOME/gtk!269
2018-07-26 07:34:12 +00:00
Matthias Clasen
ad6255a841 Merge branch 'xfixes-timestamp' into 'master'
x11: Ignore old XFixesSelectionNotify events

Closes #14

See merge request GNOME/gtk!259
2018-07-25 11:21:01 +00:00
Ernestas Kulik
6adaf7c33d Remove GDestroyNotify casts in g_clear_pointer() uses
GLib master propagates argument types in g_clear_pointer(), which causes
the usual function pointer casts to GDestroyNotify to trip compiler
warnings. Additionally, this commit changes some cleanup functions where
appropriate (wl_data_source_destroy ->
gtk_primary_selection_source_destroy for struct
gtk_primary_selection_source).
2018-07-25 10:05:39 +03:00
Benjamin Otte
259be23ff2 broadway: Remove unused variable 2018-07-24 20:55:45 +02:00
Nirbheek Chauhan
5df4d27752 meson: libgdk-broadway.a depends on broadwayjs.h
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1218

Also fix another dependency error I found.
2018-07-23 20:15:44 +05:30
Jason Crain
77c3ef48cf x11: Ignore old XFixesSelectionNotify events
GtkEntryCompletion can rapidly release and claim ownership of the
primary selection. This generates multiple XFixesSelectionNotify events,
first stating that no one owns the selection, then another stating that
we own the selection. The notification that no one owns the selection
causes GtkEntryCompletion to deselect the text, breaking inline
autocompletion.

This fixes it by ignoring any XFixesSelectionNotify with a timestamp
earlier than our clipboard timestamp.

Fixes #14
2018-07-21 15:22:04 -05:00
Matthias Clasen
bef8a3a0e9 Merge branch 'content-provider-autoptr' into 'master'
gdk: Add auto cleanup func for GdkContentProvider

See merge request GNOME/gtk!251
2018-07-19 18:04:24 +00:00
Ernestas Kulik
96d0368290 gdk: contentdeserializer: Fix deserializer not returning
file_uri_deserializer does not return on success, only on failure. This
commit fixes clipboard reads never finishing for some types.
2018-07-19 15:55:58 +03:00
Ernestas Kulik
9a0ec5b1e0 gdk: contentdeserializer: Fix stream usage
file_uri_deserializer splices a memory stream, as opposed to
string_deserializer, which uses a converter and filter stream. This
commit fixes erroneous use of GMemoryOutputStream as
GFilterOutputStream.
2018-07-19 15:53:08 +03:00
Ernestas Kulik
7b5a0a829a gdk: Add auto cleanup func for GdkContentProvider 2018-07-19 11:28:21 +03:00
Timm Bäder
446b2e25d3 Avoid a g_object_get path
We can use gdk_device_get_n_axes instead and will get the same result.
2018-07-17 17:33:46 +02:00
Matthias Clasen
bf5f27c6d5 Handle configure events in gdk
The previous attempt at removing configure events entirely
was causing some dialogs not to show up under Wayland.
Presumably due to ordering issues with emitting ::size-change
out of the backend.

Instead, keep configure events in the event queue, but handle
them on the gdk side. This keeps the ordering intact, while
still removing configure events from the api. The dialogs
show up now.
2018-07-15 20:23:45 -04:00
Matthias Clasen
7a1073c3ae Revert "gdk: Drop configure events"
This reverts commit a8926c9d87.
2018-07-15 20:23:45 -04:00
Matthias Clasen
e2fd33f78a Revert "broadway: Stop using configure events"
This reverts commit 9c827cbff4.
2018-07-15 20:23:45 -04:00
Matthias Clasen
3c8b3cbf41 win32: Stop accessing GdkDrag members 2018-07-15 16:58:22 -04:00
Matthias Clasen
410d4bca83 wayland: Set actions on drag
We should pass the actions to the newly created
drag in drag_begin.
2018-07-15 16:52:16 -04:00
Matthias Clasen
168523264c x11: Set actions on drag
We should pass the actions to the newly created
drag object in drag_begin.
2018-07-15 16:50:06 -04:00
Matthias Clasen
435f143e2e x11: Rename a file
Keep in line with the parent class.
2018-07-15 16:47:17 -04:00
Matthias Clasen
98ccb67277 drop: stop accessing GdkDrag fields 2018-07-15 16:43:28 -04:00
Matthias Clasen
2d83bb1b91 x11: Stop using GdkDrag fields 2018-07-15 16:43:28 -04:00
Matthias Clasen
298b6ee81a wayland: Stop accessing GdkDrag members 2018-07-15 16:43:28 -04:00
Matthias Clasen
5ce3520a2a Add a GdkDrag::surface property 2018-07-15 16:43:28 -04:00
Matthias Clasen
9cc3e2c8ef gdkdrag: remove an unused member
The drag surface is stored in the subclasses and obtained
by via the get_drag_surface vfunc.
2018-07-15 16:42:07 -04:00
Matthias Clasen
034f89b17f wayland: Drop an unused api
Nothing was calling gdk_wayland_drag_set_source_surface.
2018-07-15 16:42:07 -04:00
Matthias Clasen
1ea09a327a Add a private struct to GdkDrag
This will force subclasses to use proper api.
2018-07-15 16:42:00 -04:00
Matthias Clasen
bc2f484ae9 Revert "GdkDrop: drop the priv struct"
This reverts commit d927c3bee0.

I was wrong. Better to hide the struct fields from subclasses.
2018-07-15 15:58:05 -04:00
Matthias Clasen
228f813c43 dnd: Drop gdk_drag_drop
This is an inconsistently used private api, and just adds
a vfunc indirection for no other benefit.
2018-07-15 15:58:05 -04:00
Matthias Clasen
288086b899 Fix up some doc mishaps
When GdkWindow was renamed to GdkSurface, 'window managers'
turned into 'surface managers'. Thats not cool.
2018-07-15 15:36:19 -04:00
Matthias Clasen
d148f26658 Drop gdk_surface_withdraw
'withdrawn' is an X11-centric concept, and the function
can just as well be replaced by gdk_surface_hide.
2018-07-15 15:29:58 -04:00
Matthias Clasen
7ca6440f4d gdk: Drop map events
We are really inconsistent about generating these,
and they are not actually used in GTK+. Instead,
add a boolean GdkSurface::mapped property.
2018-07-15 15:10:56 -04:00
Matthias Clasen
1172810768 win32: Stop using expose and configure events
These no longer exist.
2018-07-15 14:07:40 -04:00
Matthias Clasen
9c827cbff4 broadway: Stop using configure events
These no longer exist.
2018-07-15 14:01:59 -04:00
Matthias Clasen
da3aaf39b9 gdk: Drop expose events
Replace expose events with a GdkSurface::expose signal.
This is part of the move to use events only for input.
2018-07-15 13:13:07 -04:00
Matthias Clasen
a8926c9d87 gdk: Drop configure events
Replace configure events with a GdkSurface::size-changed signal.
This is part of the move to use events only for input.
2018-07-15 11:51:09 -04:00
Benjamin Otte
6afb6bb9d2 x11: Set BackPixmap = None unconditionally
Makes it more obvious what we actually want.

Related: #1134
2018-07-14 05:27:54 +02:00
Benjamin Otte
1a5e60be7c paintable: Fix return_if_fail() statements
I always switch them up...
2018-07-13 14:56:04 +02:00
Matthias Clasen
00a61f92b6 docs: Small updates
Remove a few references to no-longer-existing APIs.
2018-07-13 10:13:00 +02:00