Commit Graph

8561 Commits

Author SHA1 Message Date
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
Matthias Clasen
397b8ee9d5 docs: Its just GTK now
Another round of + removal.
2019-02-24 13:33:36 -05:00
Matthias Clasen
77c0e68b57 gdk: Rename our vulkan context to GTK
Not sure it shows up anywhere, but just for completeness.
2019-02-24 10:53:23 -05:00
Matthias Clasen
fd667bb203 docs: Its just GTK now
Remove the + from GTK+ in more places in the GDK docs.
2019-02-24 10:51:21 -05:00
Matthias Clasen
d773bc0689 docs: Its just GTK now
Remove the + from GTK+ in the GDK docs.
2019-02-24 10:49:01 -05:00
Matthias Clasen
cc216c9e84 Remove gdk_surface_set_user_data
Change gdk_surface_get/set_user_data to private
API and rename them to get/set_widget.
Also remove an unused associated function.

The last two places where the surface API is used
are in gtkroot.c and gtkwidget.c. Make them
use the private api.
2019-02-23 22:24:50 -05:00
Matthias Clasen
b82e57fec6 fixup: warn about nothing events 2019-02-23 21:25:10 -05:00
Matthias Clasen
b6893b6d9f Quietly ignore GDK_NOTHING events
These don't have a surface, so we can't deliver
them via the ::event signal. But then, they're
good for nothing anyway.
2019-02-23 17:09:25 -05:00
Matthias Clasen
ac8b192eab gdk: Document surface signals
At least a little bit.
2019-02-23 16:08:05 -05:00
Matthias Clasen
e16cdb141c Drop gdk_event_handler_set
This is no longer used by GTK.
2019-02-23 14:13:57 -05:00
Matthias Clasen
08badd23cd Drop some dead code
There were some internal uses of GdkEventFunc. Thankfully,
they were unused, so lets just drop them.
2019-02-23 14:13:57 -05:00
Matthias Clasen
23fb77af43 surface: Introduce an ::event signal
This will eventually replace the event handler
as the method to get events over the gdk/gtk
boundary.
2019-02-23 13:45:10 -05:00
Chun-wei Fan
8d987be673 Merge branch 'wip/fanc999/meson.msvc' into 'master'
GTK+ 4: Improve Windows/Visual Studio build experience

See merge request GNOME/gtk!185
2019-02-23 02:13:35 +00:00
Timm Bäder
2146fd28f8 GdkDisplay: Use a GQueue for the events queue 2019-02-10 10:31:27 +01:00
Emmanuele Bassi
22f073b57b docs: Fix references to pkg-config files
The pkg-config files for GDK were dropped in 4.0, and now the GTK
pkg-config files have been renamed.
2019-02-06 10:40:51 +01:00
Emmanuele Bassi
1668496359 docs: Fix GTK links and locations 2019-02-06 10:39:27 +01:00
Emmanuele Bassi
45361e19c3 Rename more GSources to use gtk 2019-02-06 10:37:24 +01:00
Alexander Larsson
ca1ffa0c23 Merge branch 'master' into 'master'
Ensure focus on click ( Fix #1633 )

Closes #1633

See merge request GNOME/gtk!546
2019-02-05 13:05:34 +00:00
Matthias Clasen
101f1c7b42 gdk: Stop using deprecated pango api 2019-02-04 18:28:31 -05:00
Matthias Clasen
2350d0945a gdk: Add a copy of some deprecated pango api
We use pango_find_base_dir() in a few places, and
this api has been deprecated.
2019-02-04 18:28:31 -05:00
Matthias Clasen
dbd360262c Add an explicit fribidi dep
We will use fribidi api to determine text direction.
2019-02-04 18:28:31 -05:00
Mickael Istria
14010899b5 Issue #1633 - Ensure focus on click
This is necessary to give back focus to the Broadway elements when
content is embedded in an IFrame.

Signed-off-by: Mickael Istria <mistria@redhat.com>
2019-02-04 17:46:09 +01:00
Emmanuele Bassi
4040f76529 Use @basename@ in enumeration type templates
The @filename@ directive will use the full path of the file being parsed
for enumeration types; we should use @basename@, instead, as it improves
the reproducibility of the build by using only the file name.
2019-02-04 14:02:45 +01:00
Emmanuele Bassi
35e973d698 docs: Remove <ulink> elements
We use Markdown for documentation, not Docbook.
2019-02-04 09:53:22 +01:00
Matthias Clasen
2de7f760e5 gl texture: fix a typo 2019-01-23 22:33:44 -05:00
Benjamin Otte
359bc7695c build: Reintroduce warning flags from autotools
Some of the flags got lost in the meson transition or were demoted from
error flags to warning flags.
This commit reintroduces them.

It also includes fixes for the code that had warnings with those flags.
The big one being -Wshadow.
2019-01-22 04:33:12 +01:00
Timm Bäder
5c81cc2f36 GdkEvent: Make gdk_event_set_user_data private 2019-01-18 19:43:48 +01:00
Timm Bäder
01e985a830 GdkEvent: Remove unused struct 2019-01-18 19:43:48 +01:00