mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
cursor-tracker: Use our own marshal for cursor-moved
By putting `NULL` as the C marshaller in `g_signal_new`, you automatically get `g_cclosure_marshaller_generic`, which will try to process its arguments and return value with the help of libffi and GValue. Using `glib-genmarshal` and valist_marshallers, we can prevent this so that we need less instructions for each signal emission. https://gitlab.gnome.org/GNOME/mutter/merge_requests/697
This commit is contained in:

committed by
Carlos Garnacho

parent
aae9f3a3e6
commit
efe6c13d93
@ -39,6 +39,7 @@
|
||||
#include "backends/x11/cm/meta-cursor-sprite-xfixes.h"
|
||||
#include "cogl/cogl.h"
|
||||
#include "clutter/clutter.h"
|
||||
#include "meta-marshal.h"
|
||||
#include "meta/main.h"
|
||||
#include "meta/meta-x11-errors.h"
|
||||
#include "meta/util.h"
|
||||
@ -170,10 +171,14 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
meta_marshal_VOID__FLOAT_FLOAT,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_FLOAT,
|
||||
G_TYPE_FLOAT);
|
||||
g_signal_set_va_marshaller (signals[CURSOR_MOVED],
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
meta_marshal_VOID__FLOAT_FLOATv);
|
||||
|
||||
signals[VISIBILITY_CHANGED] = g_signal_new ("visibility-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
Reference in New Issue
Block a user