Commit Graph

1179 Commits

Author SHA1 Message Date
Javier Jardón
d3155bb1ea Remove some unnused variables 2009-10-20 20:37:46 +02:00
Javier Jardón
57bc513713 Use g_object_ref/unref instead deprecated gdk_*_ref/unref functions
Substitute deprecated reference counting functions for
g_object_ref/unref in documentation and in internal code

https://bugzilla.gnome.org/show_bug.cgi?id=598217
2009-10-14 03:13:52 +02:00
Alexander Larsson
786b589d95 Fix up _gdk_windowing_window_at_pointer coordinate reporting
We need to do a final XQueryWindow to get the coordinates inside the
windows rather than in the parent window.

This fixes bug #597386, "Cannot click buttons more than once...", which
failed due to the grab tracking stuff getting the wrong coordinates as
per the above.
2009-10-05 11:41:50 +02:00
Pascal Terjan
f3013bf6ed Call XReconfigureWMWindow with proper screen
Thanks gcc :

gdkwindow-x11.c:1731: warning: passing argument 3 of
'XReconfigureWMWindow' makes integer from pointer without a cast
/usr/include/X11/Xlib.h:1871: note: expected 'int' but argument is of
type 'struct GdkScreen *'

Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
2009-10-01 18:36:43 +02:00
Thomas Jaeger
35845f1efe Interpret min_value == max_value correctly
https://bugzilla.gnome.org/show_bug.cgi?id=588649

Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>
2009-09-30 09:21:12 +02:00
Thomas Jaeger
70bd23537f Select for DeviceStateNotify
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-30 09:21:11 +02:00
Thomas Jaeger
0178ebf739 Keep track of axis values
https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-30 09:21:10 +02:00
Thomas Jaeger
67728ac004 Filter out events that the current window didn't select for
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:25 +02:00
Thomas Jaeger
51f2a99096 Always select all XInput motion events
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:23 +02:00
Thomas Jaeger
acdecb6aa4 Report XInput button motion events until all buttons are released.
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:21 +02:00
Thomas Jaeger
2635fb75c6 XInput allows up to 255 buttons
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:18 +02:00
Thomas Jaeger
abf7742beb Refactor _gdk_input_other_event
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-29 14:44:17 +02:00
Thomas Jaeger
bd51d930e8 Use strstr instead of g_strrstr.
Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>
2009-09-29 12:58:52 +02:00
Thomas Jaeger
7d196b3939 Improve detection of input device source type
This detection code is not 100% reliable, but it should fare much better
than the current code, which just compares the device name to a fixed
set of strings.  Many applications depend on erasers being recognized
reliably, so we start by checking for a device name containing the
substring 'eraser'.

Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com>
2009-09-28 16:08:42 +02:00
Alexander Larsson
5ebb32d1ff Extend _gdk_windowing_window_at_pointer to be able to get toplevels only
This has two advantages:
1) In many backends, this is faster as we can terminate the window
hierarchy traversal earlier
2) When used in gdkdisplay.c::get_current_toplevel() to get the
current toplevel that has the pointer we now correctly return
a toplevel with the pointer in it where the pointer is inside
some foreign subwindow of a toplevel window.

The second advantage fixes some bugs in client side event generation
when the pointer is inside such a foreign child window.
2009-09-28 15:21:54 +02:00
Carlos Garnacho
bfc88240b4 Always report XInput events to the grab window if any.
The grab window should be the first option to send events to, else we may
get unpaired events, making display->ignore_core_events go crazy.

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-21 20:04:22 +02:00
Carlos Garnacho
d37268c60f Block extended events to windows that didn't select them.
Now XSelectExtensionEvent() is called on the native window, so there
may be virtual windows inside that shouldn't receive extended events.

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-21 20:04:22 +02:00
Carlos Garnacho
13c258f891 Fix x/y coordinates for extended events.
Extended events were being reported to virtual windows without taking into
account the position of the virtual window inside the native one.

https://bugzilla.gnome.org/show_bug.cgi?id=588649
2009-09-21 20:04:21 +02:00
Michael Natterer
659776ce35 Fix gdk_device_get_history() for the core pointer
When filtering out the events for "window" from the events we got for
our "impl_window", don't forget to adjust the returned number of
events because it might be smaller than what XGetMotionEvents has
returned, and free coords we allocated too much. Also if we filtered
away *all* events, return FALSE and get rid of the allocated history
entirely. Together fixes all sorts of mishehavior when painting in
GIMP, from coords going wild to plain crashes and infinite loops.
2009-09-17 11:38:14 +02:00
Michael Meeks
02b102cbbc fix whitespace error 2009-09-14 15:34:43 +01:00
Michael Meeks
db88f084bc fix race between fetching owner of composit selection, and
registering as a listener for changes; bug#594913
2009-09-14 15:33:59 +01:00
Matthias Clasen
8f16541d93 Fix gdk_display_beep
Since XBell() seems broken, just call XkbBell().
2009-09-13 23:16:44 -04:00
Matthias Clasen
be22a62160 Cleanups
This commit removes dead code, mostly pointed out by clang.
2009-09-10 13:53:28 -04:00
Matthias Clasen
aa9bb7d8e4 Deprecate gdk_event_get_graphics exposes
This function is only used in deprecated, broken widgets. Also,
fix up some of its implmentation that clang was complaining about.
2009-09-09 09:00:15 -04:00
Matthias Clasen
da00e171e7 Correct the initial event mask of the root window
This fixes bug 588455 where the panel stopped responding to Alt-F2 when
setting a transparent background.
2009-09-06 02:44:24 -04:00
Matthias Clasen
bec0d570b0 Fix the build 2009-09-04 23:00:27 -04:00
Matthias Clasen
5c14089225 Make window manager tracking work better
We were getting the new wm name with a 15 second delay, due to
some race. Reported in bug 593644.
2009-09-04 20:22:43 -04:00
Alexander Larsson
d0ac27fe5f Add function accessors for x11 window/pixmap impl 2009-09-04 17:59:17 +02:00
Alexander Larsson
d67a7eda16 Add gdk_window_restack
This lets you restack a window above or below a specified sibling.
At least eclipse wants this functionallity.
2009-09-02 23:38:55 +02:00
Alexander Larsson
cc5b22cc81 Don't update window->shaped from backends
This is properly updated from the main code these days and
should not be touched by the backend code.
2009-08-31 15:06:01 +02:00
Matthias Clasen
f649237bf2 Minor doc fix 2009-08-31 00:55:57 -04:00
Matthias Clasen
7e4e2c636e Fix a documentation error
Reported by Eduard Bagrov in bug 592862.
2009-08-29 20:23:07 -04:00
Matthias Clasen
e0a1e78a5a Silence the conversion from xatom to atom too 2009-08-20 18:06:35 -04:00
Matthias Clasen
be83e8789c Tiny docs improvement
Mention that gdk_xid_table_lookup may return  NULL. Bug 591432.
2009-08-17 13:46:30 -04:00
Alexander Larsson
939e55223c Ensure that queue_translation is paired with the right X operation
The X11 queue_translation operation uses NextRequest to get the serial
of the XCopyArea operation where the translation should end. However,
if the gc passed to gdk_draw_drawable has a non-flushed clip region
(which it commonly has now for the window clipping) then the next
operation will be the GC flush, not the XCopyArea.

To handle this right we now pass in the GC to be used to
queue_translation and ensure that it is flushed before calling
NextRequest().
2009-08-13 14:46:02 +02:00
Alexander Larsson
a3ee8271a9 Check for GraphicsExpose too in expose_serial_predicate
GraphicsExpose cause invalidation too, so we need to look for such
events in addition to normal Expose events.
2009-08-13 14:46:01 +02:00
Alexander Larsson
0fc8c475a8 Remove old comment about guffaw scrolling
We no longer use guffaw scrolling since the client side windows
branch was merged.
2009-08-10 14:27:53 +02:00
Javier Jardón
ec7c24d227 Remove some unused variables (GnomeBug:591218) 2009-08-10 11:06:54 +02:00
Matthias Clasen
69fc109c22 Avoid some gratitious behaviour changes
Go back to allowing a lot of the WM-level functions on foreign windows,
since we used to allow that before csw. Fixes bug 589732.
2009-08-08 22:00:07 -04:00
Alexander Larsson
aa8693f2cb Track viewable for GdkWindow 2009-07-18 23:11:54 +02:00
Alexander Larsson
9063e5b3bf Ensure that windows used for selections are native
This fixes cut and paste in gvim (#588115)
2009-07-10 19:36:38 +02:00
Michael Natterer
3d1f55b68d Add xevent->xcrossing.mode to GDK_NOTE() for enter and leave notify events 2009-07-09 17:59:41 +02:00
Alexander Larsson
9ef87ea11e Handle non-native windows in the gdk test utils
We need to add the non-native offset to the root coords when
sending events.
2009-07-08 18:47:43 +02:00
Alexander Larsson
2678a454e5 Make clipmasks work for pixbuf rendering
This is more important in the client side windows world, as clip masks
may be used for clipping to non-native subwindows. This fixes a bug
in aisleriot where it uses masked pixbuf drawing and it ends up drawing
over the moving card subwindow.
2009-07-07 17:10:49 +02:00
Alexander Larsson
2e3866b5b2 Make GdkDrawable draw_drawable backwards compat
Turns out pygtk build broke due to the argument addition to draw_drawable.
So, we now add a new vfunc for the new draw_drawable and are thus
backwards compat.
2009-07-01 19:50:49 +02:00
Alexander Larsson
038398d493 Move new draw_drawable argument to end to make it more backwards compat 2009-07-01 16:13:31 +02:00
Alexander Larsson
3b6cf72f39 Move destroyed check to common code for get_origin & get_root_coords
Also remove weird return value from get_root_coords
2009-06-30 09:30:53 +02:00
Alexander Larsson
c84c0e92f8 Better implementation of native clear_area
Last commit was bad, as it didn't clip against client side
children. This implements such clipping first and then
only clears the rectangles that need to be cleared.
2009-06-26 17:07:24 +02:00
Alexander Larsson
0e548579de Implement gdk_window_clear_area natively for foreign windows
This fixes a redraw issue with the notification area in xfce4.
2009-06-26 15:45:53 +02:00
Alexander Larsson
43bc999e6d Ensure that we always calculate clip regions for root windows
Without this we can't draw to them, which caused problems for e.g.
gnome-settings-daemon clearing the background when the desktop
background changed.

Note: We don't actually clip away child windows from the root window,
the clip is just based on the size of the root window.
2009-06-25 17:05:21 +02:00