Skip to content

Commit

Permalink
deploy: bbb2edc
Browse files Browse the repository at this point in the history
  • Loading branch information
sminez committed Jun 26, 2024
1 parent 96267ce commit f2bec04
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rustdoc/penrose/x/index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Logic for interacting with the X server"><title>penrose::x - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-081576b923113409.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="penrose" data-themes="" data-resource-suffix="" data-rustdoc-version="1.79.0 (129f3b996 2024-06-10)" data-channel="1.79.0" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../penrose/index.html"><img src="https://raw.githubusercontent.com/sminez/penrose/develop/icon.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../penrose/index.html"><img src="https://raw.githubusercontent.com/sminez/penrose/develop/icon.svg" alt="logo"></a><h2><a href="../../penrose/index.html">penrose</a><span class="version">0.3.6</span></h2></div><h2 class="location"><a href="#">Module x</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></section><h2><a href="../index.html">In crate penrose</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../penrose/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">penrose</a>::<wbr><a class="mod" href="#">x</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/penrose/x/mod.rs.html#1-707">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Logic for interacting with the X server</p>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Logic for interacting with the X server"><title>penrose::x - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-081576b923113409.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="penrose" data-themes="" data-resource-suffix="" data-rustdoc-version="1.79.0 (129f3b996 2024-06-10)" data-channel="1.79.0" data-search-js="search-bf21c90c8c1d92b1.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-e32f0c247825364d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-09095024cf37855e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../penrose/index.html"><img src="https://raw.githubusercontent.com/sminez/penrose/develop/icon.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../penrose/index.html"><img src="https://raw.githubusercontent.com/sminez/penrose/develop/icon.svg" alt="logo"></a><h2><a href="../../penrose/index.html">penrose</a><span class="version">0.3.6</span></h2></div><h2 class="location"><a href="#">Module x</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></section><h2><a href="../index.html">In crate penrose</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../penrose/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings">Settings</a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">penrose</a>::<wbr><a class="mod" href="#">x</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/penrose/x/mod.rs.html#1-714">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Logic for interacting with the X server</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.Atom"><code>pub use atom::<a class="enum" href="atom/enum.Atom.html" title="enum penrose::x::atom::Atom">Atom</a>;</code></div></li><li><div class="item-name" id="reexport.XEvent"><code>pub use event::<a class="enum" href="event/enum.XEvent.html" title="enum penrose::x::event::XEvent">XEvent</a>;</code></div></li><li><div class="item-name" id="reexport.Prop"><code>pub use property::<a class="enum" href="property/enum.Prop.html" title="enum penrose::x::property::Prop">Prop</a>;</code></div></li><li><div class="item-name" id="reexport.WindowAttributes"><code>pub use property::<a class="struct" href="property/struct.WindowAttributes.html" title="struct penrose::x::property::WindowAttributes">WindowAttributes</a>;</code></div></li><li><div class="item-name" id="reexport.Query"><code>pub use query::<a class="trait" href="query/trait.Query.html" title="trait penrose::x::query::Query">Query</a>;</code></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="atom/index.html" title="mod penrose::x::atom">atom</a></div><div class="desc docblock-short">Data types for working with X atoms</div></li><li><div class="item-name"><a class="mod" href="event/index.html" title="mod penrose::x::event">event</a></div><div class="desc docblock-short">Data types for working with X events</div></li><li><div class="item-name"><a class="mod" href="property/index.html" title="mod penrose::x::property">property</a></div><div class="desc docblock-short">Data types for working with X window properties</div></li><li><div class="item-name"><a class="mod" href="query/index.html" title="mod penrose::x::query">query</a></div><div class="desc docblock-short">Queries against client windows</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.ClientAttr.html" title="enum penrose::x::ClientAttr">ClientAttr</a></div><div class="desc docblock-short">Attributes for an X11 client window (not all are curently implemented)</div></li><li><div class="item-name"><a class="enum" href="enum.ClientConfig.html" title="enum penrose::x::ClientConfig">ClientConfig</a></div><div class="desc docblock-short">On screen configuration options for X clients (not all are curently implemented)</div></li><li><div class="item-name"><a class="enum" href="enum.WinType.html" title="enum penrose::x::WinType">WinType</a></div><div class="desc docblock-short">A window type to be specified when creating a new window in the X server</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.XConn.html" title="trait penrose::x::XConn">XConn</a></div><div class="desc docblock-short">A handle on a running X11 connection that we can use for issuing X requests.</div></li><li><div class="item-name"><a class="trait" href="trait.XConnExt.html" title="trait penrose::x::XConnExt">XConnExt</a></div><div class="desc docblock-short">Extended functionality for <a href="trait.XConn.html" title="trait penrose::x::XConn">XConn</a> impls in order to run the window manager.</div></li></ul></section></div></main></body></html>
18 changes: 16 additions & 2 deletions rustdoc/src/penrose/x/mod.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,13 @@
<a href="#705" id="705">705</a>
<a href="#706" id="706">706</a>
<a href="#707" id="707">707</a>
<a href="#708" id="708">708</a>
<a href="#709" id="709">709</a>
<a href="#710" id="710">710</a>
<a href="#711" id="711">711</a>
<a href="#712" id="712">712</a>
<a href="#713" id="713">713</a>
<a href="#714" id="714">714</a>
</pre></div><pre class="rust"><code><span class="doccomment">//! Logic for interacting with the X server
</span><span class="kw">use crate</span>::{
builtin::layout::messages::Hide,
Expand Down Expand Up @@ -1200,6 +1207,7 @@
}

<span class="doccomment">/// When positioning a floating client we try to position them in priority order of:
/// - the client's requested position if it is not at the origin
/// - centered in their parent's screen (if transient)
/// - centered in the focused screen
</span><span class="kw">fn </span>floating_client_position&lt;X: XConn&gt;(
Expand All @@ -1210,16 +1218,22 @@
) -&gt; <span class="prelude-ty">Result</span>&lt;Rect&gt; {
<span class="kw">let </span>r_initial = x.client_geometry(id)<span class="question-mark">?</span>;

<span class="kw">if </span>(r_initial.x, r_initial.y) != (<span class="number">0</span>, <span class="number">0</span>) {
<span class="kw">return </span><span class="prelude-val">Ok</span>(r_initial);
}

<span class="kw">let </span>r_screen = transient_for
.and_then(|parent| state.client_set.screen_for_client(<span class="kw-2">&amp;</span>parent))
.unwrap_or(<span class="kw-2">&amp;</span>state.client_set.screens.focus)
.r;

<span class="prelude-val">Ok</span>(r_initial.centered_in(<span class="kw-2">&amp;</span>r_screen).unwrap_or_else(|| {
<span class="kw">let </span>r_final = r_initial.centered_in(<span class="kw-2">&amp;</span>r_screen).unwrap_or_else(|| {
r_initial
.centered_in(<span class="kw-2">&amp;</span>state.client_set.screens.focus.r)
.unwrap_or(r_initial)
}))
});

<span class="prelude-val">Ok</span>(r_final)
}

<span class="kw">fn </span>notify_killed&lt;X: XConn&gt;(x: <span class="kw-2">&amp;</span>X, state: <span class="kw-2">&amp;mut </span>State&lt;X&gt;) -&gt; <span class="prelude-ty">Result</span>&lt;()&gt; {
Expand Down

0 comments on commit f2bec04

Please sign in to comment.