use the size of the icon window for slit apps, not the client window
This commit is contained in:
parent
23697223a5
commit
ffb76025fa
3 changed files with 10 additions and 5 deletions
|
@ -202,7 +202,7 @@ void client_manage(Window window)
|
||||||
if ((wmhint = XGetWMHints(ob_display, window))) {
|
if ((wmhint = XGetWMHints(ob_display, window))) {
|
||||||
if ((wmhint->flags & StateHint) &&
|
if ((wmhint->flags & StateHint) &&
|
||||||
wmhint->initial_state == WithdrawnState) {
|
wmhint->initial_state == WithdrawnState) {
|
||||||
slit_add(window, wmhint, &attrib);
|
slit_add(window, wmhint);
|
||||||
grab_server(FALSE);
|
grab_server(FALSE);
|
||||||
XFree(wmhint);
|
XFree(wmhint);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -86,10 +86,11 @@ void slit_shutdown()
|
||||||
g_hash_table_destroy(slit_map);
|
g_hash_table_destroy(slit_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
void slit_add(Window win, XWMHints *wmhints, XWindowAttributes *attrib)
|
void slit_add(Window win, XWMHints *wmhints)
|
||||||
{
|
{
|
||||||
Slit *s;
|
Slit *s;
|
||||||
SlitApp *app;
|
SlitApp *app;
|
||||||
|
XWindowAttributes attrib;
|
||||||
|
|
||||||
/* XXX pick a slit */
|
/* XXX pick a slit */
|
||||||
s = &slit[0];
|
s = &slit[0];
|
||||||
|
@ -100,8 +101,12 @@ void slit_add(Window win, XWMHints *wmhints, XWindowAttributes *attrib)
|
||||||
app->icon_win = (wmhints->flags & IconWindowHint) ?
|
app->icon_win = (wmhints->flags & IconWindowHint) ?
|
||||||
wmhints->icon_window : win;
|
wmhints->icon_window : win;
|
||||||
|
|
||||||
app->w = attrib->width;
|
if (XGetWindowAttributes(ob_display, app->icon_win, &attrib)) {
|
||||||
app->h = attrib->height;
|
app->w = attrib.width;
|
||||||
|
app->h = attrib.height;
|
||||||
|
} else {
|
||||||
|
app->w = app->h = 64;
|
||||||
|
}
|
||||||
|
|
||||||
s->slit_apps = g_list_append(s->slit_apps, app);
|
s->slit_apps = g_list_append(s->slit_apps, app);
|
||||||
slit_configure(s);
|
slit_configure(s);
|
||||||
|
|
|
@ -40,7 +40,7 @@ void slit_shutdown();
|
||||||
void slit_configure_all();
|
void slit_configure_all();
|
||||||
void slit_hide(Slit *self, gboolean hide);
|
void slit_hide(Slit *self, gboolean hide);
|
||||||
|
|
||||||
void slit_add(Window win, XWMHints *wmhints, XWindowAttributes *attrib);
|
void slit_add(Window win, XWMHints *wmhints);
|
||||||
|
|
||||||
void slit_remove_all();
|
void slit_remove_all();
|
||||||
void slit_remove(SlitApp *app, gboolean reparent);
|
void slit_remove(SlitApp *app, gboolean reparent);
|
||||||
|
|
Loading…
Reference in a new issue