and bottom contexts resize vertically in the default config file.
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
- <context name="Handle">
+ <context name="Top">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize"><edge>top</edge></action>
+ </mousebind>
+ <mousebind button="Left" action="Press">
+ <action name="Activate"/>
+ </mousebind>
+ </context>
+ <context name="Bottom">
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>bottom</edge></action>
</mousebind>
<mousebind button="Left" action="Press">
- <action name="Focus"/>
+ <action name="Activate"/>
</mousebind>
</context>
<context name="BLCorner">
<xsd:enumeration value="Desktop"/>
<xsd:enumeration value="Client"/>
<xsd:enumeration value="Titlebar"/>
- <xsd:enumeration value="Handle"/>
<xsd:enumeration value="Frame"/>
<xsd:enumeration value="TLCorner"/>
<xsd:enumeration value="TRCorner"/>
<xsd:enumeration value="BLCorner"/>
<xsd:enumeration value="BRCorner"/>
+ <xsd:enumeration value="Top"/>
+ <xsd:enumeration value="Bottom"/>
<xsd:enumeration value="Maximize"/>
<xsd:enumeration value="AllDesktops"/>
<xsd:enumeration value="Shade"/>
{ "Middle", "Desktop", OB_MOUSE_ACTION_PRESS, "Focus" },
{ "Right", "Desktop", OB_MOUSE_ACTION_PRESS, "Focus" },
{ "Left", "Titlebar", OB_MOUSE_ACTION_PRESS, "Focus" },
- { "Left", "Handle", OB_MOUSE_ACTION_PRESS, "Focus" },
+ { "Left", "Bottom", OB_MOUSE_ACTION_PRESS, "Focus" },
{ "Left", "BLCorner", OB_MOUSE_ACTION_PRESS, "Focus" },
{ "Left", "BRCorner", OB_MOUSE_ACTION_PRESS, "Focus" },
{ "Left", "TLCorner", OB_MOUSE_ACTION_PRESS, "Focus" },
{ "Left", "Client", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Left", "Titlebar", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Middle", "Titlebar", OB_MOUSE_ACTION_CLICK, "Lower" },
- { "Left", "Handle", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Left", "BLCorner", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Left", "BRCorner", OB_MOUSE_ACTION_CLICK, "Raise" },
{ "Left", "TLCorner", OB_MOUSE_ACTION_CLICK, "Raise" },
self->title = createWindow(self->window, NULL, mask, &attrib);
mask |= CWCursor;
+ attrib.cursor = ob_cursor(OB_CURSOR_NORTH);
+ self->topresize = createWindow(self->title, NULL, mask, &attrib);
attrib.cursor = ob_cursor(OB_CURSOR_NORTHWEST);
self->tltresize = createWindow(self->title, NULL, mask, &attrib);
self->tllresize = createWindow(self->title, NULL, mask, &attrib);
XMapWindow(ob_display, self->title);
if (self->decorations & OB_FRAME_DECOR_GRIPS) {
+ XMoveResizeWindow(ob_display, self->topresize,
+ ob_rr_theme->grip_width + self->bwidth,
+ 0,
+ self->width - (ob_rr_theme->grip_width +
+ self->bwidth) * 2,
+ ob_rr_theme->paddingy + 1);
+
XMoveWindow(ob_display, self->tltresize, 0, 0);
XMoveWindow(ob_display, self->tllresize, 0, 0);
XMoveWindow(ob_display, self->trtresize,
self->width - ob_rr_theme->grip_width, 0);
XMoveWindow(ob_display, self->trrresize,
self->width - ob_rr_theme->paddingx - 1, 0);
+
+ XMapWindow(ob_display, self->topresize);
XMapWindow(ob_display, self->tltresize);
XMapWindow(ob_display, self->tllresize);
XMapWindow(ob_display, self->trtresize);
XMapWindow(ob_display, self->trrresize);
} else {
+ XUnmapWindow(ob_display, self->topresize);
XUnmapWindow(ob_display, self->tltresize);
XUnmapWindow(ob_display, self->tllresize);
XUnmapWindow(ob_display, self->trtresize);
g_hash_table_insert(window_map, &self->handle, self->client);
g_hash_table_insert(window_map, &self->lgrip, self->client);
g_hash_table_insert(window_map, &self->rgrip, self->client);
+ g_hash_table_insert(window_map, &self->topresize, self->client);
g_hash_table_insert(window_map, &self->tltresize, self->client);
g_hash_table_insert(window_map, &self->tllresize, self->client);
g_hash_table_insert(window_map, &self->trtresize, self->client);
g_hash_table_remove(window_map, &self->handle);
g_hash_table_remove(window_map, &self->lgrip);
g_hash_table_remove(window_map, &self->rgrip);
+ g_hash_table_remove(window_map, &self->topresize);
g_hash_table_remove(window_map, &self->tltresize);
g_hash_table_remove(window_map, &self->tllresize);
g_hash_table_remove(window_map, &self->trtresize);
return OB_FRAME_CONTEXT_CLIENT;
else if (!g_ascii_strcasecmp("Titlebar", name))
return OB_FRAME_CONTEXT_TITLEBAR;
- else if (!g_ascii_strcasecmp("Handle", name))
- return OB_FRAME_CONTEXT_HANDLE;
else if (!g_ascii_strcasecmp("Frame", name))
return OB_FRAME_CONTEXT_FRAME;
else if (!g_ascii_strcasecmp("TLCorner", name))
return OB_FRAME_CONTEXT_BLCORNER;
else if (!g_ascii_strcasecmp("BRCorner", name))
return OB_FRAME_CONTEXT_BRCORNER;
+ else if (!g_ascii_strcasecmp("Top", name))
+ return OB_FRAME_CONTEXT_TOP;
+ else if (!g_ascii_strcasecmp("Bottom", name))
+ return OB_FRAME_CONTEXT_BOTTOM;
else if (!g_ascii_strcasecmp("Maximize", name))
return OB_FRAME_CONTEXT_MAXIMIZE;
else if (!g_ascii_strcasecmp("AllDesktops", name))
if (win == self->window) return OB_FRAME_CONTEXT_FRAME;
if (win == self->label) return OB_FRAME_CONTEXT_TITLEBAR;
- if (win == self->handle) return OB_FRAME_CONTEXT_HANDLE;
+ if (win == self->handle) return OB_FRAME_CONTEXT_BOTTOM;
if (win == self->lgrip) return OB_FRAME_CONTEXT_BLCORNER;
if (win == self->rgrip) return OB_FRAME_CONTEXT_BRCORNER;
+ if (win == self->topresize) return OB_FRAME_CONTEXT_TOP;
if (win == self->tltresize) return OB_FRAME_CONTEXT_TLCORNER;
if (win == self->tllresize) return OB_FRAME_CONTEXT_TLCORNER;
if (win == self->trtresize) return OB_FRAME_CONTEXT_TRCORNER;
OB_FRAME_CONTEXT_DESKTOP,
OB_FRAME_CONTEXT_CLIENT,
OB_FRAME_CONTEXT_TITLEBAR,
- OB_FRAME_CONTEXT_HANDLE,
OB_FRAME_CONTEXT_FRAME,
OB_FRAME_CONTEXT_BLCORNER,
OB_FRAME_CONTEXT_BRCORNER,
OB_FRAME_CONTEXT_TLCORNER,
OB_FRAME_CONTEXT_TRCORNER,
+ OB_FRAME_CONTEXT_TOP,
+ OB_FRAME_CONTEXT_BOTTOM,
OB_FRAME_CONTEXT_MAXIMIZE,
OB_FRAME_CONTEXT_ALLDESKTOPS,
OB_FRAME_CONTEXT_SHADE,
Window lgrip;
Window rgrip;
+ Window topresize;
Window tltresize;
Window tllresize;
Window trtresize;
RrPaint(t, self->title, self->width, ob_rr_theme->title_height);
ob_rr_theme->a_clear->surface.parent = t;
- ob_rr_theme->a_clear->surface.parentx = 0;
ob_rr_theme->a_clear->surface.parenty = 0;
+ ob_rr_theme->a_clear->surface.parentx = ob_rr_theme->grip_width +
+ self->bwidth;
+ RrPaint(ob_rr_theme->a_clear, self->topresize,
+ self->width - (ob_rr_theme->grip_width + self->bwidth) * 2,
+ ob_rr_theme->paddingy + 1);
+
+ ob_rr_theme->a_clear->surface.parentx = 0;
+
if (ob_rr_theme->grip_width > 0)
RrPaint(ob_rr_theme->a_clear, self->tltresize,
ob_rr_theme->grip_width, ob_rr_theme->paddingy + 1);
case OB_FRAME_CONTEXT_DESKTOP:
case OB_FRAME_CONTEXT_CLIENT:
case OB_FRAME_CONTEXT_TITLEBAR:
- case OB_FRAME_CONTEXT_HANDLE:
case OB_FRAME_CONTEXT_FRAME:
case OB_FRAME_CONTEXT_MOVE_RESIZE:
break;
+ case OB_FRAME_CONTEXT_BOTTOM:
case OB_FRAME_CONTEXT_BLCORNER:
case OB_FRAME_CONTEXT_BRCORNER:
- x = OB_FRAME_CONTEXT_HANDLE;
+ x = OB_FRAME_CONTEXT_BOTTOM;
break;
case OB_FRAME_CONTEXT_TLCORNER:
case OB_FRAME_CONTEXT_TRCORNER:
+ case OB_FRAME_CONTEXT_TOP:
case OB_FRAME_CONTEXT_MAXIMIZE:
case OB_FRAME_CONTEXT_ALLDESKTOPS:
case OB_FRAME_CONTEXT_SHADE: