Comment 7 for bug 882043

Revision history for this message
eirik hanssen (eirikhanssen79) wrote :

If someone want to help me resolve this matter, please read on.

I believe it is possible to disable the zoom on middle mouseclick behaviour by editing the following file (that you get after downloading development sourcecode) :

inkscape/src/ui/tools/tool-base.cpp, and then recompiling inkscape.

To download the sourcecode follow instructions here: http://www.inkscape.org/en/develop/getting-started/

It seems this function handles events:

bool ToolBase::root_handler(GdkEvent* event) {
(...)
    switch (event->type) {
(...)
    case GDK_BUTTON_PRESS:
(...)
        case 2:
/* My comment here: since middle click is button 2 in this context, the behaviour might be corrected here */
/* But actually this case only sets some variables. The zoom in event actually fires on middle button release. */
/* Further down in the switch statement: */

    case GDK_MOTION_NOTIFY:
/* Probably to find out if there is some dragging motion involved, the variable zoom_rb seems important */

    case GDK_BUTTON_RELEASE:
/* this is probably where the zoom event is actually triggered. I think there are checks to decide what action to take here */
/* for instanse to fire a zoom event or to release the canvas drag */
/* will investigate further later */

Cheers,
Eirik Hanssen