mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +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
|
||||
* - FIX: graphix blocks MUST be skipped if monoFont even though they exist!
|
||||
* - 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...
|
||||
* - redo blink code to reduce paint event... use pixmap buffer...
|
||||
* - add paragraph support (full) and '\n' code in getStream..
|
||||
@@ -825,9 +824,12 @@ _getSibling:
|
||||
XRectangle rect;
|
||||
|
||||
if ( sectionWasSelected(tPtr, tb, &rect, 0)) {
|
||||
Drawable d = (0&&tb->object?
|
||||
(WMWidgetView(tb->d.widget))->window : tPtr->db);
|
||||
|
||||
tb->selected = True;
|
||||
XFillRectangle(dpy, tPtr->db, tPtr->stippledGC,
|
||||
//XFillRectangle(dpy, tPtr->db, greyGC,
|
||||
XFillRectangle(dpy, d, tPtr->stippledGC,
|
||||
//XFillRectangle(dpy, tPtr->db, tPtr->stippledGC,
|
||||
rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
}
|
||||
@@ -3613,6 +3615,17 @@ WMRemoveTextBlock(WMText *tPtr)
|
||||
return (void *)tb;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
destroyWidget(WMWidget *widget)
|
||||
{
|
||||
if(!widget)
|
||||
return;
|
||||
|
||||
WMDestroyWidget(widget);
|
||||
wfree(widget);
|
||||
}
|
||||
|
||||
void
|
||||
WMDestroyTextBlock(WMText *tPtr, void *vtb)
|
||||
{
|
||||
@@ -3622,13 +3635,14 @@ WMDestroyTextBlock(WMText *tPtr, void *vtb)
|
||||
|
||||
if (tb->graphic) {
|
||||
if(tb->object) {
|
||||
/* naturally, there's a danger to destroying
|
||||
widgets whose action brings us here:
|
||||
ie. press a button to destroy it... need to
|
||||
find a safer way. till then... this stays commented out */
|
||||
/* WMDestroyWidget(tb->d.widget);
|
||||
wfree(tb->d.widget); */
|
||||
/* naturally, there's a danger to destroying widgets whose action
|
||||
brings us here: ie. press a button to destroy it...
|
||||
need to find a safer way. till then... this stays commented out */
|
||||
/* 5 months later... destroy it 10 seconds after now which should be
|
||||
enough time for the widget's action to be completed... :-) */
|
||||
WMAddTimerHandler(10000, destroyWidget, (void *)tb->d.widget);
|
||||
tb->d.widget = NULL;
|
||||
|
||||
} else {
|
||||
WMReleasePixmap(tb->d.pixmap);
|
||||
tb->d.pixmap = NULL;
|
||||
|
||||
Reference in New Issue
Block a user