Commit Graph

602 Commits

Author SHA1 Message Date
3155fdcd41 gdk_window_process_updates_internal only needs to flush outstanding moves 2009-04-02 10:15:25 +02:00
4455db353f Split out the flushing of outstanding moves
Some places need to only flush the outstanding moves, split
this into gdk_window_flush_outstanding_move
2009-04-02 10:15:25 +02:00
a9fd3ae249 Flush any outstanding stuff in the window in non-buffered get_internal_paint_info case
We return the raw window drawable, so its likely the app will do some
weird stuff to it, like draw using non-gdk operations. We don't want
the app to see any half-drawn state, so flush everything.

This fixes a scroll issue in firefox at least.
2009-04-02 10:15:25 +02:00
815f0d7605 Clip exposed area to the visible region.
This avoids extra work, and it means we won't allocate large pixmaps
for double buffering.
2009-04-02 10:15:25 +02:00
d82cee80c3 Don't send expose events if region is empty 2009-04-02 10:15:21 +02:00
7cebc68bde Handle native children correctly in gdk_window_scroll
This is basically the same fix as was done for
gdk_window_move_resize_internal. We make sure not to move the native
child window contents twice and we don't copy data that was overwritten
by the moving of the native child windows.
2009-04-02 10:15:21 +02:00
50d9a9018a Ifdef out x11 specific code 2009-04-02 10:15:21 +02:00
e718893611 Fix performance issue with find_native_sibling_above
It keep recursing a lot, unnecessary
2009-04-02 10:15:20 +02:00
1084b8e6a1 Call backend move_resize with the right coords/size
We calculated and set the new position and size, just pass that.
This avoids parsing the "special values" again
2009-04-02 10:15:20 +02:00
905d328933 Make moving subwindows correctly handle native windows
Whenever a native window is moved this causes an immediate change in
the window (the window content is copied). This change conflicts can
conflict with outstanding moves or other cached changed, so we need
to flush all outstanding moves in the related windows.

To simplify the code for window move/resize the toplevel version was
split out to its own function.

Move native windows after recomputing so that we get the right new
shape before moving (and the implied copy). This means we're not
copying too much data.

Take into account the area of a moved window that contains native
subwindows, as these affect things in two ways:

First of all we shouldn't copy the original window location, as that
is copied by the native window move.

Secondly, we can't copy things  that would end up copying from the
native window move destination, as the data that used to be there is
now destroyed by the native window move.
2009-04-02 10:15:20 +02:00
df4f4c14c7 do_move_region_bits_on_impl needs to copy from overlapping native windows too
It can happen that another native window is re-shaped over the region to
be moved, this will not destroy the data (since we're unsetting the background
when we reshape), but it will mean we need to read from this window.

We already used INCLUDE_INFERIORS, but that only handle subwindows. We fix
this by doing the copy on the toplevel, offsetting the copy to compensate for
this.
2009-04-02 10:15:20 +02:00
6b15e248fa move_region_on_impl - shortcut if region is empty 2009-04-02 10:15:20 +02:00
3c5c7f4b4d Avoid extending implicit paint size due to empty regions not working well with gdk_rectangle_union on clipbox 2009-04-02 10:15:20 +02:00
ef3d1893b6 Always set the shape when creating a native window.
This is not always done by recompute_visible_regions, as
the clip region doesn't change.
2009-04-02 10:15:19 +02:00
c967cabc35 Avoid lots of unnecessary computation when moving toplevel windows
There is no need to do all these computations when moving toplevels
as that can't really change any visible regions. Nor will it cause
any exposes we need to handle.
2009-04-02 10:15:19 +02:00
cdb405dfcf Restack native window after reparent put it on top 2009-04-02 10:15:19 +02:00
c1884ce403 Fix up native window handling in gdk_window_lower too 2009-04-02 10:15:19 +02:00
28c4518cca Fix up gdk_window_raise and native window creation to not move native window above windows outside the non-native parent 2009-04-02 10:15:19 +02:00
cce1ff8eb8 Move all backend specific raise/lower code into _internal helpers 2009-04-02 10:15:19 +02:00
e918b64088 Make sure we handle clipping in gdk_window_draw_pixbuf if gc == NULL 2009-04-02 10:15:19 +02:00
78bbac87ed Send expose events to exposed area when changing the window shape 2009-04-02 10:15:19 +02:00
d6ecaca166 Handle GDK_WA_CURSOR in non-native window creation 2009-04-02 10:15:18 +02:00
764ceead66 Include inferiors when moving window parts 2009-04-02 10:15:18 +02:00
5378324a18 Ref imp even in non-native windows and don't NULL out in destroy so that get_screen works after destroy. 2009-04-02 10:15:18 +02:00
40827b99db When creating native window, set the native background 2009-04-02 10:15:18 +02:00
959d940812 Need to split up impl changing and reparenting so we can recompute abs_x/y inbetween 2009-04-02 10:15:17 +02:00
c8bdac7508 Recompute abs_x/y before reparenting windows due to new native window parent 2009-04-02 10:15:17 +02:00
acf1954f12 Don't destroy NULL region 2009-04-02 10:15:17 +02:00
ed5564ee3a Ensure we show native window when creating them for already visible windows 2009-04-02 10:15:17 +02:00
d73859fe16 Move native window showing/hiding out of is_impl, we may need to do this for emulated windows too 2009-04-02 10:15:17 +02:00
9f2c97dd80 Ensure that we always invalidate newly exposed areas, as X may not (due to temp bg none) 2009-04-02 10:15:17 +02:00
4a0cb4a240 Various fixes for native windows:
move_region_on_impl() - doesn't need to copy anything if dx/dy == 0
Ensure that we queue an update when invalidating an empty area but we have outstanding moves
Temporarily unset background when moving native child windows
2009-04-02 10:15:17 +02:00
76e23f00da Update abs_x/y before moving native children 2009-04-02 10:15:17 +02:00
4442463481 Move all native children (recursively) in gdk_window_scroll 2009-04-02 10:15:16 +02:00
f6e1b0ac17 Ensure that we're properly hiding impl window if one of its parent non-impl windows are hidden
Also, add some debug printing code to list the GdkWindow tree
2009-04-02 10:15:16 +02:00
a38e797941 Don't remove composited childrens area when processing updates
Handle shape when processing updates
Make sure we reset the old clips before setting new cairo clips
2009-04-02 10:15:16 +02:00
890503099f Handle mask == NULL in shape_combine_mask 2009-04-02 10:15:16 +02:00
d7e369c27a Implement input shapes 2009-04-02 10:15:16 +02:00
4ba2b181bf Implement shaped windows 2009-04-02 10:15:16 +02:00
062da50b9f Add _gdk_windowing_window_get_shape 2009-04-02 10:15:16 +02:00
0d540e935b Create _gdk_drawable_create_cairo_surface to ugly typechecking 2009-04-02 10:15:15 +02:00
0ba99e6e7b Make gdk_windowing_window_destroy a GdkWindowImpl method 2009-04-02 10:15:15 +02:00
36ce54878b Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call 2009-04-02 10:15:15 +02:00
f22211c881 Remove unnecessary clear_area method in GdkWindowImpl 2009-04-02 10:15:15 +02:00
d093be43e7 For implicit grabs, we grab the *event* window, not the pointer window 2009-04-02 10:15:15 +02:00
83ee69740e Handle cursors right with grabs 2009-04-02 10:15:15 +02:00
7b2b9a0219 Implement cursors 2009-04-02 10:15:15 +02:00
f2b50ff638 Fix crossing event order and some details 2009-04-02 10:15:15 +02:00
b771c9924d New approach to motion event handling 2009-04-02 10:15:11 +02:00
afc81c9e64 gdk_window_draw_points() - make sure we use the offset points 2009-04-02 10:14:08 +02:00