Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
st.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make it so I can still select despite MODE_MOUSE
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
952be51
..
0632637
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-649,9
+649,10
@@
utf8validate(long *u, size_t i) {
static void
selinit(void) {
static void
selinit(void) {
- memset(&sel.tclick1, 0, sizeof(sel.tclick1));
- memset(&sel.tclick2, 0, sizeof(sel.tclick2));
+ clock_gettime(CLOCK_MONOTONIC, &sel.tclick1);
+ clock_gettime(CLOCK_MONOTONIC, &sel.tclick2);
sel.mode = 0;
sel.mode = 0;
+ sel.snap = 0;
sel.ob.x = -1;
sel.primary = NULL;
sel.clipboard = NULL;
sel.ob.x = -1;
sel.primary = NULL;
sel.clipboard = NULL;
@@
-888,10
+889,10
@@
bpress(XEvent *e) {
struct timespec now;
Mousekey *mk;
struct timespec now;
Mousekey *mk;
- if(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
- mousereport(e);
- return;
- }
+ // Jasonif(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
+ // Jason mousereport(e);
+ // Jason return;
+ // Jason}
for(mk = mshortcuts; mk < mshortcuts + LEN(mshortcuts); mk++) {
if(e->xbutton.button == mk->b
for(mk = mshortcuts; mk < mshortcuts + LEN(mshortcuts); mk++) {
if(e->xbutton.button == mk->b
@@
-1140,10
+1141,10
@@
xsetsel(char *str) {
void
brelease(XEvent *e) {
void
brelease(XEvent *e) {
- if(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
- mousereport(e);
- return;
- }
+ //Jasonif(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
+ //Jason mousereport(e);
+ //Jason return;
+ //Jason}
if(e->xbutton.button == Button2) {
selpaste(NULL);
if(e->xbutton.button == Button2) {
selpaste(NULL);
@@
-1163,10
+1164,10
@@
void
bmotion(XEvent *e) {
int oldey, oldex, oldsby, oldsey;
bmotion(XEvent *e) {
int oldey, oldex, oldsby, oldsey;
- if(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
- mousereport(e);
- return;
- }
+ //Jasonif(IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
+ //Jason mousereport(e);
+ //Jason return;
+ //Jason}
if(!sel.mode)
return;
if(!sel.mode)
return;