Commit Graph

902 Commits

Author SHA1 Message Date
Carlos Garnacho
b177bd92aa gdk: Filter out either smooth or non-smooth event depending on the evmask
If a device provides both smooth and non-smooth events, the latter will be
flagged with _gdk_event_set_pointer_emulated() so the client side window
receives one or the other. If a device is only able to deliver non-smooth
events, those will be sent, so both direction/deltas may need to be handled.
2012-03-01 16:28:57 -05:00
Michael Natterer
c41b52b4f6 gdk: transfer event->scroll.delta_x/y through csw 2012-03-01 16:28:57 -05:00
Carlos Garnacho
28e7d3c148 gdk: Get the right event window for pointer emulated events
get_event_window() just checked on GDK_TOUCH_MASK, including for emulated
pointer events, so at the very least those should also match evmasks with
no touch events whatsoever
2012-03-01 16:25:28 -05:00
Carlos Garnacho
0bb2e6f264 gdk: Set correct GdkModifierType on pointer emulated events 2012-03-01 16:25:27 -05:00
Carlos Garnacho
fcbcac0ca3 gdk: translate correctly from touch events into emulated pointer events 2012-03-01 16:25:27 -05:00
Matthias Clasen
11fdf1667c gdk: Don't treat touch events as button events
One more place where we assumed that touch events have a button
field.
2012-03-01 16:25:27 -05:00
Matthias Clasen
3880b12196 gdk: Use the last alive grab in order to get the event window
If an active grab kicks in on a different window, _gdk_display_has_device_grab()
would still find the former implicit grab for the window below the pointer, thus
sending events to an unrelated place.
2012-03-01 16:25:27 -05:00
Carlos Garnacho
9c6f71bfc7 gdk: Don't mutate pointer events to touch events just because a grab says so
If a grab with GDK_TOUCH_MASK kicks in due to a touch sequence emulating pointer
events, don't mutate the sequence into emitting touch events right away.
2012-03-01 16:25:27 -05:00
Carlos Garnacho
5942fee240 gdk: Let implicit touch grabs coexist with an implicit pointer grab
Create the backing GdkTouchGrabInfo for touches even if the pointer
emulating touch sequence is already holding an implicit grab on a
window that didn't select for touch events.
2012-03-01 16:25:26 -05:00
Carlos Garnacho
b897ba0cd8 gdk: Don't fully destroy the implicit touch grab on ::grab-broken
the backing GdkTouchGrabInfo will be needed if the overriding device
grab finishes before the touch does in order to send events back to
the implicit grab window. Instead, wait until the touch is physically
finished before removing the matching GdkTouchGrabInfo
2012-03-01 16:25:26 -05:00
Carlos Garnacho
6efe116715 gdk: Listen to touch events by default on the native window
GDK will only receive touch events when dealing with a multitouch
device, so these must be transformed to pointer events if the
client-side window receiving the event doesn't listen to touch
events, and the touch sequence the event is from does emulate
the pointer.

If a sequence emulates pointer events, it will result in a
button-press, N motions with GDK_BUTTON1_MASK set and a
button-release event, and it will deliver crossing events
as specified by the current device grab.
2012-03-01 16:25:26 -05:00
Carlos Garnacho
0a80c26cdf gdk: Only trigger motion hints machinery on motion events
Touch events have no need for it, plus the concept behind
gdk_event_request_motions() doesn't wrap around multiple
touches within a device.
2012-03-01 16:25:26 -05:00
Carlos Garnacho
2f2774b7a9 gdk: Have touch grabs behave like the implicit grab wrt crossing events
These are equivalent to an implicit grab (with !owner_events), so
if the touch leaves or enters the grab window, the other window
won't receive the corresponding counter-event.
2012-03-01 16:25:25 -05:00
Carlos Garnacho
c72a77b04c gdk: handle implicit touch grabs
If the touch sequence happens on a window with GDK_TOUCH_MASK set,
a GdkTouchGrabInfo is created to back it up. Else a device grab is
only created if the sequence emulates the pointer.

If both a device and a touch grab are present on a window, the later
of them both is obeyed, Any grab on the device happening after a
touch grab generates grab-broken on all the windows an implicit
touch grab was going on.
2012-03-01 16:25:25 -05:00
Carlos Garnacho
b5de12debd gdk: Don't change window_under_pointer for pure touch events
Only touch events that emulate the pointer do change it.
2012-03-01 16:25:25 -05:00
Carlos Garnacho
8689921b90 gdk: Generate crossing events around touch devices' press/release
Anytime a touch device interacts, the crossing events generation
will change to a touch mode where only events with mode
GDK_CROSSING_TOUCH_BEGIN/END are handled, and those are sent
around touch begin/end. Those are virtual as the master
device may still stay on the window.

Whenever there is a switch of slave device (the user starts
using another non-touch device), a crossing event with mode
GDK_CROSSING_DEVICE_SWITCH may generated if needed, and the normal
crossing event handling is resumed.
2012-03-01 16:25:21 -05:00
Carlos Garnacho
7f35708cee gdk: Add touch event types and mask
This commit introduces GDK_TOUCH_BEGIN/UPDATE/END/CANCEL
and a separate GdkEventTouch struct that they use. This
is closer to the touch event API of other platforms and
matches the xi2 events closely, too.
2012-03-01 16:25:20 -05:00
Alexander Larsson
fd0450b4e7 Fix up rendering of non-double-buffered overlays
My previous fix for this broke the progress bar in epiphany. This fix
makes it work again, and keeps the gimp bug fixed.

Basically, whenever we do a non-double-buffered rendering we have to
flush the entire window as it might be drawn outside the double
buffering machinery.
2012-03-01 14:14:33 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
ec25699f05 Clean up whitespace in _gdk_window_got_event
At the same time, fix an uninitialized warning.
2012-02-23 22:20:07 -05:00
Carlos Garnacho
c15d23ab5b gdk: Ensure that GdkPointerWindowInfo is only generated for pointers 2012-02-23 22:11:17 -05:00
Matthias Clasen
5e67d61ff4 Fix an uninitialized variable warning 2012-02-23 20:01:06 -05:00
Carlos Garnacho
5b014bfdfb gdk: Keep track of the last slave device used
This last slave device (stored per master) is used to fill
in the missing slave device in synthesized crossing events
that are not directly caused by a device event (ie due to
configure events or grabs).
2012-02-23 16:45:29 -05:00
Alexander Larsson
26ed41ece5 Remove unused functions 2012-02-19 15:10:48 +01:00
Alexander Larsson
fcb58f3c83 Don't unnecessarily clear background twice in no EXPOSE_MASK case
We already clear in begin_paint, no need to do it again. In fact, this
will get the wrong result if the background has alpha.
2012-02-19 11:55:22 +01:00
Alexander Larsson
e3da2f55ea Fix background clearing when exposing with non-double buffered widgets
We used to set a flushed boolean whenever we flushing double buffered
areas to the window due to a non-db draw. We then read back from the
window if this was set. This broke when we were doing multiple paints
of the same area after a flush as we were re-reading the window each
time, overdrawing what was previously draw.
2012-02-19 11:43:48 +01:00
Alexander Larsson
251cffb638 Fix transparency handling with non-double-buffered drawing
Sometimes we need to read back the window content into our double
buffer due to rendering a window with alpha when there is
no implicit paint or it has been flushed due to non-db drawing
before.

However, in this case we can't use gdk_cairo_set_source_window as
it might trigger an implicit paint flush as we detect what we
think is a direct non-double buffered window draw operation, which
will flush the implicit paint operation that we're just setting up.

To fix this we use the raw gdk_window_ref_impl_surface operation
to get the source surface.
2012-02-09 21:14:07 +01:00
Alexander Larsson
5d9736fe13 Fix non-double-buffered drawing
There was a sign issue in a coordinate transform that made us
flush the wrong region when flushing an implicit paint.
The non-double buffered drawing would then be drawn over the
right area, but then at the end of the implicit paint this
would be overdrawn with the area we didn't properly remove
from the implicit paint.

Also, the translation from window coords to impl window
coords is now done before removing any active double
buffered paints, as these are also in impl window coords.
2012-02-09 21:14:07 +01:00
Alexander Larsson
fed1cfb122 Make the default background for GdkWindows transparent
With the changes in default CSS to make the default background transparent
we ran into issues where intermediate GdkWindow (for instance the
view_window in GtkViewport) where we didn't set an explicit background
(because before they were always covered). So instead of showing throught
the transparent windows were showing the default backgroind of the intermediate
window (i.e. black).

With this change we also needed to fix GtkViewport, as it was previously
relying on the bin and view windows to cover widget->window so that the
border was not visible if shadow_type was NONE.
2012-02-09 16:39:23 +01:00
Alexander Larsson
7ec927a386 Fix visibility notification event reporting
We were checking the event mask for GDK_VISIBILITY_NOTIFY,
not GDK_VISIBILITY_NOTIFY_MASK, which was clearly a typo.
2012-01-20 11:01:49 +01:00
Javier Jardón
24360a8076 gdk/*: Use g_list_free_full convenience function 2012-01-05 04:22:42 +01:00
Javier Jardón
a3abc18858 Deprecate all the public API that is using GdkColor struct 2011-12-22 02:59:39 +00:00
Xan Lopez
2d70d8fa36 gdkwindow: plug memory leak
==23282== 64 bytes in 2 blocks are definitely lost in loss record 8,069 of 13,389
==23282==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==23282==    by 0x39A1C3E2EA: cairo_region_create (cairo-region.c:196)
==23282==    by 0x6D9AF3D: recompute_visible_regions_internal (gdkwindow.c:964)
==23282==    by 0x6D9B4B8: recompute_visible_regions (gdkwindow.c:1126)
==23282==    by 0x6DA3450: gdk_window_hide (gdkwindow.c:5689)
==23282==    by 0x6D9CED9: _gdk_window_destroy_hierarchy (gdkwindow.c:2042)
==23282==    by 0x6D9D040: gdk_window_destroy (gdkwindow.c:2109)
==23282==    by 0x655B5E4: gtk_entry_unrealize (gtkentry.c:3012)
==23282==    by 0x7068BF3: g_cclosure_marshal_VOID__VOID (gmarshal.c:85)
==23282==    by 0x706710B: g_type_class_meta_marshal (gclosure.c:885)
==23282==    by 0x7066DF9: g_closure_invoke (gclosure.c:774)
==23282==    by 0x7080585: signal_emit_unlocked_R (gsignal.c:3340)
==23282==    by 0x707F619: g_signal_emit_valist (gsignal.c:3033)
==23282==    by 0x707FB71: g_signal_emit (gsignal.c:3090)
==23282==    by 0x679E243: gtk_widget_unrealize (gtkwidget.c:4458)
==23282==    by 0x64E83C7: gtk_bin_forall (gtkbin.c:172)
==23282==    by 0x6548BBD: gtk_container_forall (gtkcontainer.c:2014)
==23282==    by 0x67A966D: gtk_widget_real_unrealize (gtkwidget.c:10253)
==23282==    by 0x672D002: gtk_tool_item_unrealize (gtktoolitem.c:474)
==23282==    by 0x7068BF3: g_cclosure_marshal_VOID__VOID (gmarshal.c:85)

https://bugzilla.gnome.org/show_bug.cgi?id=666552
2011-12-19 15:06:22 -05:00
Cosimo Cecchi
8f4f7faa11 window: copy back window surface data when the implicit paint is flushed
When an implicit paint is flushed during expose, e.g. because a
non-double buffered widget is painting, make sure to copy the existing
data from the window surface we rendered before flushing back to the
paint surface, instead of using an empty base.
Code was already handling that (and said so in the comment), but only
when no implicit paint was used at all, and not in the case when it's
flushed mid-expose.
2011-12-07 08:54:09 +01:00
Cosimo Cecchi
2fad8eb0c3 window: trivial cleanup 2011-12-06 18:27:59 -05:00
Cosimo Cecchi
e3744bbd70 window: remove unused arguments and variables
Trivial cleanup, no functional change.
2011-12-06 17:49:35 -05:00
Alexander Larsson
4597f1ea6a gdk: gdk_window_get_update_area don't remove alpha covered areas
gdk_window_get_update_area is supposed to get the area where things
need painting, and remove them from the update areas. However, if
some area is covered by other windows with an alpha background we
can't just expect whatever the app choses to render in the update
area as correct, so we don't actually remove these areas, meaning
they will get correctly rendered when we get to the expose handlers.
2011-12-05 12:18:22 +01:00
Alexander Larsson
65ef15812b gdk: gdk_window_move_region
gdk_window_move_region doesn't move children, so we can't copy
transparent child window regions with copyarea, so we remove these
from the copy region.
2011-12-05 12:16:55 +01:00
Alexander Larsson
76ea768316 gdk: Fix alpha window background paintings on non-implicit paints 2011-12-05 11:40:30 +01:00
Alexander Larsson
68843a3e93 gdk: Remove unused _gdk_window_calculate_full_clip_region 2011-12-05 10:59:07 +01:00
Alexander Larsson
f00cfe1fac Handle has_alpha_background for parent-relative backgrounds 2011-12-05 10:55:55 +01:00
Alexander Larsson
7a263c68a0 gdk: Fix repaint of layered region during move_region 2011-12-01 22:08:00 +01:00
Alexander Larsson
8e28f53a1d gdk: Fix repaint of layered region during scroll 2011-12-01 22:08:00 +01:00
Alexander Larsson
f0c8c4a94b gdk: Fix repaint of layered region during raise 2011-12-01 22:07:59 +01:00
Alexander Larsson
0f6784a919 gdk: Make sure we don't copy to/from layered regions when moving a window 2011-12-01 22:07:59 +01:00
Alexander Larsson
46d5b89830 gdk: Track the layered area
We track the areas that have alpha coverage so that we can
avoid using these as sources when copying window contents.
We also don't remove such areas from the clipping regions so
that they are painted both by parent and child.
2011-12-01 22:06:44 +01:00
Alexander Larsson
f51482e283 gdk: Track wether windows have alpha in the background
This will let us handle such windows differently in the
drawing machinery
2011-12-01 22:03:51 +01:00
Alexander Larsson
7fd225c766 gdk: Expose bottommost windows first
This cleans up the expose handling a bit by using the existing
clip regions, and it allows us later to use painters algorithm
to do transparent windows.
2011-12-01 13:42:09 +01:00
Alexander Larsson
45df163e9d gdk: Remove now unused region tags completely 2011-12-01 13:38:04 +01:00
Alexander Larsson
915e9d57f9 win32: Use right native_window for implicit grabs
The native grab really is on the window that got the button press event.
2011-11-10 17:40:54 +01:00
Rui Matos
43f1b5abbc gdk: Add GDK_WINDOW_STATE_FOCUSED to GdkWindowState
This state means that the toplevel window is presented as focused to the user,
i.e with active decorations under an X11 window manager.

If the GDK backend doesn't implement this flag, it will just remain set after
mapping the window.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
2011-11-08 19:25:51 +00:00
Matthias Clasen
250d4331b2 Add device-taking variants of begin_resize/move_drag
This was one of the last places where display->core_pointer was
used in non-deprecated code paths.
2011-11-05 01:10:16 -04:00
Benjamin Otte
b120cb04a5 gdk: Move a bunch of deprecated code to a new file
The new file defines GDK_DISABLE_DEPRECATION_WARNINGS so it can happily
use deprecated APIs.

This commit moves those functions there that use deprecated functions
and currently cause warnings.

With this commit, GDK compiles without deprecation warnings.
2011-11-02 02:32:53 +01:00
Rui Matos
34357481b3 docs: Delete duplicate line in gdkwindow.c 2011-10-01 01:24:36 +01:00
Cosimo Cecchi
036c193fb2 GdkWindow: fix conditional jump depends on uninitialized value error
Those if() blocks don't have any reason being there, as x and y are not
pointers. If the window is destroyed, just set the out values to zero
and return.

As seen in valgrind:

==3306== Conditional jump or move depends on uninitialised value(s)
==3306==    at 0x624C74F: gdk_window_get_root_coords (gdkwindow.c:6933)
==3306==    by 0x5E193C3: gtk_tooltip_show_tooltip (gtktooltip.c:1160)
==3306==    by 0x5E19C05: tooltip_popup_timeout (gtktooltip.c:1282)
==3306==    by 0x623B102: gdk_threads_dispatch (gdk.c:754)
==3306==    by 0x8592F3A: g_timeout_dispatch (gmain.c:3907)
==3306==    by 0x859174C: g_main_context_dispatch (gmain.c:2441)
==3306==    by 0x8591F47: g_main_context_iterate (gmain.c:3089)
==3306==    by 0x8592494: g_main_loop_run (gmain.c:3297)
==3306==    by 0x5D2E501: gtk_main (gtkmain.c:1362)
==3306==    by 0x5C5652F: gtk_application_run_mainloop
(gtkapplication.c:115)
==3306==    by 0x7C47C9D: g_application_run (gapplication.c:1323)
==3306==    by 0x447B5F: main (nautilus-main.c:102)
==3306==  Uninitialised value was created by a stack allocation
==3306==    at 0x624D48A: gdk_window_get_device_position
(gdkwindow.c:4952)
2011-09-28 20:20:19 -04:00
John (J5) Palmieri
c3e0a0035e [gi] annotate gdk_container_set_user_data to take a GObject
* this allows bindings to correctly marshal the parameter
2011-08-14 08:07:10 -04:00
Matthias Clasen
25a4e8e7de Don't return a value from a void function
Reported in bug 654720, patch by Brian Cameron.
2011-07-17 18:05:17 -04:00
Joachim Breitner
317d7a1f54 docs: Remove mention of client messages 2011-07-05 16:08:04 -04:00
Benjamin Otte
e45230ad39 gdk: Make background changes queue a repaint
For client-side windows, we need to queue a repaint when the background
changes. For native windows, the windowing system does take care of it,
but client-side windows are our own, so we gotta do it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=652102
2011-06-09 05:51:53 +02:00
Benjamin Otte
2a4c361831 gdk: Don't set backgrounds on input-only windows
It doesn't make sense to allow a background on input-only windows, so
instead of setting it and then never using it, we just don't ever set
it.
2011-06-09 05:51:53 +02:00
Carlos Garnacho
1b53741e4c gdk: Document gdk_window_add_filter()+XGenericEvents behavior 2011-05-18 22:34:33 +02:00
Kristian Rietveld
8285c7f60f GdkWindow: remove unused variable 2011-05-04 07:31:39 +02:00
Carlos Garnacho
2a1a969d23 GdkWindow: Fix gdk_window_set_[device_]cursor() issues with root/foreign windows
It could be the case that gdk_window_set_cursor() is called on
pointers not yet known to the device tracking code in GdkDisplay,
so update the cursor on all master pointers.

The code actually updating the cursor for the given window has
been refactored out to gdk_window_set_cursor_internal(), used
in gdk_window_set_device_cursor() as well, which makes it handle
root/foreign windows too.

https://bugzilla.gnome.org/show_bug.cgi?id=649313
2011-05-04 01:00:42 +02:00
Martin Pitt
1e1cca8912 GdkWindow: Add missing (allow-none) annotations 2011-05-03 09:30:49 +02:00
Garrett Regier
793d12d70d Fix leaking calls to gdk_device_manager_list_devices()
gdk_device_manager_list_devices() returns a newly allocated list.

https://bugzilla.gnome.org/show_bug.cgi?id=645234
2011-03-21 10:37:10 -04:00
Benjamin Otte
0c37c88147 gdk: Use CAIRO_OPERATOR_SOURCE when painting double-buffered buffer
Otherwise RGBA surfaces will have issues.

This patch only affects non-implicit paints, ie no paints at all in the
real world.
2011-03-11 02:10:47 +01:00
Benjamin Otte
2a2ad8523f gdk: Add GDK_RENDERING environment variable
It's useful for debugging rendering issues, both correctness and
performance wise.

See the added documentation for what it does and how it works.
2011-03-11 02:10:47 +01:00
Tristan Van Berkom
713fd43c8f Fixed gdk_window_beep() to pass the toplevel instance to the toplevel's implementation vfunc.
This incorrect assignment would cause asynchronous aborts from the X server
(they would occur if for instance, an offscreen GtkTreeView calls
gtk_widget_error_bell()).
2011-03-10 14:10:32 +09:00
Alexander Larsson
a3b2840cae Remove support for GDK_NATIVE_WINDOWS
GDK_NATIVE_WINDOWS was a way to keep some old apps running that did weird
things in gtk2. We should not have to carry this forwards in gtk 3.x.

We do however keep a g_warning() call reminding people of this fact to
ease debugging when they try to port their applications.

https://bugzilla.gnome.org/show_bug.cgi?id=644119
2011-03-08 23:13:39 +01:00
Murray Cumming
f91c04e284 Minor documentation improvements
Mostly correcting it's to its and changing some , to .
2011-02-23 10:26:21 +01:00
Matthias Clasen
8291530abf More GDK documentation tweaks 2011-02-09 02:44:19 -05:00
Garrett Regier
adef25626e Fix annotation that broke the docs
It was added in 0e795b67c3
and removed in f6cc08fa57.
2011-02-08 23:06:42 -08:00
Matthias Clasen
f6cc08fa57 Remove annotation that breaks the docs
Before adding annotations, please check that gtk-doc can handle
them. Else they will be stripped out again.
2011-02-08 20:00:27 -05:00
Martin Pitt
0e795b67c3 [GI] Mark mis-detected constructors as such
constructors which take an object of the same class as its first argument are
mis-detected as method call with "self" argument by the GIR scanner. Using the
new (constructor) annotation from bug 561264, mark some of them as proper
constuctors, so that you can call them with NULL as first argument from
bindings; in particular, this fixes gdk_window_new() and the
gtk_radio_button_new_with*() constructors.
2011-02-02 15:11:06 +01:00
Benjamin Otte
44c02fcbb1 API: gdk: Change get_drag_window() API
The previous function gdk_drag_get_protocol_for_display() took native
window handles, so it had to be changed. Because it didn't do what it
was named to do (it didn't return a protocol even though it was named
get_protocol) and because it doesn't operate on the display anymore but
on the actual window, it's now called gdk_window_get_drag_protocol().
2011-02-01 18:51:57 +01:00
Matthias Clasen
454c36523a Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 18:50:09 -05:00
Benjamin Otte
51290e0a57 gdk: When reffing the impl surface, ref it from the impl window
This was causing surfaces to be created with the wrong size and that
caused broken clipping.

https://bugzilla.gnome.org/show_bug.cgi?id=640195
2011-01-23 21:41:01 +01:00
Tomeu Vizoso
e2d42f3c4b [gi] Return value of gdk_window_new should have transfer full 2011-01-21 17:34:18 +01:00
Pavel Holejsovsky
374e76a19d [GI] Mark unintrospectable constructs as (skip)
Also adds 'Rename to:' annotation to some constructs replacing the
skipped ones.
2011-01-20 13:57:21 +01:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Pavel Holejsovsky
9b88eb356d [GI] Add missing (scope) annotations 2011-01-20 13:57:15 +01:00
Benjamin Otte
2267602295 gdk: Simplify code
Fold the previous vfunc into the only caller.
2011-01-03 17:44:24 +01:00
Benjamin Otte
8d2104fdc9 gdk: Move window_get_device_position function out of the device hooks 2011-01-03 17:44:24 +01:00
Benjamin Otte
9746991548 API: gdk: Make gdk_display_get_window_at_device_position() a device API
It's now called gdk_device_get_window_at_position(). It doesn't make
sense to keep device-specific API part of the display.
2010-12-27 18:46:41 +01:00
Matthias Clasen
8f816d7c3b Fix a few typos 2010-12-25 00:26:22 -05:00
Matthias Clasen
27ce9421d0 Fix up GDK docs 2010-12-25 00:02:39 -05:00
Benjamin Otte
36893a9ef8 gdk: Make GdkWindow abstract
This way backend implementors get an error if they don't set
display_class->window_type to their subclass. And that's exactly what we
want.
2010-12-21 12:07:09 -05:00
Benjamin Otte
dcb03b1085 gdk: Use G_DEFINE_TYPE for GdkWindow 2010-12-21 12:07:08 -05:00
Benjamin Otte
3036922b3d gdk: Create windows via _gdk_display_create_window()
THe use of this function will become visible in the next commits. But
wrapping g_object_new() is a generally a good idea anyway.
2010-12-21 12:07:08 -05:00
Benjamin Otte
a9637f05b6 gdk: Use g_object_(un)ref instead of gdk_cursor_(un)ref 2010-12-21 12:07:05 -05:00
Benjamin Otte
0b4913a166 gdk: Make GdkCursor a GObject
Also port the X11 implementation. Win32 and Quartz need to be ported
still.
2010-12-21 12:07:04 -05:00
Matthias Clasen
519f09f7f4 Add vfuncs for keyval and window property functions
The keyval functions should really be generic, and the window
property api should be completely revisited, but for now this
will allow us to proceed.
2010-12-21 12:07:03 -05:00
Matthias Clasen
afa0ebf36b Add vfuncs for gdk_test apis 2010-12-21 12:07:02 -05:00
Matthias Clasen
214342eac5 Clean up gdkx.h a bit
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.

Also remove a workaround for a long-fixed X server bug.
2010-12-21 12:07:01 -05:00
Matthias Clasen
126212b470 Add a vfunc for _gdk_window_impl_new 2010-12-21 12:07:01 -05:00
Matthias Clasen
2d7583c0e3 Make gdk_window_{lookup,foreign_new}_for_display backend specific
At the same time, make GDK_IS_DISPLAY_X11 available in gdkx.h, and
add some exemplaric ifdefs to GTK+ code.
2010-12-21 12:06:59 -05:00
Matthias Clasen
9adb974155 Add a vfunc for _gdk_windowing_window_get_next_serial 2010-12-21 12:06:58 -05:00
Matthias Clasen
ccb6edeb8b Add vfuncs for process_updates_recurse and the before and after hooks 2010-12-21 12:06:58 -05:00
Matthias Clasen
ea96e5e16f Explode gdkinternals.h into per-class private headers
At the same time, move some more class and instance structs
out of public headers.
2010-12-21 12:06:58 -05:00
Matthias Clasen
9a1cc81acb Add a vfunc to replace _gdk_windowing_window_destroy_foreign
All backends updated.
2010-12-21 12:06:57 -05:00
Matthias Clasen
1e694b4dd8 Add a vfunc for gdk_window_set_composited 2010-12-21 12:06:57 -05:00
Matthias Clasen
7f6ac56e3c Add a vfunc for gdk_window_set_composited 2010-12-21 12:06:57 -05:00
Matthias Clasen
a169f6e32d Make GdkDevice parallel-implementable
Use the grab and ungrab vfuncs from the frontend instead of the
_gdk_windowing wrappers, and move some things around accordingly.
Again, only the X11 backend has been updated, other backends
need to be updated to match.
2010-12-21 12:06:56 -05:00
Matthias Clasen
c53ec081ce Add vtables for DND
This commit hides GdkDragContext and GdkDragContextClass, adds
vfuncs for most drag context functionality, and turns the X11 DND
implementation into GdkDragContextX11. We also add vfuncs to
GdkDisplay for gdk_drag_get_protocol and to GdkWindow for
gdk_drag_begin, and implemenet them for X11.
Other backends need similar treatment and are broken now.
2010-12-21 12:06:56 -05:00
Matthias Clasen
de84a7b14f Move gdk_window_lookup to common code 2010-12-21 12:06:55 -05:00
Alexander Larsson
ac7d55c948 Convert all gdk_window methods to vtable calls 2010-12-21 12:06:54 -05:00
Carlos Garnacho
17e97467df Strengthen checks in functions taking a GdkDevice
Docs have also been improved, to make explicit the device
type/source accepted.
2010-12-20 23:08:10 +01:00
Colin Walters
d08ff485f2 gdkwindow: Fix event unref iteration
We were double looping previously which caused a NULL deref.
2010-12-17 15:41:15 -05:00
Colin Walters
806c04411d gdk: Fix GdkWindowFilter internal refcounting
Running gnome-shell under valgrind, I saw the attached invalid write.
Basically we can destroy a window during event processing, and the old
window_remove_filters simply called g_free() on the filter, ignoring
the refcount.  Then later in event processing we call filter->refcount--,
which is writing to free()d memory.

Fix this by centralizing list mutation and refcount handling inside
a new shared _gdk_window_filter_unref() function, and using that
everywhere.

==13876== Invalid write of size 4
==13876==    at 0x446B181: gdk_event_apply_filters (gdkeventsource.c:86)
==13876==    by 0x446B411: _gdk_events_queue (gdkeventsource.c:188)
==13876==    by 0x44437EF: gdk_display_get_event (gdkdisplay.c:410)
==13876==    by 0x446B009: gdk_event_source_dispatch (gdkeventsource.c:317)
==13876==    by 0x4AB7159: g_main_context_dispatch (gmain.c:2436)
==13876==    by 0x4AB7957: g_main_context_iterate.clone.5 (gmain.c:3087)
==13876==    by 0x4AB806A: g_main_loop_run (gmain.c:3295)
==13876==    by 0x8084D6B: main (main.c:722)
==13876==  Address 0x1658bcac is 12 bytes inside a block of size 16 free'd
==13876==    at 0x4005EAD: free (vg_replace_malloc.c:366)
==13876==    by 0x4ABE515: g_free (gmem.c:263)
==13876==    by 0x444BCC9: window_remove_filters (gdkwindow.c:1873)
==13876==    by 0x4454BA3: _gdk_window_destroy_hierarchy (gdkwindow.c:2043)
==13876==    by 0x447BF6E: gdk_window_destroy_notify (gdkwindow-x11.c:1115)
==13876==    by 0x43588E2: _gtk_socket_windowing_filter_func (gtksocket-x11.c:518)
==13876==    by 0x446B170: gdk_event_apply_filters (gdkeventsource.c:79)
==13876==    by 0x446B411: _gdk_events_queue (gdkeventsource.c:188)
==13876==    by 0x44437EF: gdk_display_get_event (gdkdisplay.c:410)
==13876==    by 0x446B009: gdk_event_source_dispatch (gdkeventsource.c:317)
==13876==    by 0x4AB7159: g_main_context_dispatch (gmain.c:2436)
==13876==    by 0x4AB7957: g_main_context_iterate.clone.5 (gmain.c:3087)

https://bugzilla.gnome.org/show_bug.cgi?id=637464
2010-12-17 12:07:37 -05:00
Carlos Garnacho
2c8c1c6df4 Remove *_set_extension_events() and old API to query devices.
The old functions to get core pointer and devices list are gone as
well. This slice is entirely replaced internally by multidevice
handling and may just go.
2010-12-17 16:25:14 +01:00
Matthias Clasen
208d717fef Optimize gdk_window_set_shape_combine_region
When setting no shape on an unshaped window, nothing changes,
so return early instead of recomputing lots of visibility
information.

Pointed out by Owen Taylor in bug 637156.
2010-12-14 22:21:39 -05:00
Carlos Garnacho
44a7ef7bec Add gdk_window_[gs]et_source_events()
This function will enable events for all devices of a given
GdkInputSource, either these available at the time of the call,
or these that are connected in the future.
2010-12-15 03:17:59 +01:00
Carlos Garnacho
f5a20ab65a Add gdk_event_[gs]et_source_device().
This function may be used to know the hardware device that triggered
an event, it could resort to the master device in the few cases there's
not a direct hardware device to relate to the event (i.e.: crossing events
due to grabs)
2010-12-15 03:17:58 +01:00
Benjamin Otte
d55073fde6 gdk: Remove depth argument from GdkWindowImpl->get_geometry() 2010-12-06 01:02:52 +01:00
Benjamin Otte
645d0ac403 API: gdk: Remove depth argument from gdk_window_get_geometry()
We don't want to expose depth anymore. If you need it, query the visual.
2010-12-06 01:02:52 +01:00
Matthias Clasen
5fdc140dd8 Fix a segfault in gdk_window_beep
Not a good idea to cast an instance to a class...
2010-12-04 17:25:40 -05:00
Paolo Borelli
cd76b057e9 Annotate gdk_window_get_geometry, get_position and get_origin 2010-12-04 15:47:50 +01:00
Benjamin Otte
350fb1d55c API: gdk: Rename GdkWindowObjectClass to GdkWindowClass
Be consistent in the naming of objects.
2010-12-03 19:11:13 +01:00
Matthias Clasen
17e2c5391c Fix up parameter mismatches in the docs
And other minor gdk doc fixes.
2010-12-03 09:07:06 -05:00
Benjamin Otte
fdb242ac6a gdk: Clean up Cairo code
Remove a bunch of code that is not required.
2010-12-02 20:21:05 +01:00
Benjamin Otte
f9a9567731 gdk: Replace direct calls of _gdk_event_func with _gdk_event_emit()
For now that function just calls the event func.
2010-12-02 20:21:05 +01:00
Benjamin Otte
4d1604c77d gdk: Move window beeps into GdkWindowImpl
One less magic function. Also refactored it to make it easier to
implement. It now returns TRUE if it beeped and FALSE if it failed to do
so. A default implementation exists that just returns FALSE for all the
backends that can't beep windows (read: everything but X11 with XKB -
and why on earth do keyboard libs implement beeping?)
2010-12-02 20:21:05 +01:00
Benjamin Otte
1269f8424f gdk: Make get_shape and get_input_shape vfuncs
Trying to get rid of all the _gdk_windowing_something() functions that
we expect backends to magically know about and instead put them in a
proper interface (mostly GdkWindowImplClass).
2010-12-02 20:21:04 +01:00
Benjamin Otte
b9fc6a0c03 gdk: Remove remaining includes of gdkdrawable.h 2010-12-02 20:21:04 +01:00
Benjamin Otte
3494f87a10 API: Remove GdkNoExposeEvent
It's not used by anyone and not supported by any backend but X11.
2010-12-02 20:21:04 +01:00
Benjamin Otte
98838df2db gdk: Make GdkWindow->impl a GdkWindowImpl 2010-12-02 20:21:04 +01:00
Benjamin Otte
17a0a467a1 gdk: Pass the GdkWindow to resize_cairo_surface vfunc
So it's in sync with all the other vfuncs.
2010-12-02 20:21:04 +01:00
Benjamin Otte
e4c27b0a59 API: GdkWindow no longer is a GdkDrawable
Also, name the get_type function properly.
2010-12-02 20:21:03 +01:00
Benjamin Otte
d1700d6e3c gdk: Move ref_cairo_surface from GdkDrawable to GdkWindowImpl
Also make it take the actual GdkWindow, not the implementation, like all
the other vfuncs do.
2010-12-02 20:21:03 +01:00
Benjamin Otte
62d004cf8f gdk: Remove _gdk_drawable_ref_cairo_surface()
Instead, call the vfunc directly from gdkWindow.c
2010-12-02 20:21:03 +01:00
Benjamin Otte
1bb6f48bb3 gdk: Rename GdkWindowObject to GdkWindow
... and remove most of the casting that used to be necessary.
2010-12-02 20:21:03 +01:00
Benjamin Otte
7acb64f983 gdk: Make GdkWindowImpl a class, not an interface
It's a subclass of GdkDrawable and the baseclass for GdkWindowImplX11
etc now.
2010-12-02 20:21:02 +01:00
Benjamin Otte
81605623e2 gdk: Use GdkDrawable for impl pointers
... instead of GdkWindow
2010-12-02 20:21:02 +01:00
Benjamin Otte
072498ae87 gdk: Make _gdk_window_ref_cairo_surface() protected and use it
... instead of _gdk_drawable_ref_cairo_surface() where appropriate.
Also, don't implement the drawable->create_cairo_surface vfunc anymore.

This is in preparation for the split of GdkWindow from GdkDrawable.
2010-12-02 20:21:02 +01:00
Benjamin Otte
18a6976e5a API: gdk: Don't track outstanding surfaces
You are not allowed to track surfaces from GDK or draw outside of expose
events. So we can remove ugly hacks needed previously. See
https://bugzilla.gnome.org/show_bug.cgi?id=606009 for the introduction
of this workaround.
2010-12-02 20:17:28 +01:00
Benjamin Otte
becaf660fc API: gdk_drawable_get_visible_region => gdk_window_get_visible_region
Also get rid of the GdkDrawable vfunc.
2010-12-02 20:17:28 +01:00
Benjamin Otte
6a3a89a621 API: gdk_drawable_get_clip_region() => gdk_window_get_clip_region()
Also remove the vfunc from GdkDrawableClass.
2010-12-02 20:17:28 +01:00
Benjamin Otte
97e6e9d212 API: Make gdk_cairo_create() take a GdkWindow
This is not strictly an API change as GdkDrawable is typedeffed to
GdkWindow, but it changes the header, so I'm marking it as such.
gdk_cairo_create() can only be used with windows these days, so it makes
sense to pass a window. With that, we can alseo remove the
set_cairo_clip() vfunc from GdkDrawable and implement it inside
gdkwindow.c.
2010-12-02 20:17:28 +01:00
Benjamin Otte
cf51750bf4 API: x11: gdk_drawable_get_xid => gdk_window_get_xid
Also moves the function implementations to gtkwindow-x11.c.
2010-12-02 20:17:27 +01:00
Milan Bouchet-Valat
2e3935ba9d Fix missing (transfer) annotations in GDK
Mostly missing (transfer none).
2010-11-24 21:37:20 +01:00
Michael Natterer
fb5dd9f72f Move all GdkDevice members to private and add one missing accessor 2010-11-23 20:25:13 +01:00
William Jon McCann
323df2b280 Make gdk_event_apply_filters safe against changes in filter list
An event filter may add or remove filters itself.  This patch does
two things to address this case.  The first is to take a temporary
reference to the filter while it is being used.  The second is
to wait until after the filter function is run before determining
the next node in the list to process.  This guards against
changes to the next node.  It also does not run functions
that have been marked as removed.  Though I'm not sure if this
case can arise.

https://bugzilla.gnome.org/show_bug.cgi?id=635380
2010-11-22 13:16:24 -05:00
Javier Jardón
1268c17983 docs: Move documentation to inline comments: general 2010-11-15 05:35:40 +01:00
Carlos Garnacho
ce06043f17 GdkWindow: Add gdk_window_set_background_rgba()
This new function takes a GdkRGBA in order to set the background to
an alpha color. Keep in mind that RGBA visuals and a composited environment
are still necessary to have an alpha background displayed.
2010-10-22 20:14:56 +02:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Kristian Rietveld
5cbb309841 Initialize device_cursor hash table before creating impl window 2010-10-14 18:01:51 +02:00
Matthias Clasen
34b117865a Initialize variables
valgrind was complaining about uninitialized values here, and
sure enough, gdkdevice-xi.c doesn't set device position.
2010-10-14 08:14:33 -04:00
Michael Natterer
4ca2632d42 gdk: add slots for all GdkWindowObject signals
Also add padding for future extension.
2010-10-14 13:43:08 +02:00
Michael Natterer
9d9742f1e5 Bug 631599 - Allow to use arbitrary surfaces for offscreen windows
Add signal GdkWindow::create-surface which allows to use any
surface type as storage for offscreen windows.

Test the new signal in tests/gdkoffscreenbox.c
2010-10-14 13:25:23 +02:00
Kristian Rietveld
eca2af5230 Make set_cairo_surface_size a vfunc on GdkWindowImpl
Note the special implementation of this method on GdkOffscreenWindow
that makes sure its current surface is not destroyed.
2010-10-05 15:38:23 +02:00
Matthias Clasen
32d1defc76 GDK docs: help gtk-doc understand gdk_window_invalidate_maybe_recurse 2010-10-01 09:10:52 -04:00
Benjamin Otte
1408bd9a37 gdk: Don't (un)set the background when destroying a window.
This previously caused the x11 code to do a XSetWindowBackgroundPixmap
call on a window that was about to be destroyed. And that's not really
useful.

https://bugzilla.gnome.org/show_bug.cgi?id=630864
2010-09-29 12:18:17 +02:00
Michael Natterer
06773b1e8b gdk: remove "screen" member from GdkOffscreenWindow, it has become obsolete
Also remove screen parameter from _gdk_offscreen_window_new() and get
rid of a bunch on includes in gdkoffscreenwindow.c
2010-09-28 16:05:38 +02:00
Matthias Clasen
2b3574dda1 Improve some docs 2010-09-27 20:59:08 -04:00
Benjamin Otte
f52a1fcfbd API: remove gdk_drawable_get_size() 2010-09-26 15:11:45 +02:00
Benjamin Otte
9826c31a9f gdk: Get rid of gdk_drawable_get_size() usage 2010-09-26 15:11:43 +02:00
Benjamin Otte
6c971ac479 API: Remove window clear APIs
The feature can and should be implemented manually using
gdk_window_get_background() and Cairo drawing. A non-cairo drawing API
does not make sense in GDK anymore.
2010-09-26 15:11:43 +02:00
Benjamin Otte
af32c9c9be API: Add size getters for GdkWindow
gdk_window_get_width() and gdk_window_get_height() will replace
gdk_drawable_get_size().
2010-09-26 15:11:43 +02:00
Benjamin Otte
7c62a44324 gdk: Make GdkWindow cope better with its surface outliving the window
Make extra sure we release the surface properly. Also make sure that the
released surface doesn't keep any references to us.
2010-09-26 15:11:41 +02:00
Benjamin Otte
04d5c477aa API: Remove gdk_drawable_get_colormap()
And with it, remove any notion of colormaps from GdkWindow. In
particular, X11 windows will now not set attrs.colormap when calling
XCreateWindow.
2010-09-26 15:11:33 +02:00
Benjamin Otte
f08254074c API: Remove colormap member from GdkWindowAttr
Also remove all code that cares about differing colormaps for child
windows.
2010-09-26 15:11:33 +02:00
Benjamin Otte
b5097de481 gdk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
7f486231ac API: Add gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
a6ef356107 API: Remove drawable getters for visual, screen and depth
Removed and replaced are:
gdk_drawable_get_visual() => gdk_window_get_visual()
gdk_drawable_get_screen() => gdk_window_get_screen()
gdk_drawable_get_depth()  => gdk_visual_get_depth
                                          (gdk_window_get_visual())
2010-09-26 15:11:33 +02:00
Benjamin Otte
a6e936788a gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Benjamin Otte
5b9bbf9de2 API: Add gdk_window_get_visual() and gdk_window_get_screen()
Now that we store the visual in the GdkWindow, these are rather trivial
accessors.
2010-09-26 15:11:32 +02:00
Benjamin Otte
eee6c002d1 gdk: store the visual in the GdkWindowObject 2010-09-26 15:11:32 +02:00
Benjamin Otte
894d402c0f API: Remove gdk_drawable_set_colormap() 2010-09-26 15:11:32 +02:00
Benjamin Otte
2fc80e6102 gdk: Create paint surfaces of the same content as the window
Previously, we failed to create RGBA double buffers for RGBA windows.
2010-09-26 15:11:32 +02:00
Benjamin Otte
6a2124d566 gdk: Remove _gdk_drawable_get_source_drawable()
Now that we don't create pixmaps anymore, this function is not needed
anymore. The indirection it did previously is now basically moved to
gdk_window_create_similar_surface()
2010-09-26 15:11:31 +02:00
Benjamin Otte
e6b74551d1 gdk: Get rid of all occurences of "pixmap" in the comments
Replace them with the correct term, usually "surface".
2010-09-26 15:11:30 +02:00
Benjamin Otte
90b4b88629 API: Remove gdk_window_set_back_pixmap()
The same effect can be achieved with
gdk_window_set_background_pattern().
2010-09-26 15:11:30 +02:00
Benjamin Otte
332652f702 API: Change offscreen windows to use a cairo_surface_t
This requires changes to all the offscreen surface getters that used to
return a GdkPixmap before.
2010-09-26 15:11:29 +02:00
Benjamin Otte
ebdf26e1d8 gdk: Use surfaces for double buffering
Don't use pixmaps anymore. Also use subsurfaces for implicit paints and
correcly set device offsets.
2010-09-26 15:11:11 +02:00
Benjamin Otte
666539736d gdk: Make csw windows have their own cairo surface
With Cairo 1.10 now having cairo_surface_create_for_rectangle(), we can
use them. No need to create multiple native surfaces for the same X
window (ugh) anymore.
2010-09-26 15:11:11 +02:00
Benjamin Otte
b69fdbbd04 API: Remove gdk_window_get_internal_paint_info()
This function should not exist in public API, it exposes too many
internals.
2010-09-26 15:11:11 +02:00
Benjamin Otte
6d27362620 gdk: Create surfaces directly, not from the source drawable
The notion of a source drawable does not make a lot of sense for windows
that are not backed by a drawable, such as GdkOffscreenWindow after
converting it to cairo_surface_t.
2010-09-26 15:11:11 +02:00
Benjamin Otte
2bedd205c5 gdk: Remove gdk_windowing_create_cairo_surface()
Instead, actually use the create_cairo_surface vfunc on the
implementation drawable. D'oh.
2010-09-26 15:11:11 +02:00
Benjamin Otte
d7335837e0 gdk: Remove gdk_window_redirect_to_drawable()
Also remove the reverse gdk_window_remove_redirection().

The code was only used by the snapshotting code, and that code is dead
now.
2010-09-26 15:11:11 +02:00
Benjamin Otte
2c1633699f gdk: Rewrite background handling
Now the window background is a cairo_pattern_t. The backends will try to
set this as good as they can on the windowing system, but no guarantees
are made on wether the windowing system supports the pattern.

Also gets rid of GDK_NO_BG as undefined behavior is not a good idea to
support, and GDK_NO_BG effectively made the window's contents undefined.
It wasn't effectively used in GTK anyway.
2010-09-26 15:03:00 +02:00
Benjamin Otte
c250b3fe1d gdk: Remove supports_native_bg on WindowImplIface
This will not be TRUE for anything anymore, once we fix background
handling.
2010-09-26 15:03:00 +02:00
Benjamin Otte
95686cb704 gdk: Remove send_expose event from gdk_window_clear_region_internal()
It's always FALSE.
2010-09-26 15:03:00 +02:00
Benjamin Otte
547e2cc837 gdk: Remove GdkWindowImpl->clear_region
It was only used on the X11 backend and is easier to implement locally,
in particular when we want to allow backgrounds that X can't handle.
2010-09-26 15:03:00 +02:00
Benjamin Otte
3d98537c2e gdk: Simplify clear_area code
No more use for a gdk_window_clear_area_internal() function as there's
just one caller.
2010-09-26 15:03:00 +02:00
Benjamin Otte
6ab793da8d API: Remove gdk_window_clear_area_e()
Awesome name for a function. Plus, it's unused and its functionality can
easily be replicated.
2010-09-26 15:03:00 +02:00
Benjamin Otte
a7fec8cf46 API: Remove shape_combine_mask functions from gdk
This removes gdk_window_shape_combine_mask() and
gdk_window_input_shape_combine_mask(). GdkBitmap is going away and a
replacement exists via the combine_region() functions and
gdk_cairo_region_create_from_surface().
2010-09-26 15:02:59 +02:00
Johan Dahlin
6ba904486c Add a couple of missing transfer annotations 2010-09-20 23:45:01 -03:00
Matthias Clasen
6aa8941b84 Add annotations
The goi scanner warns about these nowadays.
2010-09-17 00:18:20 -04:00
Matthias Clasen
08dd02fe25 Don't use g_idle_add to schedule idles in GDK
We need to use gdk_threads_add_idle, in order to keep GDK code
under the GDK lock.

Bug 629277
2010-09-10 22:32:44 -04:00
Javier Jardón
bd277fad50 Remove deprecated gdk_window_get_deskrelative_origin() and its implementations 2010-09-09 00:50:46 +02:00
Owen W. Taylor
d04e557370 Fix annotations for gdk_window_get_device_position()
Add (out) and (transfer none) as appropriate
2010-09-07 14:03:18 -04:00
Matthias Clasen
eb10e6b128 Remove the long deprecated GDK_WINDOW_DIALOG type.
This has been deprecated forever, and was just left in for
compatibility reasons.
2010-08-28 20:10:02 -04:00
Javier Jardón
1abb8f6e7f gdk/gdkwindow.c: Fix compilation warning 2010-08-24 21:27:57 +02:00
Carlos Garnacho
b2545e1732 GdkWindow: Check device cursor first in update_cursor(). 2010-08-17 15:45:17 +02:00
Benjamin Otte
434b3e1072 gdk: Use gdk_window_get_background_pixmap() when setting up paint 2010-08-16 19:48:46 +02:00
Benjamin Otte
2944561ba3 API: Add gdk_window_get_background_pattern()
This is the suggested way for GTK3 to store a Window's background so it
makes sense to use the same function today already.
2010-08-16 19:48:46 +02:00
Benjamin Otte
0b29f4e769 Remove window background getters again
They were added as accessors for 2.22 even though querying the
background wasn't possible previously. As GTK 3.0 will change background
handling, it doesn't make sense at all to expose these getters.
2010-08-15 03:34:02 +02:00
Benjamin Otte
ca7d3f9081 gdk: When using OPERATOR_SOURCE, use clip + paint instead of fill
SOURCE is unbounded, so we clear unwanted areas.
2010-08-14 01:46:04 +02:00
Benjamin Otte
fc170551b6 gdk: Do final copy with OPERATOR_SOURCE in end_implicit_paint
For windows with alpha channel, the previous contents would otherwise
not be erased. Visible for example in the status icon code.

Thanks to Thomas Wood for noticing.
2010-08-13 20:48:36 +02:00