mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-06 13:54:12 +01:00
- WMDestroyWidget() now first calls WMUnmapWidget()
- decided behavior of list selection while scrolling
This commit is contained in:
@@ -39,6 +39,7 @@ changes since wmaker 0.62.1:
|
||||
- WMBrowser now allows multiple selections.
|
||||
- Added WMGetBrowserPaths() to retrieve the paths for browsers that allow
|
||||
multiple selections.
|
||||
- WMDestroyWidget() now calls WMUnmapWidget() first
|
||||
|
||||
|
||||
changes since wmaker 0.62.0:
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
- move paint to idle handlers
|
||||
- check whether WMDestroyWidget() should first call WMUnmapWidget().
|
||||
- check if its useful to add some WMBrowserSelectionDidChangeNotification
|
||||
(actually a pass-through for WMListSelectionDidChangeNotification).
|
||||
Or a delegate to be called when the list selection change.
|
||||
- check which behavior is better for list selecting while scrolling
|
||||
(the #define behavior2 in wlist.c)
|
||||
|
||||
|
||||
- optimize color allocation for repeated colors
|
||||
|
||||
@@ -29,7 +29,6 @@ int windowCount = 0;
|
||||
void
|
||||
closeAction(WMWidget *self, void *data)
|
||||
{
|
||||
WMUnmapWidget(self);
|
||||
WMDestroyWidget(self);
|
||||
windowCount--;
|
||||
printf("window closed, window count = %d\n", windowCount);
|
||||
@@ -1207,6 +1206,10 @@ main(int argc, char **argv)
|
||||
*/
|
||||
|
||||
testList(scr);
|
||||
testColorWell(scr);
|
||||
|
||||
testTextField(scr);
|
||||
testText(scr);
|
||||
|
||||
#if 0
|
||||
testColorWell(scr);
|
||||
|
||||
@@ -851,6 +851,7 @@ WMGetHangedData(WMWidget *widget)
|
||||
void
|
||||
WMDestroyWidget(WMWidget *widget)
|
||||
{
|
||||
W_UnmapView(W_VIEW(widget));
|
||||
W_DestroyView(W_VIEW(widget));
|
||||
}
|
||||
|
||||
|
||||
@@ -1002,7 +1002,6 @@ toggleItemSelection(WMList *lPtr, int index)
|
||||
}
|
||||
}
|
||||
|
||||
#define behavior2
|
||||
|
||||
static void
|
||||
handleActionEvents(XEvent *event, void *data)
|
||||
@@ -1040,10 +1039,6 @@ handleActionEvents(XEvent *event, void *data)
|
||||
break;
|
||||
|
||||
case EnterNotify:
|
||||
#ifndef behavior2
|
||||
lPtr->flags.buttonPressed = lPtr->flags.buttonWasPressed;
|
||||
lPtr->flags.buttonWasPressed = 0;
|
||||
#endif
|
||||
if (lPtr->selectID) {
|
||||
WMDeleteTimerHandler(lPtr->selectID);
|
||||
lPtr->selectID = NULL;
|
||||
@@ -1051,18 +1046,8 @@ handleActionEvents(XEvent *event, void *data)
|
||||
break;
|
||||
|
||||
case LeaveNotify:
|
||||
#ifndef behavior2
|
||||
lPtr->flags.buttonWasPressed = lPtr->flags.buttonPressed;
|
||||
lPtr->flags.buttonPressed = 0;
|
||||
#endif
|
||||
|
||||
height = WMWidgetHeight(lPtr);
|
||||
|
||||
#ifdef behavior2
|
||||
if (lPtr->flags.buttonPressed && !lPtr->selectID) {
|
||||
#else
|
||||
if (lPtr->flags.buttonWasPressed && !lPtr->selectID) {
|
||||
#endif
|
||||
if (event->xcrossing.y >= height) {
|
||||
lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY,
|
||||
scrollForwardSelecting,
|
||||
@@ -1148,15 +1133,12 @@ handleActionEvents(XEvent *event, void *data)
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
#ifdef behavior2
|
||||
height = WMWidgetHeight(lPtr);
|
||||
if (lPtr->selectID && event->xmotion.y>0 && event->xmotion.y<height) {
|
||||
WMDeleteTimerHandler(lPtr->selectID);
|
||||
lPtr->selectID = NULL;
|
||||
}
|
||||
#endif
|
||||
if (lPtr->flags.buttonPressed && !lPtr->selectID) {
|
||||
#ifdef behavior2
|
||||
if (event->xmotion.y <= 0) {
|
||||
lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY,
|
||||
scrollBackwardSelecting,
|
||||
@@ -1168,7 +1150,6 @@ handleActionEvents(XEvent *event, void *data)
|
||||
lPtr);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
tmp = getItemIndexAt(lPtr, event->xmotion.y);
|
||||
if (tmp>=0 && tmp!=prevItem) {
|
||||
|
||||
Reference in New Issue
Block a user