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]);
|
fwin->title_pixel[fwin->flags.state]);
|
||||||
|
|
||||||
#ifdef DRAWSTRING_PLUGIN
|
#ifdef DRAWSTRING_PLUGIN
|
||||||
if (scr->drawstring_func[fwin->flags.state + fwin->drawstring_proc_offset]) {
|
#define DRAWSTRING_CURRENT_STATE fwin->flags.state + fwin->drawstring_proc_offset
|
||||||
scr->drawstring_func[fwin->flags.state + fwin->drawstring_proc_offset]->
|
if (scr->drawstring_func[DRAWSTRING_CURRENT_STATE]) {
|
||||||
proc.drawString(scr->drawstring_func[fwin->flags.state
|
void **p = wPluginPackData(4,
|
||||||
+ fwin->drawstring_proc_offset]->arg, fwin->titlebar->window,
|
*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,
|
x, *fwin->title_clearance + TITLEBAR_EXTEND_SPACE,
|
||||||
fwin->titlebar->width, fwin->top_width,
|
fwin->titlebar->width, fwin->top_width,
|
||||||
fwin->title, wPluginPackData(2, *fwin->title_gc, *fwin->font));
|
fwin->title, p);
|
||||||
|
free(p);
|
||||||
} else {
|
} else {
|
||||||
WMDrawString(scr->wmscreen, fwin->titlebar->window,
|
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);
|
title, titlelen);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ wPluginCreateFunction(int type, char *library_name,
|
|||||||
|
|
||||||
if (pl_arg) function->arg = PLDeepCopy(pl_arg);
|
if (pl_arg) function->arg = PLDeepCopy(pl_arg);
|
||||||
function->data = init_data;
|
function->data = init_data;
|
||||||
|
printf("init data %x\n", function->data);
|
||||||
if (init_proc_name) {
|
if (init_proc_name) {
|
||||||
initProc = dlsym(function->handle, init_proc_name);
|
initProc = dlsym(function->handle, init_proc_name);
|
||||||
if (initProc) {
|
if (initProc) {
|
||||||
@@ -123,12 +124,10 @@ wPluginDestroyFunction(WFunction *function)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (function->data) {
|
if (function->data) {
|
||||||
if (function->freeData) {
|
if (function->freeData)
|
||||||
function->freeData(function->arg, &function->data);
|
function->freeData(function->arg, &function->data);
|
||||||
} else {
|
|
||||||
wfree(function->data);
|
wfree(function->data);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (function->arg) PLRelease(function->arg);
|
if (function->arg) PLRelease(function->arg);
|
||||||
wfree(function);
|
wfree(function);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -652,11 +652,11 @@ void wWorkspaceManageEdge(WScreen *scr)
|
|||||||
int vmask;
|
int vmask;
|
||||||
XSetWindowAttributes attribs;
|
XSetWindowAttributes attribs;
|
||||||
|
|
||||||
puts("wWorkspaceManageEdge()");
|
/* puts("wWorkspaceManageEdge()"); */
|
||||||
if (wPreferences.vedge_thickness) {
|
if (wPreferences.vedge_thickness) {
|
||||||
initVDesk = True;
|
initVDesk = True;
|
||||||
for (w = 0; w < scr->workspace_count; w++) {
|
for (w = 0; w < scr->workspace_count; w++) {
|
||||||
puts("reset workspace");
|
/* puts("reset workspace"); */
|
||||||
wWorkspaceSetViewPort(scr, w, 0, 0);
|
wWorkspaceSetViewPort(scr, w, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user