mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
drawstring plugin and a small change in vdesk
This commit is contained in:
@@ -1082,16 +1082,24 @@ wFrameWindowPaint(WFrameWindow *fwin)
|
||||
fwin->title_pixel[fwin->flags.state]);
|
||||
|
||||
#ifdef DRAWSTRING_PLUGIN
|
||||
if (scr->drawstring_func[fwin->flags.state + fwin->drawstring_proc_offset]) {
|
||||
scr->drawstring_func[fwin->flags.state + fwin->drawstring_proc_offset]->
|
||||
proc.drawString(scr->drawstring_func[fwin->flags.state
|
||||
+ fwin->drawstring_proc_offset]->arg, fwin->titlebar->window,
|
||||
#define DRAWSTRING_CURRENT_STATE fwin->flags.state + fwin->drawstring_proc_offset
|
||||
if (scr->drawstring_func[DRAWSTRING_CURRENT_STATE]) {
|
||||
void **p = wPluginPackData(4,
|
||||
*fwin->title_gc,
|
||||
*fwin->font,
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->data,
|
||||
"extendable");
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->proc.drawString(
|
||||
scr->drawstring_func[DRAWSTRING_CURRENT_STATE]->arg,
|
||||
fwin->titlebar->window,
|
||||
x, *fwin->title_clearance + TITLEBAR_EXTEND_SPACE,
|
||||
fwin->titlebar->width, fwin->top_width,
|
||||
fwin->title, wPluginPackData(2, *fwin->title_gc, *fwin->font));
|
||||
fwin->title, p);
|
||||
free(p);
|
||||
} else {
|
||||
WMDrawString(scr->wmscreen, fwin->titlebar->window,
|
||||
*fwin->title_gc, *fwin->font, x, *fwin->title_clearance + TITLEBAR_EXTEND_SPACE,
|
||||
*fwin->title_gc, *fwin->font,
|
||||
x, *fwin->title_clearance + TITLEBAR_EXTEND_SPACE,
|
||||
title, titlelen);
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -101,6 +101,7 @@ wPluginCreateFunction(int type, char *library_name,
|
||||
|
||||
if (pl_arg) function->arg = PLDeepCopy(pl_arg);
|
||||
function->data = init_data;
|
||||
printf("init data %x\n", function->data);
|
||||
if (init_proc_name) {
|
||||
initProc = dlsym(function->handle, init_proc_name);
|
||||
if (initProc) {
|
||||
@@ -123,12 +124,10 @@ wPluginDestroyFunction(WFunction *function)
|
||||
return;
|
||||
|
||||
if (function->data) {
|
||||
if (function->freeData) {
|
||||
if (function->freeData)
|
||||
function->freeData(function->arg, &function->data);
|
||||
} else {
|
||||
wfree(function->data);
|
||||
}
|
||||
}
|
||||
if (function->arg) PLRelease(function->arg);
|
||||
wfree(function);
|
||||
return;
|
||||
|
||||
@@ -652,11 +652,11 @@ void wWorkspaceManageEdge(WScreen *scr)
|
||||
int vmask;
|
||||
XSetWindowAttributes attribs;
|
||||
|
||||
puts("wWorkspaceManageEdge()");
|
||||
/* puts("wWorkspaceManageEdge()"); */
|
||||
if (wPreferences.vedge_thickness) {
|
||||
initVDesk = True;
|
||||
for (w = 0; w < scr->workspace_count; w++) {
|
||||
puts("reset workspace");
|
||||
/* puts("reset workspace"); */
|
||||
wWorkspaceSetViewPort(scr, w, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user