Bug 18854

Summary: XInput events are translated incorrectly in The Gimp
Product: Sisyphus Reporter: manowar <manowar>
Component: gimpAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P2 CC: grenka, ldv, manowar, mike, shrek
Version: unstable   
Hardware: all   
OS: Linux   

Description manowar@altlinux.org 2009-02-16 12:06:25 MSK
Go to "Edit/Preferences/Input Devices". Click on the button "Configure Extended Input Devices" on the right side. Select your current device (mice, track point, etc.) in the "Device :" list and set the working mode for it to either "Window" or "Screen" using the "Mode :" list. Click the "Save" dialog button to apply your changes, then click "Close" to close the window and "OK" in the parent, preferences window.
  Create a new image or open an existing one. Use "Window/Dockable Dialogs/Device Status" menu item to invoke "Device Status" window. Take the Brush (P) tool and find it doesn't work properly: the device pointer is moving while pressing down the #1 button doesn't make any change to the image and the brush size is not indicated by the pointer. The "Device Status" window should indicate that the current device you are using isn't the virtual "Core pointer" but a specific device you have enabled.

  Try to use the "Bucket Fill Tool" (Shift + B) and find that it isn't permitted for some reason to fill the image as indicated by the cursor icon. Take the "Rectangular Selection Tool" (R), click on the image and find that the area automatically selected is point in the the upper left corner of the image. 

*** Notice the terrible negative coordinate number at the status bar. ***

  Take the "Zoom" tool (Z) and find it working relative ot the upper left corner of the image.


  It seems that the coordinates for the XInput events are incorrectly translated as can be seen in the status bar ('x' is -214748364 in my case) so you always try to work outside of the image.


  Probably it isn't the Gimp only bug for it behaves the same in the Inkscape, for instance. Possibly it is the GTK/GDK bug.
Comment 1 manowar@altlinux.org 2009-02-16 19:15:30 MSK
$ gimp --gdk-debug=events
"Gdk-Message: motion notify: window: 41943328  x,y: 41 131  hint: true"
"motion notify: window: 41943215  device: 3  x,y: nan inf  state 0  hint: true"

Notice the "nan inf" coords.
Comment 2 manowar@altlinux.org 2009-05-01 01:07:48 MSD
This bug is possibly a feature: the "nan inf" coords are reported from a RELATIVE mode device only (i.e. mice), while ABSOLUTE mode devices (tablets) are handled normally. But it is unclear why a user is forced not to use an additional (non-core) mouse pointer for some purpose (possibly, for eraser tool), and if so, why such devices are listed in the available XInput device list.
Comment 3 Valery Inozemtsev 2009-10-29 17:45:45 MSK
ничем не могу помочь, т.к. по английски не понимаю
Comment 4 Dmitry V. Levin 2009-10-30 04:48:11 MSK
You shall not close this bug.
Comment 5 Michael Shigorin 2009-10-31 19:03:51 MSK
Павел, переведите, пожалуйста (или лучше сразу в https://bugzilla.gnome.org/browse.cgi?product=GIMP).

2 shrek: если ничем не можешь помочь, то скорее осмысленно перевесить на nobody@.
Comment 6 manowar@altlinux.org 2009-11-01 00:15:12 MSK
Если вкратце, то дело в следующем: нормально через XInput в Gimp работают только те устройства, которые находятся в режиме absolute, т.е. сообщают абсолютные, а не относительные координаты. И это можно принять как оправданное и логичное поведение. Но тогда возникает вопрос, для чего в списке доступных устройств указывать все устройства, в том числе и работающие в режиме relative. Последние оказываются не работоспособными: координаты, которые они сообщают отображаются в Gimp как inf, inf независимо от перемещения манипулятора.
Comment 7 Michael Shigorin 2019-02-08 11:25:30 MSK
Паш, ещё актуально?
Comment 8 manowar@altlinux.org 2019-02-08 12:27:45 MSK
Не проверял. Закрой пока.
Comment 9 Grigory Ustinov 2019-12-12 13:03:22 MSK
Я проверил. Насколько хватает моих знаний английского, бага решена.