mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 03:52:05 +00:00
display: Tweak code to work around a compiler warning
The compiler is not quite smart enough to figure out that the condition for setting the "compositor" variable matches a later condition for accessing it, so express this in a way the compiler will understand.
This commit is contained in:
parent
333661a9d8
commit
17f48baf3a
@ -2042,7 +2042,7 @@ meta_display_handle_event (MetaDisplay *display,
|
||||
/* XXX -- we need to fill this in properly at some point... */
|
||||
gboolean frame_was_receiver = FALSE;
|
||||
#ifdef HAVE_WAYLAND
|
||||
MetaWaylandCompositor *compositor;
|
||||
MetaWaylandCompositor *compositor = NULL;
|
||||
|
||||
if (meta_is_wayland_compositor ())
|
||||
{
|
||||
@ -2293,7 +2293,7 @@ meta_display_handle_event (MetaDisplay *display,
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (meta_is_wayland_compositor () && (display->grab_op == META_GRAB_OP_NONE))
|
||||
if (compositor && (display->grab_op == META_GRAB_OP_NONE))
|
||||
{
|
||||
if (meta_wayland_compositor_handle_event (compositor, event))
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user