Commit Graph

8431 Commits

Author SHA1 Message Date
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
Matthias Clasen
f432c937cc dnd: Drop gdk_drag_abort
This function is never called, so drop it, its vfunc,
and all the backend implementations.
2018-07-12 13:57:45 +02:00
Matthias Clasen
1dd15b5237 dnd: Some documentation updates
Don't mention dnd protocols, and do mention the new,
split objects.
2018-07-12 13:57:45 +02:00
Matthias Clasen
5cdbbc6e61 win32: Build fixes 2018-07-12 13:02:42 +02:00
Matthias Clasen
0e2ac0ebf2 wayland: Rename a source file
Rename gdkdnd-wayland.c to gdkdrag-wayland.c to go along
with gdkdrop-wayland.c.
2018-07-12 13:02:42 +02:00
Matthias Clasen
c73cb2c154 wayland: Drop an unused field
Nothing was using the foreign_dnd_surface anymore, so no
need to create it in the first place.
2018-07-12 13:02:42 +02:00
Matthias Clasen
a756caa106 dnd: Drop suggested_action
The only user of this field was the x11 backend, and it
turns out that it does not need to store the value at all.
2018-07-12 13:02:42 +02:00
Matthias Clasen
da22ba3b86 drag: Split a setter
In preparation for moving the suggested action
to the x11 backend, split the setter off.
2018-07-12 13:02:42 +02:00
Matthias Clasen
7a0a92f2b6 win32: Stop using gdk_drag_get_suggested_action
The suggested action is not set or used in the win32
information, so don't put it in logs either.
2018-07-12 13:02:42 +02:00
Matthias Clasen
d927c3bee0 GdkDrop: drop the priv struct
Its not needed.
2018-07-12 13:02:42 +02:00
Matthias Clasen
59c2efbcd6 Add a GdkDrag::actions property
To go along the GdkDrop::actions property.
2018-07-12 13:02:42 +02:00
Matthias Clasen
94af080fb6 Rename a property
Change GdkDrag::action to GdkDrag::selected-action, which is
more clearly different from actions, and follows the existing
name of the struct field and getter.
2018-07-12 13:02:42 +02:00
Matthias Clasen
40841ec3be GdkDrag: Drop the priv struct
We don't need it.
2018-07-12 13:02:42 +02:00
Matthias Clasen
f69bb2fb2b wayland: set a cursor when starting a drag
Otherwise, we wont have one.
2018-07-12 13:02:42 +02:00
Matthias Clasen
db0b9f61ae dnd: Add a GdkDrag::action property
This lets us drop the ::action-changed signal for the
property change notification. But, can just as well move
the signal class handers which just update the cursor
to the ::action setter. No need to do this in the backends.
2018-07-12 13:02:42 +02:00
Matthias Clasen
63ab523146 wayland: Remove an unused field
GdkDragWayland.suggested_action was entirely unused, so drop it.
2018-07-12 13:02:42 +02:00
Matthias Clasen
12464731f1 Merge branch 'dnd-cleanups' into 'master'
Dnd cleanups

See merge request GNOME/gtk!226
2018-07-02 21:19:45 +00:00
Matthias Clasen
c8e082f296 win32: Adapt to dnd api changes
Follow the GdkDragContext -> GdkDrag change.
2018-07-02 22:52:59 +02:00
Matthias Clasen
64f5afe608 dnd: Rename headers
Rename gdkdnd.h to gdkdrag.h, to go along with gdkdrop.h

This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.
2018-07-02 15:00:50 +02:00
Matthias Clasen
7733f646d6 gdk: Rename GdkDragContext to GdkDrag
This is to go along with the newly introduced GdkDrop.

This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.
2018-07-02 14:59:26 +02:00
Matthias Clasen
9c3de51412 Merge branch 'wip/cursor-output-scale-changes' into 'master'
wayland: Update cursor surface scale when output scale changes

See merge request GNOME/gtk!224
2018-06-29 15:08:17 +00:00
Jonas Ådahl
dfd1372a9b wayland: Update cursor surface scale when output scale changes
Also update the cursor surfaces of every seat when an output changes
scale. This could for example happen when a monitor scale is changed via
Settings.
2018-06-28 12:44:22 +02:00
Rico Tzschichholz
b80942ec88 gdk: Fix some g-i annotations warnings 2018-06-27 09:00:17 +02:00
Matthias Clasen
8755d884f3 Remove a lot of Since annotations
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
2018-06-25 19:55:04 -04:00
Benjamin Otte
d13843ee2a gdk: Remove GDK_SURFACE_FOREIGN
We don't create surfaces of that type anymore.
2018-06-26 00:47:40 +02:00
Matthias Clasen
5c46c81067 x11: Fix dnd action handling
We were mistakenly assigning an Atom to a flags value.
2018-06-20 18:10:50 -04:00
Matthias Clasen
cd99f82e0c Merge branch 'master' into 'issue1084'
# Conflicts:
#   gdk/gdk.c
2018-06-20 14:21:24 +00:00
Benjamin Otte
06bba15f62 win32: Fix typo
This should fix gtk-doc erroring out.
2018-06-19 21:45:44 +02:00
Benjamin Otte
4d4ec2dbfb dnd: gdk_drag_action_is_unique() should return a boolean 2018-06-19 19:44:17 +02:00
myfreeweb
a1bcbdd02a wayland: Use shm_open(SHM_ANON) on FreeBSD
This functionality is similar to Linux's memfd. It creates anonymous shared memory without touching the filesystem, which allows it to work in Capsicum capability mode (sandbox).
2018-06-19 11:45:49 -04:00
Benjamin Otte
cbbb7604b6 x11: Set background as transparent as possible
Instead of making the background black, make it transparent black for
RGBA visuals and set a None background otherwise.
2018-06-18 23:49:53 +02:00
Benjamin Otte
a2839d157f dnd: Remove unused time arguments 2018-06-18 23:49:53 +02:00
Benjamin Otte
b3d424c2d7 dnd: Remove GdkDragContext.dest_surface
The variable is now unused
2018-06-18 23:49:53 +02:00
Руслан Ижбулатов
bf3ea24489 GDK W32: Remove gdk_win32_surface_foreign_new_for_display
That function is now unused.
2018-06-18 23:49:53 +02:00
Руслан Ижбулатов
997e8c1ae1 GDK W32: Adapt to dest_surface removal, misc changes
* There's no GdkDragContext->dest_surface anymore.
  Add dest_window field to GdkWin32DragContext,
  and use that instead.
* Remove unused function prototypes
* Add more comments
* Rename variables and fields from 'window' to 'surface'
  where appropriate
* Fix header indentation a bit
* Try to ensure that uninitialized/unknown handle variables
  and fields are set to INVALID_HANDLE_VALUE instead of NULL,
  as there may be cases where NULL is a valid handle value.
2018-06-18 23:49:53 +02:00
Benjamin Otte
aa1f0cfd4f dnd: Remove GdkDragContext.is_source
All drag contexts are sources these days, the other ones are GdkDrop
now.
2018-06-18 23:49:53 +02:00
Benjamin Otte
45a6146ca6 x11: Remove gdk_x11_surface_foreign_new_for_display()
People who want to use foreign windows should use X directly.
2018-06-18 23:49:53 +02:00
Benjamin Otte
bc63001deb x11: Store the XID instead of a GdkSurface
This might be foreign Windows and we don't want to create surfaces for
those.

Also, stop using GdkDragContext.dest_surface, that variable is meant to
go away.
2018-06-18 23:49:53 +02:00
Benjamin Otte
47b47f5835 x11: Simplify test
Now that we have gdk_drag_context_get_display(), use it.
2018-06-18 23:49:52 +02:00
Benjamin Otte
1b2dccd143 x11: xdnd_send_event() always returns TRUE
Make it return nothing instead and delete the code that handled the
FALSE case.
2018-06-18 23:49:52 +02:00
Benjamin Otte
7e09aa3caa x11: Don't multiply X values by the scale factor
This is fallout from a too eager change in
bdb442be21.
2018-06-18 23:49:52 +02:00