mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-09 02:55:52 +01:00
change mind.
This commit is contained in:
@@ -1062,6 +1062,7 @@ static void
|
|||||||
handleTextFieldActionEvents(XEvent *event, void *data)
|
handleTextFieldActionEvents(XEvent *event, void *data)
|
||||||
{
|
{
|
||||||
TextField *tPtr = (TextField*)data;
|
TextField *tPtr = (TextField*)data;
|
||||||
|
static int move;
|
||||||
|
|
||||||
CHECK_CLASS(data, WC_TextField);
|
CHECK_CLASS(data, WC_TextField);
|
||||||
|
|
||||||
@@ -1105,9 +1106,20 @@ handleTextFieldActionEvents(XEvent *event, void *data)
|
|||||||
paintTextField(tPtr);
|
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;
|
break;
|
||||||
|
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
|
move = 1;
|
||||||
switch (tPtr->flags.alignment) {
|
switch (tPtr->flags.alignment) {
|
||||||
int textWidth;
|
int textWidth;
|
||||||
case WARight:
|
case WARight:
|
||||||
@@ -1167,16 +1179,7 @@ handleTextFieldActionEvents(XEvent *event, void *data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
{
|
move = 0;
|
||||||
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user