Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > c67c6057ffd14254a26624517a2352e6 > files > 529

i3-doc-3.e-3.bf1.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>i3: src/manage.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>src/manage.c File Reference</h1><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
<code>#include &lt;xcb/xcb.h&gt;</code><br/>
<code>#include &lt;xcb/xcb_icccm.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="a00054_source.html">xcb.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00036_source.html">data.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00052_source.html">util.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00041_source.html">i3.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00051_source.html">table.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00034_source.html">config.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00040_source.html">handlers.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00043_source.html">layout.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00046_source.html">manage.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00039_source.html">floating.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00032_source.html">client.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00053_source.html">workspace.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00044_source.html">log.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="a00038_source.html">ewmh.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for manage.c:</div>
<div class="dynsection">
</div>

<p><a href="a00072_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#a525375308e06d233e560f4e739e02ca6">manage_existing_windows</a> (xcb_connection_t *conn, xcb_property_handlers_t *prophs, xcb_window_t <a class="el" href="a00041.html#a768f07da9e11ab88732a5c550ff49257">root</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Go through all existing windows (if the window manager is restarted) and manage them.  <a href="#a525375308e06d233e560f4e739e02ca6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#a7a5eac8069bf76ea873503dd80100544">restore_geometry</a> (xcb_connection_t *conn)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Restores the geometry of each window by reparenting it to the root window at the position of its frame.  <a href="#a7a5eac8069bf76ea873503dd80100544"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#a4a34e4e6e27dfe96206b43297c001f9c">manage_window</a> (xcb_property_handlers_t *prophs, xcb_connection_t *conn, xcb_window_t window, xcb_get_window_attributes_cookie_t cookie, bool needs_to_be_mapped)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Do some sanity checks and then reparent the window.  <a href="#a4a34e4e6e27dfe96206b43297c001f9c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00072.html#a3231348efe9bf4a5f43fe491b1fbfbc8">reparent_window</a> (xcb_connection_t *conn, xcb_window_t child, xcb_visualid_t visual, xcb_window_t <a class="el" href="a00041.html#a768f07da9e11ab88732a5c550ff49257">root</a>, uint8_t depth, int16_t x, int16_t y, uint16_t width, uint16_t height, uint32_t border_width)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="a00072.html#a3231348efe9bf4a5f43fe491b1fbfbc8" title="reparent_window() gets called when a new window was opened and becomes a child of...">reparent_window()</a> gets called when a new window was opened and becomes a child of the root window, or it gets called by us when we manage the already existing windows at startup.  <a href="#a3231348efe9bf4a5f43fe491b1fbfbc8"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a525375308e06d233e560f4e739e02ca6"></a><!-- doxytag: member="manage.c::manage_existing_windows" ref="a525375308e06d233e560f4e739e02ca6" args="(xcb_connection_t *conn, xcb_property_handlers_t *prophs, xcb_window_t root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void manage_existing_windows </td>
          <td>(</td>
          <td class="paramtype">xcb_connection_t *&nbsp;</td>
          <td class="paramname"> <em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xcb_property_handlers_t *&nbsp;</td>
          <td class="paramname"> <em>prophs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xcb_window_t&nbsp;</td>
          <td class="paramname"> <em>root</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Go through all existing windows (if the window manager is restarted) and manage them. </p>

<p>Definition at line <a class="el" href="a00072_source.html#l00040">40</a> of file <a class="el" href="a00072_source.html">manage.c</a>.</p>

<p>References <a class="el" href="a00072_source.html#l00092">manage_window()</a>, and <a class="el" href="a00077_source.html#l00068">smalloc()</a>.</p>

<p>Referenced by <a class="el" href="a00071_source.html#l00193">main()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a4a34e4e6e27dfe96206b43297c001f9c"></a><!-- doxytag: member="manage.c::manage_window" ref="a4a34e4e6e27dfe96206b43297c001f9c" args="(xcb_property_handlers_t *prophs, xcb_connection_t *conn, xcb_window_t window, xcb_get_window_attributes_cookie_t cookie, bool needs_to_be_mapped)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void manage_window </td>
          <td>(</td>
          <td class="paramtype">xcb_property_handlers_t *&nbsp;</td>
          <td class="paramname"> <em>prophs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xcb_connection_t *&nbsp;</td>
          <td class="paramname"> <em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xcb_window_t&nbsp;</td>
          <td class="paramname"> <em>window</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xcb_get_window_attributes_cookie_t&nbsp;</td>
          <td class="paramname"> <em>cookie</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>needs_to_be_mapped</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Do some sanity checks and then reparent the window. </p>

<p>Definition at line <a class="el" href="a00072_source.html#l00092">92</a> of file <a class="el" href="a00072_source.html">manage.c</a>.</p>

<p>References <a class="el" href="a00054_source.html#l00049">_NET_WM_NAME</a>, <a class="el" href="a00071_source.html#l00083">atoms</a>, <a class="el" href="a00077_source.html#l00042">by_child</a>, <a class="el" href="a00044_source.html#l00020">ELOG</a>, <a class="el" href="a00072_source.html#l00151">reparent_window()</a>, <a class="el" href="a00077_source.html#l00114">table_get()</a>, and <a class="el" href="a00054_source.html#l00064">WM_CLIENT_LEADER</a>.</p>

<p>Referenced by <a class="el" href="a00067_source.html#l00274">handle_map_request()</a>, and <a class="el" href="a00072_source.html#l00040">manage_existing_windows()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a3231348efe9bf4a5f43fe491b1fbfbc8"></a><!-- doxytag: member="manage.c::reparent_window" ref="a3231348efe9bf4a5f43fe491b1fbfbc8" args="(xcb_connection_t *conn, xcb_window_t child, xcb_visualid_t visual, xcb_window_t root, uint8_t depth, int16_t x, int16_t y, uint16_t width, uint16_t height, uint32_t border_width)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void reparent_window </td>
          <td>(</td>
          <td class="paramtype">xcb_connection_t *&nbsp;</td>
          <td class="paramname"> <em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xcb_window_t&nbsp;</td>
          <td class="paramname"> <em>child</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xcb_visualid_t&nbsp;</td>
          <td class="paramname"> <em>visual</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xcb_window_t&nbsp;</td>
          <td class="paramname"> <em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>depth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&nbsp;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>border_width</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="a00072.html#a3231348efe9bf4a5f43fe491b1fbfbc8" title="reparent_window() gets called when a new window was opened and becomes a child of...">reparent_window()</a> gets called when a new window was opened and becomes a child of the root window, or it gets called by us when we manage the already existing windows at startup. </p>
<p>Essentially, this is the point where we take over control. </p>

<p>Definition at line <a class="el" href="a00072_source.html#l00151">151</a> of file <a class="el" href="a00072_source.html">manage.c</a>.</p>

<p>References <a class="el" href="a00054_source.html#l00049">_NET_WM_NAME</a>, <a class="el" href="a00054_source.html#l00051">_NET_WM_STATE</a>, <a class="el" href="a00054_source.html#l00050">_NET_WM_STATE_FULLSCREEN</a>, <a class="el" href="a00054_source.html#l00059">_NET_WM_STRUT_PARTIAL</a>, <a class="el" href="a00054_source.html#l00052">_NET_WM_WINDOW_TYPE</a>, <a class="el" href="a00054_source.html#l00054">_NET_WM_WINDOW_TYPE_DIALOG</a>, <a class="el" href="a00054_source.html#l00053">_NET_WM_WINDOW_TYPE_DOCK</a>, <a class="el" href="a00054_source.html#l00057">_NET_WM_WINDOW_TYPE_SPLASH</a>, <a class="el" href="a00054_source.html#l00056">_NET_WM_WINDOW_TYPE_TOOLBAR</a>, <a class="el" href="a00054_source.html#l00055">_NET_WM_WINDOW_TYPE_UTILITY</a>, <a class="el" href="a00036_source.html#l00311">Assignment::ASSIGN_FLOATING</a>, <a class="el" href="a00036_source.html#l00310">Assignment::ASSIGN_FLOATING_ONLY</a>, <a class="el" href="a00071_source.html#l00075">assignments</a>, <a class="el" href="a00071_source.html#l00083">atoms</a>, <a class="el" href="a00077_source.html#l00042">by_child</a>, <a class="el" href="a00077_source.html#l00041">by_parent</a>, <a class="el" href="a00076_source.html#l00036">c_ws</a>, <a class="el" href="a00054_source.html#l00033">CHILD_EVENT_MASK</a>, <a class="el" href="a00047_source.html#l00457">CIRCLEQ_INSERT_AFTER</a>, <a class="el" href="a00047_source.html#l00487">CIRCLEQ_INSERT_TAIL</a>, <a class="el" href="a00060_source.html#l00349">client_init_border()</a>, <a class="el" href="a00060_source.html#l00339">client_is_floating()</a>, <a class="el" href="a00060_source.html#l00414">client_map()</a>, <a class="el" href="a00060_source.html#l00313">client_set_below_floating()</a>, <a class="el" href="a00060_source.html#l00281">client_toggle_fullscreen()</a>, <a class="el" href="a00036_source.html#l00475">Container::col</a>, <a class="el" href="a00062_source.html#l00037">config</a>, <a class="el" href="a00036_source.html#l00353">Client::container</a>, <a class="el" href="a00079_source.html#l00093">create_window()</a>, <a class="el" href="a00051_source.html#l00021">CUR_CELL</a>, <a class="el" href="a00036_source.html#l00211">Workspace::current_col</a>, <a class="el" href="a00036_source.html#l00208">Workspace::current_row</a>, <a class="el" href="a00036_source.html#l00528">xoutput::current_workspace</a>, <a class="el" href="a00036_source.html#l00469">Container::currently_focused</a>, <a class="el" href="a00034_source.html#l00107">Config::default_border</a>, <a class="el" href="a00044_source.html#l00021">DLOG</a>, <a class="el" href="a00036_source.html#l00431">Client::dock</a>, <a class="el" href="a00065_source.html#l00045">ewmh_update_active_window()</a>, <a class="el" href="a00001.html#a7706b3c433fc9199bc55ebf9e56ffbe6">Assignment::floating</a>, <a class="el" href="a00034_source.html#l00087">Config::font</a>, <a class="el" href="a00054_source.html#l00038">FRAME_EVENT_MASK</a>, <a class="el" href="a00077_source.html#l00440">get_matching_client()</a>, <a class="el" href="a00073_source.html#l00099">get_output_containing()</a>, <a class="el" href="a00067_source.html#l01076">handle_clientleader_change()</a>, <a class="el" href="a00067_source.html#l00738">handle_windowclass_change()</a>, <a class="el" href="a00067_source.html#l00603">handle_windowname_change()</a>, <a class="el" href="a00067_source.html#l00675">handle_windowname_change_legacy()</a>, <a class="el" href="a00036_source.html#l00331">Font::height</a>, <a class="el" href="a00036_source.html#l00100">Rect::height</a>, <a class="el" href="a00054.html#a50c1fc0de5343536d542c8349ab7ab0d">load_font()</a>, <a class="el" href="a00044_source.html#l00019">LOG</a>, <a class="el" href="a00077_source.html#l00048">max()</a>, <a class="el" href="a00077_source.html#l00044">min()</a>, <a class="el" href="a00036_source.html#l00516">xoutput::name</a>, <a class="el" href="a00036_source.html#l00184">Workspace::num</a>, <a class="el" href="a00036_source.html#l00239">Workspace::output</a>, <a class="el" href="a00036_source.html#l00359">Client::rect</a>, <a class="el" href="a00036_source.html#l00199">Workspace::rect</a>, <a class="el" href="a00069_source.html#l00081">redecorate_window()</a>, <a class="el" href="a00069_source.html#l00348">render_container()</a>, <a class="el" href="a00069_source.html#l00771">render_layout()</a>, <a class="el" href="a00069_source.html#l00206">reposition_client()</a>, <a class="el" href="a00069_source.html#l00248">resize_client()</a>, <a class="el" href="a00036_source.html#l00474">Container::row</a>, <a class="el" href="a00077_source.html#l00074">scalloc()</a>, <a class="el" href="a00047_source.html#l00132">SLIST_INSERT_AFTER</a>, <a class="el" href="a00047_source.html#l00137">SLIST_INSERT_HEAD</a>, <a class="el" href="a00036_source.html#l00244">Workspace::table</a>, <a class="el" href="a00077_source.html#l00114">table_get()</a>, <a class="el" href="a00077_source.html#l00091">table_put()</a>, <a class="el" href="a00047_source.html#l00335">TAILQ_FOREACH</a>, <a class="el" href="a00047_source.html#l00363">TAILQ_INSERT_TAIL</a>, <a class="el" href="a00058_source.html#l00085">UINT32_MAX</a>, <a class="el" href="a00036_source.html#l00222">Workspace::urgent</a>, <a class="el" href="a00036_source.html#l00099">Rect::width</a>, <a class="el" href="a00036_source.html#l00304">Assignment::windowclass_title</a>, <a class="el" href="a00054_source.html#l00064">WM_CLIENT_LEADER</a>, <a class="el" href="a00036_source.html#l00315">Assignment::workspace</a>, <a class="el" href="a00036_source.html#l00488">Container::workspace</a>, <a class="el" href="a00036_source.html#l00356">Client::workspace</a>, <a class="el" href="a00078_source.html#l00039">workspace_get()</a>, <a class="el" href="a00078_source.html#l00271">workspace_initialize()</a>, <a class="el" href="a00078_source.html#l00105">workspace_is_visible()</a>, <a class="el" href="a00036_source.html#l00097">Rect::x</a>, <a class="el" href="a00054_source.html#l00022">XCB_CURSOR_LEFT_PTR</a>, <a class="el" href="a00079_source.html#l00259">xcb_raise_window()</a>, and <a class="el" href="a00036_source.html#l00098">Rect::y</a>.</p>

<p>Referenced by <a class="el" href="a00072_source.html#l00092">manage_window()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>
</p>

</div>
</div>
<a class="anchor" id="a7a5eac8069bf76ea873503dd80100544"></a><!-- doxytag: member="manage.c::restore_geometry" ref="a7a5eac8069bf76ea873503dd80100544" args="(xcb_connection_t *conn)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void restore_geometry </td>
          <td>(</td>
          <td class="paramtype">xcb_connection_t *&nbsp;</td>
          <td class="paramname"> <em>conn</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Restores the geometry of each window by reparenting it to the root window at the position of its frame. </p>
<p>This is to be called *only* before exiting/restarting i3 because of evil side-effects which are to be expected when continuing to run i3. </p>

<p>Definition at line <a class="el" href="a00072_source.html#l00074">74</a> of file <a class="el" href="a00072_source.html">manage.c</a>.</p>

<p>References <a class="el" href="a00036_source.html#l00452">Client::child</a>, <a class="el" href="a00044_source.html#l00021">DLOG</a>, <a class="el" href="a00036_source.html#l00359">Client::rect</a>, <a class="el" href="a00071_source.html#l00085">root</a>, <a class="el" href="a00047_source.html#l00115">SLIST_FOREACH</a>, <a class="el" href="a00047_source.html#l00335">TAILQ_FOREACH</a>, <a class="el" href="a00076_source.html#l00034">workspaces</a>, <a class="el" href="a00036_source.html#l00097">Rect::x</a>, and <a class="el" href="a00036_source.html#l00098">Rect::y</a>.</p>

<p>Referenced by <a class="el" href="a00077_source.html#l00514">i3_restart()</a>, and <a class="el" href="a00061_source.html#l00950">parse_command()</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>