Commit Graph

111 Commits

Author SHA1 Message Date
Martin Schlemmer
770e308c42 win32: cummulated backport of xp theme fixes from master 2010-08-28 15:14:31 +02:00
Benjamin Otte
9f1cb0798b 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 20:01:49 +02:00
Benjamin Otte
863853ec5f Revert "Remove _gdk_region_new_from_yxbanded_rects()"
This reverts commit dde9cf2882.
2010-05-26 09:25:44 +02:00
Benjamin Otte
dde9cf2882 Remove _gdk_region_new_from_yxbanded_rects()
It was an internal function and we can use
cairo_region_create_rectangles() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-05-23 23:20:30 +02:00
Alexander Larsson
841fa47715 Track direct window cairo access and avoid tricks when used
When a cairo surface is requested for direct window access (i.e. not
when double-buffering) we can't really track when the actual drawing happens
as cairo drawing is not virtualized. This means we can't properly flush
any outstanding window moves or implicit paints.

This actually causes problems with e.g. abiword (bug #606009) where they
draw without double-buffering. If you press down it scrolls the window
and then draws the caret, but the caret drawing does not flush the
outstanding move from the scroll, so the caret gets drawn on the wrong
screen.

We fix this by never allowing either implicit paints or outstanding window
moves on impl-windows where any windows related to it has an outstanding
direct cairo surface. Luckily this is not very common so in practice this
doesn't matter much.
2010-01-19 15:01:03 +01:00
Alexander Larsson
739121dee0 Remove unused grab_one_pointer_release_event var
We don't use this anymore, so just remove.
2009-09-28 15:26:19 +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
Alexander Larsson
0c7830aa42 Make public GDK_WINDOW_TYPE and GDK_WINDOW_DESTROYED use functions calls 2009-09-04 17:59:17 +02:00
Alexander Larsson
a10e90b799 Move _gdk_window_event_parent_of to gdkinternals.h
gdkprivate.h is in installed file and this function does not
need to be exported.
2009-09-04 17:59:17 +02:00
Alexander Larsson
4d3b19fa7c Update shape handling
For toplevels, never apply clip as shape, instead apply shape.
This way we don't have to re-set it all the time as the window size
changes. Furthermore, this change fixes unsetting a shape on a
toplevel window which didn't actually unset the shape before.

Additionally we never apply clips as shape if the shape would just
be the same as the regular window size. This means we won't unnecessarily
add a useless shape to most native child windows (and additionally this
helps apps that do weird X stuff that don't expect these shaped windows).
2009-08-31 15:06:01 +02:00
Alexander Larsson
a79f929dd6 Add support for enabling only native windows
Some applications make weird assumtions on Gtk+ that do not work anymore
with the new client-side windows support. For instance SWT/Eclipse reorders
the stacking order of the X windows directly without telling gdk this,
which breaks gdk drawing as gdk now relies on knowing the stacking order
for window clipping.

This introduces a GDK_NATIVE_WINDOWS environment variable, which if set
causes Gtk+ to always use native windows. Its more compatible with
pre-csw Gtk+ behaviour if you do weird X-specific hacks, although it does
limit the size of GdkWindows to 65535x65535.
2009-08-24 15:22:29 +02:00
Alexander Larsson
8a517dc0bb Modify window system exposes wrt outstanding moves
If there are outstanding moves in an area that intersects
the source of an outstanding move we need to move the invalid
area correspondingly, otherwise we will expose the wrong area
as the outstanding move copy will happen before we expose
the invalid area.
2009-08-13 14:46:01 +02:00
Alexander Larsson
f30cfd729a Show/Hide native window when updating viewable
This moves the native show/hide calls to the generic code
for calculating viewable rather than in its own separate code
called from gdk_window_show/hide. This simplifies the code a bit,
but most significantly it means things are correctly shown when
they become viewable for other reasons than a show/hide call.

For instance, this fixes bug 590442 (gvim embedding) where the
toplevel GtkPlug is mapped by the embedder and we didn't previously
pick up that the native children became viewable and should be shown.
2009-08-11 11:35:35 +02:00
Alexander Larsson
aa8693f2cb Track viewable for GdkWindow 2009-07-18 23:11:54 +02:00
Alexander Larsson
9044ec9bb9 Correctly set enter/leave events as detail=nonlinear
If we get a nonlinear enter/leave notify on the toplevel we need
to set nonlinear in all the events we send, even if the in-toplevel
tree is linear.

This fixes combobox menus popping down immediately when you click
(not hold). (bug #587559)
2009-07-09 17:06:46 +02:00
Alexander Larsson
5f12fe2b3b Add _gdk_gc_get_clip_mask
Internal function to get the clip mask of a gc (if set)
2009-07-07 17:10:49 +02:00
Alexander Larsson
10bf7ca744 Clean up embedding api
we now use gdk_offscreen_window_set_embedder() instead of a signal
to get the parent. This also replaces set_has_offscreen_changes.

Rename "parent" in all embedding related names to "embedder" to make it
more obviously different than the normal parent.

Rename gdk_window_get_offscreen_pixmap to gdk_offscreen_window_get_pixmap
to match the other offscreen calls.

Rename gdk_window_offscreen_children_changed to gdk_window_geometry_changed
as this is more descriptive.
2009-07-01 14:36:36 +02:00
Alexander Larsson
0c7a26690d Fix spelling of synthesize 2009-06-18 20:58:13 +02:00
Alexander Larsson
56dfbd997e Handle gdk_window_beep on offscreen windows 2009-06-11 22:11:48 +02:00
Alexander Larsson
278e5bd170 Send crossing event due to geometry change in idle
Doing this directly had some issues with picking going recursive in
clutter-gtk. Furthermore, doing it in an idle means we can coalesce
multiple calls (which is common due to widget changes) in the same
toplevel to just one call.
2009-06-11 21:49:17 +02:00
Alexander Larsson
904f0ccb7c Base pointer grab on get-offscreen-parent 2009-06-08 19:39:14 +02:00
Alexander Larsson
e1b52da0ab Add signals for offscreen window embedding
3 signals are for offscreen windows
get-offscreen-parent: Get the parent window an offscreen is embedded in
to-parent: Convert coordinates from offscreen to parent
from-parent: Convert coordinates from parent to offscreen

1 signal is for the window embedding offscreens:
pick-offscreen-child: This picks what (if any) offscreen is at a specific position

The last signal is only used if you call gdk_window_set_has_offscreen_children
to tell gdk that the window has embedded offscreen children.
Add get-pointer signal for offscreen window pointer getting

Apps using offscreen windows can connect to get-pointer on offscreen
windows in order to make gdk_window_get_pointer() return correct
values.

Add get-offscreen-parent signal

Add signals for from-parent and to-parent coordinate mapping

Add pick-offscreen-child signal
2009-06-08 19:39:06 +02:00
Alexander Larsson
4720bbc15e Make window_get_pointer a window impl virtual 2009-06-05 15:18:36 +02:00
Alexander Larsson
247e1945a0 window_get_pointer should return the direct child
We returned the innermost child that has the pointer, which is not right.
Only the direct child that has the pointer in it should be reported (if any).
2009-06-05 15:18:36 +02:00
Alexander Larsson
e123931a65 Add more GdkWindow implementation docs 2009-06-01 13:38:04 +02:00
Alexander Larsson
7372379c24 Initial version of input support 2009-05-29 16:39:12 +02:00
Alexander Larsson
44c7264bc7 Add _gdk_gc_get_exposures 2009-05-27 17:06:46 +02:00
Alexander Larsson
8cb385cd31 Add support for visibility notification 2009-05-26 20:53:48 +02:00
Alexander Larsson
532818909c Move the new parts of GdkWindowObject to a private header
Unfortunately the old GdkWindowObject is public and accessed
from macros, etc. So, we publish a limited copy of GdkWindowObject
and use the full one internally when building gdk.
2009-04-02 10:16:30 +02:00
Cody Russell
a93c6cd6e1 CSW Win32 work in progress - builds but does not work yet. 2009-04-02 10:16:29 +02:00
Alexander Larsson
5be3f38535 Move implicit grab tracking totally to common code 2009-04-02 10:15:30 +02:00
Alexander Larsson
26cbf87d7d New approach for grab tracking code
We try to track the exact grab state, i.e. whats valid on the client
now and whats comming soon via the xserver roundtrip (and when).
2009-04-02 10:15:30 +02:00
Alexander Larsson
8de6ae26e4 Remove_gdk_pixmap_set_as_backing etc, as this is not used anymore
We don't copy from a window to a pixmap anymore, so all the code
for this can be removed.
2009-04-02 10:15:28 +02:00
Richard Hult
1a47356485 Remove invalidate_maybe_recurse and process_updates from the paintable interface
Replace them with two new functions
_gdk_windowing_{before,after}_process_all_updates() that are called
around the guts of gdk_window_process_all_updates(). Add empty ones
for X11 (nothing more needed), quartz ones will be implemented next.
2009-04-02 10:15:27 +02:00
Richard Hult
1ee03b35d0 Expose _gdk_window_process_updates_recurse for backends
We use this in the added windowing function
_gdk_windowing_window_process_updates_recurse. The X11 implementation
just calls _gdk_window_process_updates_recurse directly, but at least
quartz will need to do some more work.
2009-04-02 10:15:27 +02:00
Richard Hult
72d4403eed Add a window argument to begin_paint_region in the paintable interface
The paintable itself is now the impl window, which can be different
from the window.
2009-04-02 10:15:27 +02:00
Alexander Larsson
e24c9e291d Switch motion hint emulation to be serial based.
For backends not supporting serials, just have
_gdk_windowing_window_get_next_serial return zero.
2009-04-02 10:15:26 +02:00
Alexander Larsson
cf54a2c68e Ungrab keyboard if virtual window is hidden or destroyed 2009-04-02 10:15:26 +02:00
Alexander Larsson
290de401a5 Move keyboard grab state tracking code to common code 2009-04-02 10:15:26 +02:00
Alexander Larsson
1ad01acbf2 Add _gdk_drawable_get_subwindow_scratch_gc as a way to get cached gcs with GDK_INCLUDE_INFERIORS 2009-04-02 10:15:18 +02:00
Alexander Larsson
d7e369c27a Implement input shapes 2009-04-02 10:15:16 +02:00
Alexander Larsson
4ba2b181bf Implement shaped windows 2009-04-02 10:15:16 +02:00
Alexander Larsson
062da50b9f Add _gdk_windowing_window_get_shape 2009-04-02 10:15:16 +02:00
Alexander Larsson
0d540e935b Create _gdk_drawable_create_cairo_surface to ugly typechecking 2009-04-02 10:15:15 +02:00
Alexander Larsson
0ba99e6e7b Make gdk_windowing_window_destroy a GdkWindowImpl method 2009-04-02 10:15:15 +02:00
Alexander Larsson
36ce54878b Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call 2009-04-02 10:15:15 +02:00
Alexander Larsson
7b2b9a0219 Implement cursors 2009-04-02 10:15:15 +02:00
Alexander Larsson
f2b50ff638 Fix crossing event order and some details 2009-04-02 10:15:15 +02:00
Alexander Larsson
b771c9924d New approach to motion event handling 2009-04-02 10:15:11 +02:00
Alexander Larsson
1f5e104495 Add _gdk_pixmap_set_as_backing which is a way to get GraphicsExposures on pixmaps reported to the window they are backing store for 2009-04-02 10:14:08 +02:00