pub fn configure(this: ObjectRef<Self>, client: &mut Client) -> Result<(), Error> {
        ftrace::duration!("wayland", "XdgToplevel::configure");
        let (width, height, xdg_surface_ref, surface_ref) = {
            let (view, xdg_surface_ref, surface_ref) = {
                let toplevel = this.get(client)?;
                (toplevel.view.clone(), toplevel.xdg_surface_ref, toplevel.surface_ref)
            };
            let physical_size = view
                .as_ref()
                .map(|view| view.lock().physical_size(client))
                .unwrap_or(Size { width: 0, height: 0 });
            (physical_size.width, physical_size.height, xdg_surface_ref, surface_ref)
        };

        // Always set the maximized state to hint to the client it really should
        // obey the geometry we're asking. From the xdg_shell spec:
        //
        // maximized:
        //    The surface is maximized. The window geometry specified in the
        //    configure event must be obeyed by the client.
        let mut states = wl::Array::new();
        states.push(zxdg_toplevel_v6::State::Maximized)?;
        if client.input_dispatcher.has_focus(surface_ref) {
            // If the window has focus, we set the activiated state. This is
            // just a hint to pass along to the client so it can draw itself
            // differently with and without focus.
            states.push(zxdg_toplevel_v6::State::Activated)?;
        }
        client
            .event_queue()
            .post(this.id(), ZxdgToplevelV6Event::Configure { width, height, states })?;

        // Send the xdg_surface::configure event to mark the end of the
        // configuration sequence.
        XdgSurface::configure(xdg_surface_ref, client)?;
        Ok(())
    }
/// Performs a configure sequence for the XdgToplevel object referenced by
/// `this`.
Performs a configure sequence for the XdgToplevel object referenced by
`this`.
Performs a configure sequence for the XdgToplevel object referenced by ` this ` .
pub fn configure(this: ObjectRef<Self>, client: &mut Client) -> Result<(), Error> {
        ftrace::duration!("wayland", "XdgToplevel::configure");
        let (width, height, xdg_surface_ref, surface_ref) = {
            let (view, xdg_surface_ref, surface_ref) = {
                let toplevel = this.get(client)?;
                (toplevel.view.clone(), toplevel.xdg_surface_ref, toplevel.surface_ref)
            };
            let physical_size = view
                .as_ref()
                .map(|view| view.lock().physical_size(client))
                .unwrap_or(Size { width: 0, height: 0 });
            (physical_size.width, physical_size.height, xdg_surface_ref, surface_ref)
        };
        // Always set the maximized state to hint to the client it really should
        // obey the geometry we're asking. From the xdg_shell spec:
        //
        // maximized:
        //    The surface is maximized. The window geometry specified in the
        //    configure event must be obeyed by the client.
        let mut states = wl::Array::new();
        states.push(zxdg_toplevel_v6::State::Maximized)?;
        if client.input_dispatcher.has_focus(surface_ref) {
            // If the window has focus, we set the activiated state. This is
            // just a hint to pass along to the client so it can draw itself
            // differently with and without focus.
            states.push(zxdg_toplevel_v6::State::Activated)?;
        }
        client
            .event_queue()
            .post(this.id(), ZxdgToplevelV6Event::Configure { width, height, states })?;
        // Send the xdg_surface::configure event to mark the end of the
        // configuration sequence.
        XdgSurface::configure(xdg_surface_ref, client)?;
        Ok(())
    }
pub fn configure ( this : ObjectRef < Self > , client : & mut Client ) -> Result < ( ) , Error > { ftrace :: duration ! ( " " " " ) ; let ( width , height , xdg_surface_ref , surface_ref ) = { let ( view , xdg_surface_ref , surface_ref ) = { let toplevel = this . get ( client ) ? ; ( toplevel . view . clone ( ) , toplevel . xdg_surface_ref , toplevel . surface_ref ) } ; let physical_size = view . as_ref ( ) . map ( | view | view . lock ( ) . physical_size ( client ) ) . unwrap_or ( Size { width : 0 , height : 0 } ) ; ( physical_size . width , physical_size . height , xdg_surface_ref , surface_ref ) } ; // Always set the maximized state to hint to the client it really should // obey the geometry we're asking. From the xdg_shell spec: // // maximized: //    The surface is maximized. The window geometry specified in the //    configure event must be obeyed by the client. let mut states = wl :: Array :: new ( ) ; states . push ( zxdg_toplevel_v6 :: State :: Maximized ) ? ; if client . input_dispatcher . has_focus ( surface_ref ) { // If the window has focus, we set the activiated state. This is // just a hint to pass along to the client so it can draw itself // differently with and without focus. states . push ( zxdg_toplevel_v6 :: State :: Activated ) ? ; } client . event_queue ( ) . post ( this . id ( ) , ZxdgToplevelV6Event :: Configure { width , height , states } ) ? ; // Send the xdg_surface::configure event to mark the end of the // configuration sequence. XdgSurface :: configure ( xdg_surface_ref , client ) ? ; Ok ( ( ) ) }
Performs a configure sequence for the XdgToplevel object referenced by
`this`.
Performs a configure sequence for the XdgToplevel object referenced by ` this ` .
this
ObjectRef<Self>
client
&mut Client
this
ObjectRef<Self>
client
&mut Client