Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Added Surface::is_layer_surface
Browse files Browse the repository at this point in the history
  • Loading branch information
Timidger committed Jun 8, 2018
1 parent f9afe4e commit 7df1de8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/types/surface/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use wayland_sys::server::signal::wl_signal_add;
use wlroots_sys::{timespec, wlr_subsurface, wlr_surface, wlr_surface_get_root_surface,
wlr_surface_has_buffer, wlr_surface_point_accepts_input, wlr_surface_send_enter,
wlr_surface_send_frame_done, wlr_surface_send_leave, wlr_surface_surface_at,
wlr_surface_is_xdg_surface};
wlr_surface_is_layer_surface, wlr_surface_is_xdg_surface};

use super::{Subsurface, SubsurfaceHandle, SubsurfaceHandler, SubsurfaceManager, SurfaceState,
InternalSubsurface};
Expand Down Expand Up @@ -300,6 +300,13 @@ impl Surface {
unsafe { (*self.surface).surface_to_buffer_matrix }
}

/// Determines if this surface is a layer surface.
pub fn is_layer_surface(&self) -> bool {
unsafe {
wlr_surface_is_layer_surface(self.surface)
}
}

/// Creates a weak reference to a `Surface`.
///
/// # Panics
Expand Down

0 comments on commit 7df1de8

Please sign in to comment.