mirror of
https://github.com/brl/mutter.git
synced 2025-02-18 14:14:10 +00:00
tests/wayland-fullscreen: Check surface size
In the test in question, it should be smaller than the window geometry, since the black background makes the window geomerty larger than the surface. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2338>
This commit is contained in:
parent
6db67c3f21
commit
19df8888fb
@ -19,12 +19,14 @@
|
|||||||
|
|
||||||
#include "backends/meta-virtual-monitor.h"
|
#include "backends/meta-virtual-monitor.h"
|
||||||
#include "compositor/meta-window-actor-private.h"
|
#include "compositor/meta-window-actor-private.h"
|
||||||
|
#include "core/window-private.h"
|
||||||
#include "meta-test/meta-context-test.h"
|
#include "meta-test/meta-context-test.h"
|
||||||
#include "tests/meta-test-utils.h"
|
#include "tests/meta-test-utils.h"
|
||||||
#include "tests/meta-wayland-test-driver.h"
|
#include "tests/meta-wayland-test-driver.h"
|
||||||
#include "tests/meta-wayland-test-utils.h"
|
#include "tests/meta-wayland-test-utils.h"
|
||||||
#include "backends/native/meta-renderer-native.h"
|
#include "backends/native/meta-renderer-native.h"
|
||||||
#include "tests/meta-ref-test.h"
|
#include "tests/meta-ref-test.h"
|
||||||
|
#include "wayland/meta-wayland-surface.h"
|
||||||
|
|
||||||
static MetaContext *test_context;
|
static MetaContext *test_context;
|
||||||
static MetaWaylandTestDriver *test_driver;
|
static MetaWaylandTestDriver *test_driver;
|
||||||
@ -32,6 +34,16 @@ static MetaVirtualMonitor *virtual_monitor;
|
|||||||
static MetaWaylandTestClient *wayland_test_client;
|
static MetaWaylandTestClient *wayland_test_client;
|
||||||
static MetaWindow *test_window = NULL;
|
static MetaWindow *test_window = NULL;
|
||||||
|
|
||||||
|
#define assert_wayland_surface_size(window, width, height) \
|
||||||
|
{ \
|
||||||
|
g_assert_cmpint (meta_wayland_surface_get_width (window->surface), \
|
||||||
|
==, \
|
||||||
|
width); \
|
||||||
|
g_assert_cmpint (meta_wayland_surface_get_height (window->surface), \
|
||||||
|
==, \
|
||||||
|
height); \
|
||||||
|
}
|
||||||
|
|
||||||
static ClutterStageView *
|
static ClutterStageView *
|
||||||
get_view (void)
|
get_view (void)
|
||||||
{
|
{
|
||||||
@ -101,6 +113,7 @@ toplevel_fullscreen (void)
|
|||||||
g_assert_cmpint (rect.height, ==, 100);
|
g_assert_cmpint (rect.height, ==, 100);
|
||||||
g_assert_cmpint (rect.x, ==, 0);
|
g_assert_cmpint (rect.x, ==, 0);
|
||||||
g_assert_cmpint (rect.y, ==, 0);
|
g_assert_cmpint (rect.y, ==, 0);
|
||||||
|
assert_wayland_surface_size (test_window, 10, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -357,7 +357,10 @@ void meta_wayland_surface_notify_subsurface_state_changed (MetaWa
|
|||||||
|
|
||||||
void meta_wayland_surface_notify_unmapped (MetaWaylandSurface *surface);
|
void meta_wayland_surface_notify_unmapped (MetaWaylandSurface *surface);
|
||||||
|
|
||||||
|
META_EXPORT_TEST
|
||||||
int meta_wayland_surface_get_width (MetaWaylandSurface *surface);
|
int meta_wayland_surface_get_width (MetaWaylandSurface *surface);
|
||||||
|
|
||||||
|
META_EXPORT_TEST
|
||||||
int meta_wayland_surface_get_height (MetaWaylandSurface *surface);
|
int meta_wayland_surface_get_height (MetaWaylandSurface *surface);
|
||||||
|
|
||||||
CoglScanout * meta_wayland_surface_try_acquire_scanout (MetaWaylandSurface *surface,
|
CoglScanout * meta_wayland_surface_try_acquire_scanout (MetaWaylandSurface *surface,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user