設定在視窗標題列,滑鼠中鍵滾動,切換隱藏內容區塊時,保持聚焦

範例

openbox / adjustment / mousebind

Mouse middle scroll on titlebar, keep focus, when window shading

context Titlebar / 一開始的設定片段

  <mouse>
    <context name="Titlebar">

      <mousebind button="Up" action="Click">
        <action name="if">
          <shaded>no</shaded>
          <then>
            <action name="Shade"/>
            <action name="FocusToBottom"/>
            <action name="Unfocus"/>
            <action name="Lower"/>
          </then>
        </action>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="if">
          <shaded>yes</shaded>
          <then>
            <action name="Unshade"/>
            <action name="Raise"/>
          </then>
        </action>
      </mousebind>
    </context>

  </mouse>

context Titlebar / 調整過的設定片段

  <mouse>
    <context name="Titlebar">

      <mousebind button="Up" action="Click">
        <action name="if">
          <shaded>no</shaded>
          <then>
            <action name="Shade"/>
            <!--
            <action name="FocusToBottom"/>
            <action name="Unfocus"/>
            <action name="Lower"/>
            //-->
          </then>
        </action>
      </mousebind>
      <mousebind button="Down" action="Click">
        <action name="if">
          <shaded>yes</shaded>
          <then>
            <action name="Unshade"/>
            <action name="Raise"/>
          </then>
        </action>
      </mousebind>

    </context>
  </mouse>

相關討論