Re: xinerama and wacom

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



На Fri, 14 Nov 2008 14:40:09 +0700
IL'dar AKHmetgaleev <akhilman@xxxxxxxxx> записано:


Hi! 
As I wrote to gimp-users list I had problems with gtk+ applications,
wacom and xinerama same with
http://bugzilla.gnome.org/show_bug.cgi?id=66813

So I have invested some time to get it fixed.
This is patch (see attach) which makes wacom work right in my three
screen setup.

Please test it with twinview and other kind of multihead setups.
Hope to see changes in upstream.


> Greetings.
> 
> This problem seems to be well known but still not fixed.
> http://sourceforge.net/forum/forum.php?thread_id=1916305&forum_id=236872
> http://bugzilla.gnome.org/show_bug.cgi?id=66813
> 
> So once again.
> I have true xinerama setup with three heads and with different
> resolutions (1024x768+0+282, 1680x1050+1024+0, 1024x768+2704+282).
> 
> I can't use twinview because of I'm using two video cards.
> 
> I'm using 
> $ xsetwacom set stylus Screen_No <0|1|2> 
> as keyboard shortcuts to map tablet to one of the screen. I have no
> problems with X's pointer and with non GTK applications such as
> blender and pencil (both with pressure sensitivity).
> 
> But in all GTK applications (gimp, inkscape and mypaint) in screen
> mode cursor have offset. Seems GTK maps my tablet to whole virtual
> screen (3728x1050). Moreover using tablet in screen mode periodically
> makes my wacom driver hang. My cursor stops and then I can't kill X
> server and can't switch to console.
> 
> I have to use window mode and keep gimp and inkscape windows
> fullscreen. I still have offset. But it works anyway.
> 
> So why GTK uses this strange way to get pointer's position and doesn't
> uses core pointer's coordinates as blender or QT?
> 
> -------------
> my system:
> gentoo amd64
> linuxwacom-0.8.0_p3-r1
> xorg-server-1.3.0.0-r6
> gtk+-2.12.11
> gimp-2.4.7
> inkscape-0.46-r5
> xorg.conf in attach
> -------------
> 
> Thank you.
> 
> 


-- 
Втр Ноя 18 13:11:23 KRAT 2008
Tue Nov 18 06:11:23 UTC 2008
----------------------------------
Visit my home page http://akhilman.blogspot.com/
----------------------------------
jabber: akhil@xxxxxxxxx
----------------------------------
Пытаться сделать мир на 1/6.7e9 лучше
Ахметгалеев Ильдар aka AkhIL
----------------------------------
Linux artstation 2.6.27-gentoo-r2 #1 SMP Mon Nov 10 09:54:52 KRAT 2008
x86_64 AMD Phenom(tm) 9550 Quad-Core Processor AuthenticAMD GNU/Linux
up 4 days, 22:19,  1 user,  load average: 0.35, 0.72, 0.99
--- gtk+-2.12.11/gdk/x11/gdkinput-x11.c.bak	2008-11-15 10:10:44.680002451 +0700
+++ gtk+-2.12.11/gdk/x11/gdkinput-x11.c	2008-11-18 13:09:44.170014289 +0700
@@ -421,6 +421,7 @@
 				 gdouble          *y_out)
 {
   GdkWindowImplX11 *impl;
+  GdkRectangle monitor_rect;
   int i;
   int x_axis = 0;
   int y_axis = 0;
@@ -452,11 +453,13 @@
 
   if (gdkdev->info.mode == GDK_MODE_SCREEN) 
     {
-      x_scale = gdk_screen_get_width (gdk_drawable_get_screen (input_window->window)) / device_width;
-      y_scale = gdk_screen_get_height (gdk_drawable_get_screen (input_window->window)) / device_height;
-
-      x_offset = - input_window->root_x;
-      y_offset = - input_window->root_y;
+      gdk_screen_get_monitor_geometry(gdk_drawable_get_screen (input_window->window), \
+	      gdk_screen_get_monitor_at_window(gdk_drawable_get_screen (input_window->window),input_window->window), \
+	      &monitor_rect);
+      x_scale = monitor_rect.width / device_width;
+      y_scale = monitor_rect.height / device_height;
+      x_offset = - input_window->root_x + monitor_rect.x;
+      y_offset = - input_window->root_y + monitor_rect.y;
     }
   else				/* GDK_MODE_WINDOW */
     {
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux