mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
tests/clutter/utils: Add helper to flush input thread
This helps making sure input events we inject have managed to reach the main thread. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2727>
This commit is contained in:
parent
489bc65381
commit
c3f7bf331c
@ -8,6 +8,7 @@
|
||||
#include "backends/meta-virtual-monitor.h"
|
||||
#include "compositor/meta-plugin-manager.h"
|
||||
#include "core/meta-context-private.h"
|
||||
#include "tests/meta-test-utils.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -75,6 +76,12 @@ clutter_test_get_stage (void)
|
||||
return meta_backend_get_stage (backend);
|
||||
}
|
||||
|
||||
void
|
||||
clutter_test_flush_input (void)
|
||||
{
|
||||
meta_flush_input (test_environ->context);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
gpointer test_func;
|
||||
gpointer test_data;
|
||||
|
@ -113,6 +113,9 @@ void clutter_test_add_data_full (const char *test_path,
|
||||
gpointer test_data,
|
||||
GDestroyNotify test_notify);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_test_flush_input (void);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterActor * clutter_test_get_stage (void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user