Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 179283
Collapse All | Expand All

(-)source/unix/unix_input.c (-10 / +22 lines)
Lines 566-574 Link Here
566
	unsigned char *p;
566
	unsigned char *p;
567
	int key = 0;
567
	int key = 0;
568
	unsigned int time = Sys_Milliseconds();
568
	unsigned int time = Sys_Milliseconds();
569
	int root_x,root_y,win_x,win_y;
570
	unsigned int mask;
571
	Window root, child;
569
572
570
	assert(x11display.dpy && x11display.win);
573
	assert(x11display.dpy && x11display.win);
571
574
575
	    if(mouse_active){
576
	        if(XQueryPointer(x11display.dpy,x11display.win, &root, &child,
577
	            &root_x,&root_y,&win_x,&win_y,&mask)){
578
	
579
	            mx += ((int)win_x - mwx);
580
	            my += ((int)win_y - mwy);
581
	            mwx = win_x;
582
	            mwy = win_y;
583
			            if (mx || my)
584
	                dowarp = qtrue;
585
	
586
	            if (ignore_one) {
587
	                mx = my = 0;
588
	                ignore_one = qfalse;
589
	            }
590
	        }
591
	    }
592
	
593
	
572
	while (XPending(x11display.dpy))
594
	while (XPending(x11display.dpy))
573
	{
595
	{
574
		XNextEvent (x11display.dpy, &event);
596
		XNextEvent (x11display.dpy, &event);
Lines 602-616 Link Here
602
						mx += event.xmotion.x_root;
624
						mx += event.xmotion.x_root;
603
						my += event.xmotion.y_root;
625
						my += event.xmotion.y_root;
604
					}
626
					}
605
					else
606
					{
607
						mx += ((int)event.xmotion.x - mwx);
608
						my += ((int)event.xmotion.y - mwy);
609
						mwx = event.xmotion.x;
610
						mwy = event.xmotion.y;
611
612
						if (mx || my)
613
							dowarp = qtrue;
614
					}
615
					if (ignore_one) {
627
					if (ignore_one) {
616
						mx = my = 0;
628
						mx = my = 0;

Return to bug 179283