You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I enjoy fbpanel and switched to it from lxpanel (which seems to be a derivative of fbpanel).
I want to add maximize to the taskbar context menus as there is only 'raise', 'iconify' and 'close' right now. Looking at panel/panel.c at function panel_set_wm_strut(panel *p) right before the first switch you have this test:
if (p->autohide)
return;
Then for each case you have:
if (p->autohide) data[i] = p->height_when_hidden;
Aren't those tests for p->autohide unneeded since you have that first if (p->autohide) return?
voidpanel_set_wm_strut(panel*p)
{
gulongdata[12] = { 0 };
inti=4;
ENTER;
if (!GTK_WIDGET_MAPPED(p->topgwin))
return;
/* most wm's tend to ignore struts of unmapped windows, and that's how * fbpanel hides itself. so no reason to set it. */if (p->autohide) // <<<<<<<<<<<<<<<<<<<< first testreturn;
switch (p->edge) {
caseEDGE_LEFT:
i=0;
data[i] =p->aw;
data[4+i*2] =p->ay;
data[5+i*2] =p->ay+p->ah;
if (p->autohide) data[i] =p->height_when_hidden; // <<<<< unneeded/dead?break;
caseEDGE_RIGHT:
i=1;
data[i] =p->aw;
data[4+i*2] =p->ay;
data[5+i*2] =p->ay+p->ah;
if (p->autohide) data[i] =p->height_when_hidden; // <<<<< unneeded/dead?break;
caseEDGE_TOP:
i=2;
data[i] =p->ah;
data[4+i*2] =p->ax;
data[5+i*2] =p->ax+p->aw;
if (p->autohide) data[i] =p->height_when_hidden; // <<<<< unneeded/dead?break;
caseEDGE_BOTTOM:
i=3;
data[i] =p->ah;
data[4+i*2] =p->ax;
data[5+i*2] =p->ax+p->aw;
if (p->autohide) data[i] =p->height_when_hidden; // <<<<< unneeded/dead?break;
default:
ERR("wrong edge %d. strut won't be set\n", p->edge);
RET();
}
DBG("type %d. width %ld. from %ld to %ld\n", i, data[i], data[4+i*2],
data[5+i*2]);
/* if wm supports STRUT_PARTIAL it will ignore STRUT */XChangeProperty(GDK_DISPLAY(), p->topxwin, a_NET_WM_STRUT_PARTIAL,
XA_CARDINAL, 32, PropModeReplace, (unsigned char*) data, 12);
/* old spec, for wms that do not support STRUT_PARTIAL */XChangeProperty(GDK_DISPLAY(), p->topxwin, a_NET_WM_STRUT,
XA_CARDINAL, 32, PropModeReplace, (unsigned char*) data, 4);
RET();
}
Thanks! 😄
The text was updated successfully, but these errors were encountered:
Greetings!
I enjoy fbpanel and switched to it from lxpanel (which seems to be a derivative of fbpanel).
I want to add maximize to the taskbar context menus as there is only 'raise', 'iconify' and 'close' right now. Looking at
panel/panel.c
at functionpanel_set_wm_strut(panel *p)
right before the first switch you have this test:Then for each case you have:
Aren't those tests for
p->autohide
unneeded since you have that firstif (p->autohide) return
?Thanks! 😄
The text was updated successfully, but these errors were encountered: