mirror of
https://github.com/gryf/wmaker.git
synced 2026-04-20 15:21:27 +02:00
change mind.
This commit is contained in:
+13
-10
@@ -1062,6 +1062,7 @@ static void
|
||||
handleTextFieldActionEvents(XEvent *event, void *data)
|
||||
{
|
||||
TextField *tPtr = (TextField*)data;
|
||||
static int move;
|
||||
|
||||
CHECK_CLASS(data, WC_TextField);
|
||||
|
||||
@@ -1105,9 +1106,20 @@ handleTextFieldActionEvents(XEvent *event, void *data)
|
||||
paintTextField(tPtr);
|
||||
|
||||
}
|
||||
if (move) {
|
||||
int count;
|
||||
XSetSelectionOwner(tPtr->view->screen->display,
|
||||
XA_PRIMARY, None, CurrentTime);
|
||||
count = tPtr->selection.count < 0
|
||||
? tPtr->selection.position + tPtr->selection.count
|
||||
: tPtr->selection.position;
|
||||
XStoreBuffer(tPtr->view->screen->display,
|
||||
&tPtr->text[count] , abs(tPtr->selection.count), 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case ButtonPress:
|
||||
move = 1;
|
||||
switch (tPtr->flags.alignment) {
|
||||
int textWidth;
|
||||
case WARight:
|
||||
@@ -1167,16 +1179,7 @@ handleTextFieldActionEvents(XEvent *event, void *data)
|
||||
break;
|
||||
|
||||
case ButtonRelease:
|
||||
{
|
||||
int count;
|
||||
XSetSelectionOwner(tPtr->view->screen->display,
|
||||
XA_PRIMARY, None, CurrentTime);
|
||||
count = tPtr->selection.count < 0
|
||||
? tPtr->selection.position + tPtr->selection.count
|
||||
: tPtr->selection.position;
|
||||
XStoreBuffer(tPtr->view->screen->display,
|
||||
&tPtr->text[count] , abs(tPtr->selection.count), 0);
|
||||
}
|
||||
move = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user