Commit Graph

8588 Commits

Author SHA1 Message Date
Alexander Larsson
f30ba56323 broadway: Reintroduce smarter diffing
We now send very minimal diff operations.
2019-03-29 14:30:13 +01:00
Alexander Larsson
4dfe2e6e2f broadway: Initial restructuring of node tree diffing
This goes back to a very naive diff, but that reuses nodes from
previous frames using the node id. This will be a bettter base
to start from.
2019-03-29 14:30:13 +01:00
Alexander Larsson
90c5a5ff6b broadway: Update broadway_node_type_names 2019-03-29 14:30:13 +01:00
Alexander Larsson
6040a7370c Broadway: Send configure notify on move/resize too 2019-03-29 14:30:13 +01:00
Alexander Larsson
c8d7b4a79a broadway: Fix coordinates when drag move/resizeing
The x/y passed in are in the surface, not root coords.
2019-03-29 14:30:13 +01:00
Chun-wei Fan
4784c5a980 gdk/win32/gdkdrag-win32.c: Include math.h
We need that for round().
2019-03-29 16:50:53 +08:00
Matthias Clasen
f89c93ea8e Merge branch 'window-api-cleanup' into 'master'
GtkWindow api cleanup

See merge request GNOME/gtk!674
2019-03-28 00:14:51 +00:00
Matthias Clasen
bbb6772934 win32: Drop set_role
One overlooked (non-)implementation of set_role.
2019-03-27 18:48:59 -04:00
Matthias Clasen
3600d129bf win32: Add a missing include
We are using round() now, so include math.h.
2019-03-27 18:47:56 -04:00
Matthias Clasen
0d43d11387 gdk: Drop gdk_surface_set_role
This is a very old X session management thing, and you
will be hard-pressed to find a session manager that can
make use of it, and even harder-pressed to find apps
using it to their advantage.
2019-03-27 17:29:17 -04:00
Matthias Clasen
8ef4e231ec gdk: Stop implementing set_role
All but the X implementation of these were
empty anyway. And the X one is just setting
a property.
2019-03-27 17:29:17 -04:00
Alexander Larsson
9212727f53 broadway: Use css transforms
This allows generic transforms nodes to work.
2019-03-27 19:27:16 +01:00
Alexander Larsson
411dc7e138 broadway: Fix leftover dom modification not using display_commands 2019-03-27 14:21:28 +01:00
Matthias Clasen
c0aaa43122 Rename gdk_device_get_surface_at_position_double
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
5935f26a1d Drop gdk_device_get_surface_at_position
It is no longer used.
2019-03-26 18:12:55 -04:00
Matthias Clasen
9021e7d3cd gdk: Stop using gdk_device_get_surface_at_position
We should always use the double variant.
2019-03-26 18:12:55 -04:00
Matthias Clasen
03eb455c93 Rename gdk_device_get_position_double
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
6288043ec2 Drop gdk_device_get_position
It is no longer used.
2019-03-26 18:12:55 -04:00
Matthias Clasen
8dece0e940 gdk: Stop using gdk_device_get_position
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
21580309d3 Rename gdk_surface_get_device_position_double
Drop the _double suffix, now that the int version is gone.
2019-03-26 18:12:54 -04:00
Matthias Clasen
f1d61d5515 Drop gdk_surface_get_device_position
Not used anymore.
2019-03-26 18:08:39 -04:00
Matthias Clasen
54a969e0ad gdk: Stop using gdk_surface_get_device_position
Use the double variant instead.
2019-03-26 17:55:29 -04:00
Matthias Clasen
d45996c728 Avoid root coordinates in begin_drag/move apis
Change the all the begin_drag and begin_move apis in
GdkSurface and GtkWindow to expect surface coordinates.

Update the x11 implementation to translate to root
coordinates where it matters. Wayland is ignoring the
coordinates anyway.
2019-03-26 15:57:11 -04:00
Alexander Larsson
6fce18e1a1 broadway: Remove some spew 2019-03-26 17:09:41 +01:00
Alexander Larsson
cf4226586a broadway: Load all textures before applying display ops, fixing flickers 2019-03-26 17:07:47 +01:00
Alexander Larsson
0481aa10e7 broadway: Use const use for constants in the js code 2019-03-26 17:07:47 +01:00
Alexander Larsson
edbaa0964f broadway: Clean up stuff using const defines 2019-03-26 17:07:47 +01:00
Alexander Larsson
fbefec52a5 Broadway: Add id for nodes and reuse old ones
When sending render nodes from the client to the daemon we add an id,
and whenever we're about to re-send the entire tree node we instead
send the old id. We track all the nodes for the previous frame
of the surface this way.

Having the id on the daemon side will allow us do to much better deltas.
2019-03-26 17:07:47 +01:00
Alexander Larsson
87a13fe3d2 broadway: Prepare for splitting display ops out of command handling 2019-03-26 17:07:47 +01:00
Alexander Larsson
2f85443e37 broadway: Refcount textures
We want to delay some rendering, and to make that safe we need to correctly
refcount the use of blob uris for the textures so that we don't unref
it while something is scheduled to use it.
2019-03-26 17:07:47 +01:00
Alexander Larsson
3bbbe9f71b broadway: Don't crash of drag-resizing when already active
This is what the X11 code does.
2019-03-26 17:07:47 +01:00
Alexander Larsson
890b759091 broadway: Send actual float32, not some hack 2019-03-26 17:07:47 +01:00
Alexander Larsson
d997903d29 broadway: Use DataView instead of hand-rolled int parsers
This is nicer in general, but also will let us do floats more sanely.
2019-03-26 17:07:47 +01:00
Alexander Larsson
b097f0a7d8 Broadway: Add node for debug nodes
This can be helpful when debugging broadway.
2019-03-26 17:07:47 +01:00
Alexander Larsson
1b5b1bfd0e broadway: Don't fall back for translation transform nodes
These are trivial anyway
2019-03-26 17:07:47 +01:00
Christoph Reiter
0638dca29a win32: remove another call to gdk_device_warp()
Inline the implementation (untested). To fix the build.
2019-03-26 08:20:07 +01:00
Christoph Reiter
ae68dc7a7d win32: remove unused gdk_display_warp_device
to fix the build
2019-03-26 07:59:01 +01:00
Matthias Clasen
20b4a8b38c Yet another win32 build fix
So much empty warping.
2019-03-25 23:29:34 -04:00
Matthias Clasen
4dfe2a8aa8 Fix the windows build
There was another warp implementation that needed to be removed.
This commit also addresses a number of compiler warnings
in passing.
2019-03-25 20:06:08 -04:00
Matthias Clasen
f2dff5115f win32: Drop the warp implementation
We no longer support pointer warping.
2019-03-25 10:16:14 -04:00
Matthias Clasen
3d37f08f38 Remove gdk_device_warp
This was only ever implemented on X11, and is
not something we want to encourage apps to do, ever.
2019-03-24 20:49:08 -04:00
Руслан Ижбулатов
8da56cef79 GDK W32: Fix property setting to correctly use static strings
The strings that are set are static, so g_value_set_static_string() should
be used to set them instead of g_value_set_string().
2019-03-22 16:59:03 +00:00
Руслан Ижбулатов
64ab82c403 GDK W32: Test for IME correctly
ImmIsIME() doesn't work (always returns TRUE) since Vista.
Use ITfActiveLanguageProfileNotifySink to detect TSF changes,
which are equal to IME changes for us.

Also make sure that IMMultiContext re-loads the IM when keyboard layout
changes, otherwise there's a subtle bug that could happen:
* Run GTK application with non-IME layout (US, for example)
* Focus on an editable widget (GtkEntry, for example)
* IM Context is initialized to use the simple IM
* Switch to an IME layout (such as Korean)
* Start typing
* Since IME module is not loaded yet, keypresses are handled
  by a default MS IME handler
* Once IME commits a character, GDK will get a WM_KEYDOWN,
  which will trigger a GdkKeyEvent, which will be handled by
  an event filter in IM Context, which will finally re-evaluate
  its status and load IME, and only after that GTK will get
  to handle IME by itself - but by that point input would
  already be broken.
To avoid this we can emit a dummy event (with Void keyval),
which will cause IM Context to load the appropriate module
immediately.
2019-03-22 16:58:59 +00:00
Carlos Garnacho
65d9b7ee86 gdk: Include copy of glib/gconstructor.h
This is named gdkconstructor.h to avoid any possible conflicts. This fixes
the current usages of G_HAS_CONSTRUCTORS, as that header is not installed
by glib.
2019-03-17 21:29:59 +01:00
Matthias Clasen
06f790d663 gdk: Add a related_target field to some events
Crossing and focus change events are emitted between
two widgets, and want to associate both with the
events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
c73972f7df gdk: Rename gdk_event_set_user_data
Lets call it what it is, the target.
All of this is private api anyway.

Update all callers.
2019-03-16 21:24:45 -04:00
Matthias Clasen
8d5f1ae662 gdk: Add crossing mode and detail to focus events
We want focus events more similar to crossing events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
eacbeb9efd x11: Don't emit GDK_NOTHING events
They are good for nothing.
2019-03-06 23:42:36 -05:00
Bastien Nocera
91ad2eef5c surface: Advise using gtk_window_present_with_time()
Rather than gtk_window_present()
2019-02-25 17:38:08 +01:00
Bastien Nocera
df6494d73a Add 4.0 deprecation warning macros
Note that functions deprecated in 4.0 will cause deprecation warnings
even with the pre-4.0 GTK development versions.
2019-02-25 17:38:08 +01:00