mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
now when a button click "links" to another page, instead of it
being destroyed right away, a timer handler queues it for 10 seconds later (hopefully enough time for the buttons callback to have returned). ... 10 seconds may not be enough for ALL widget callbacks...
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
* note that WMCreateEventHandler takes one data, but need widget & tPtr
|
* note that WMCreateEventHandler takes one data, but need widget & tPtr
|
||||||
* - FIX: graphix blocks MUST be skipped if monoFont even though they exist!
|
* - FIX: graphix blocks MUST be skipped if monoFont even though they exist!
|
||||||
* - check if support for Horizontal Scroll is complete
|
* - check if support for Horizontal Scroll is complete
|
||||||
* - assess danger of destroying widgets whose actions link to other pages
|
|
||||||
* - Tabs now are simply replaced by 4 spaces...
|
* - Tabs now are simply replaced by 4 spaces...
|
||||||
* - redo blink code to reduce paint event... use pixmap buffer...
|
* - redo blink code to reduce paint event... use pixmap buffer...
|
||||||
* - add paragraph support (full) and '\n' code in getStream..
|
* - add paragraph support (full) and '\n' code in getStream..
|
||||||
@@ -825,9 +824,12 @@ _getSibling:
|
|||||||
XRectangle rect;
|
XRectangle rect;
|
||||||
|
|
||||||
if ( sectionWasSelected(tPtr, tb, &rect, 0)) {
|
if ( sectionWasSelected(tPtr, tb, &rect, 0)) {
|
||||||
|
Drawable d = (0&&tb->object?
|
||||||
|
(WMWidgetView(tb->d.widget))->window : tPtr->db);
|
||||||
|
|
||||||
tb->selected = True;
|
tb->selected = True;
|
||||||
XFillRectangle(dpy, tPtr->db, tPtr->stippledGC,
|
XFillRectangle(dpy, d, tPtr->stippledGC,
|
||||||
//XFillRectangle(dpy, tPtr->db, greyGC,
|
//XFillRectangle(dpy, tPtr->db, tPtr->stippledGC,
|
||||||
rect.x, rect.y, rect.width, rect.height);
|
rect.x, rect.y, rect.width, rect.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3613,6 +3615,17 @@ WMRemoveTextBlock(WMText *tPtr)
|
|||||||
return (void *)tb;
|
return (void *)tb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
destroyWidget(WMWidget *widget)
|
||||||
|
{
|
||||||
|
if(!widget)
|
||||||
|
return;
|
||||||
|
|
||||||
|
WMDestroyWidget(widget);
|
||||||
|
wfree(widget);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WMDestroyTextBlock(WMText *tPtr, void *vtb)
|
WMDestroyTextBlock(WMText *tPtr, void *vtb)
|
||||||
{
|
{
|
||||||
@@ -3622,13 +3635,14 @@ WMDestroyTextBlock(WMText *tPtr, void *vtb)
|
|||||||
|
|
||||||
if (tb->graphic) {
|
if (tb->graphic) {
|
||||||
if(tb->object) {
|
if(tb->object) {
|
||||||
/* naturally, there's a danger to destroying
|
/* naturally, there's a danger to destroying widgets whose action
|
||||||
widgets whose action brings us here:
|
brings us here: ie. press a button to destroy it...
|
||||||
ie. press a button to destroy it... need to
|
need to find a safer way. till then... this stays commented out */
|
||||||
find a safer way. till then... this stays commented out */
|
/* 5 months later... destroy it 10 seconds after now which should be
|
||||||
/* WMDestroyWidget(tb->d.widget);
|
enough time for the widget's action to be completed... :-) */
|
||||||
wfree(tb->d.widget); */
|
WMAddTimerHandler(10000, destroyWidget, (void *)tb->d.widget);
|
||||||
tb->d.widget = NULL;
|
tb->d.widget = NULL;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
WMReleasePixmap(tb->d.pixmap);
|
WMReleasePixmap(tb->d.pixmap);
|
||||||
tb->d.pixmap = NULL;
|
tb->d.pixmap = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user