Alexander Larsson
b298ebc415
Fix resize of native children
...
We now set the size to the right value before calling move_resize, so
the check for if the move_resize is just a move broke. Always call
move_resize()
2009-04-02 10:15:20 +02:00
Alexander Larsson
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
Alexander Larsson
5fa1855a83
Make _gdk_x11_window_tmp_unset_parent_bg not change above the toplevel window
2009-04-02 10:15:20 +02:00
Alexander Larsson
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
Alexander Larsson
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
Alexander Larsson
6b15e248fa
move_region_on_impl - shortcut if region is empty
2009-04-02 10:15:20 +02:00
Alexander Larsson
ed9cd90b72
Fix various problem with temporarily unsetting background
...
All the calls that unset private->parent failed if that was
not a native window (impl), instead we need to find the impl window
for the parent. Add some helper functions for this and use them.
For move/resize of child windows, we really need to recursively unset
on the parent, because moving the window could expose other native
children of the parent.
In do_shape_combine_region, only unset background if we're changing
the bounding shape (i.e. not the input shape)
2009-04-02 10:15:20 +02:00
Alexander Larsson
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
Alexander Larsson
c31ef39d76
Don't flicker when unsetting shape (using bg none)
2009-04-02 10:15:20 +02:00
Alexander Larsson
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
Alexander Larsson
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
Alexander Larsson
cdb405dfcf
Restack native window after reparent put it on top
2009-04-02 10:15:19 +02:00
Alexander Larsson
c1884ce403
Fix up native window handling in gdk_window_lower too
2009-04-02 10:15:19 +02:00
Alexander Larsson
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
Alexander Larsson
377ca19c9f
Add restack_under method to GdkWindomImpl
2009-04-02 10:15:19 +02:00
Alexander Larsson
cce1ff8eb8
Move all backend specific raise/lower code into _internal helpers
2009-04-02 10:15:19 +02:00
Alexander Larsson
e918b64088
Make sure we handle clipping in gdk_window_draw_pixbuf if gc == NULL
2009-04-02 10:15:19 +02:00
Alexander Larsson
78bbac87ed
Send expose events to exposed area when changing the window shape
2009-04-02 10:15:19 +02:00
Alexander Larsson
82b181e643
Force native windows for all windows used with input events
2009-04-02 10:15:18 +02:00
Alexander Larsson
283160c712
Make xfree gdkinput code compile
2009-04-02 10:15:18 +02:00
Alexander Larsson
d6ecaca166
Handle GDK_WA_CURSOR in non-native window creation
2009-04-02 10:15:18 +02:00
Alexander Larsson
764ceead66
Include inferiors when moving window parts
2009-04-02 10:15:18 +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
4d187531e4
Set bg none while changing so we don't draw the bg color
2009-04-02 10:15:18 +02:00
Alexander Larsson
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
Alexander Larsson
e63de13f40
Correct type checks on gdk_window_set_group entry.
2009-04-02 10:15:18 +02:00
Alexander Larsson
40827b99db
When creating native window, set the native background
2009-04-02 10:15:18 +02:00
Alexander Larsson
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
Alexander Larsson
26569bd54f
Avoid flickering by using more temp unset bg
2009-04-02 10:15:17 +02:00
Alexander Larsson
c8bdac7508
Recompute abs_x/y before reparenting windows due to new native window parent
2009-04-02 10:15:17 +02:00
Alexander Larsson
acf1954f12
Don't destroy NULL region
2009-04-02 10:15:17 +02:00
Alexander Larsson
4202cc0c60
Fix gdk_window_get_root_origin and gdk_window_get_frame_extents when called on non-toplevels
2009-04-02 10:15:17 +02:00
Alexander Larsson
ed5564ee3a
Ensure we show native window when creating them for already visible windows
2009-04-02 10:15:17 +02:00
Alexander Larsson
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
Alexander Larsson
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
Alexander Larsson
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
Alexander Larsson
76e23f00da
Update abs_x/y before moving native children
2009-04-02 10:15:17 +02:00
Alexander Larsson
4442463481
Move all native children (recursively) in gdk_window_scroll
2009-04-02 10:15:16 +02:00
Alexander Larsson
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
Alexander Larsson
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
Alexander Larsson
890503099f
Handle mask == NULL in shape_combine_mask
2009-04-02 10:15:16 +02:00
Alexander Larsson
d7e369c27a
Implement input shapes
2009-04-02 10:15:16 +02:00
Alexander Larsson
e14e05addc
Remove shape_combine_mask from backend. Make X11 backend use XShapeCombineMask directly to unset region
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
f22211c881
Remove unnecessary clear_area method in GdkWindowImpl
2009-04-02 10:15:15 +02:00
Alexander Larsson
d093be43e7
For implicit grabs, we grab the *event* window, not the pointer window
2009-04-02 10:15:15 +02:00
Alexander Larsson
83ee69740e
Handle cursors right with grabs
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
afc81c9e64
gdk_window_draw_points() - make sure we use the offset points
2009-04-02 10:14:08 +02:00
Alexander Larsson
d74d94ce69
Implement flicker free handling of window moves/resizes
2009-04-02 10:14:08 +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
Alexander Larsson
5587130d48
Don't access event after freeing it
2009-04-02 10:14:08 +02:00
Alexander Larsson
1babb5400b
Share the code to copy impl window regions w/ update_area
2009-04-02 10:14:08 +02:00
Alexander Larsson
dc0e339697
Don't actually clear background when mapped, as that causes ugly flashed. Just queue a repaint.
...
This is what the X backend does too.
2009-04-02 10:14:08 +02:00
Alexander Larsson
ee4211b9a8
Move flushing code to non-implicit-paint only call.
...
This is in preparation for other types of buffering
2009-04-02 10:14:08 +02:00
Alexander Larsson
62a52f8fd3
Don't include composited childen in window clip region, update region when setting composited
2009-04-02 10:14:08 +02:00
Alexander Larsson
191e8d1587
Ensure native window if composite requested
2009-04-02 10:14:08 +02:00
Alexander Larsson
a9ca08f6eb
Don't draw on input_only windows
2009-04-02 10:14:07 +02:00
Alexander Larsson
bb709321f0
Store colormap on impl window (necessary for e.g. foreign windows)
2009-04-02 10:14:07 +02:00
Alexander Larsson
2fa6f32d8e
When reparenting, remove from old parent before setting the new parent
...
(otherwise we remove from the wrong parent)
2009-04-02 10:14:07 +02:00
Alexander Larsson
7536708c4b
Don't sent native MotionHint masks on pointer grabs as then we won't get enought motion events reported.
2009-04-02 10:14:07 +02:00
Alexander Larsson
533d3058b8
Fix some return value warnings
2009-04-02 10:14:07 +02:00
Alexander Larsson
ede9c2cf74
Handle gdk_window_get_impl_window on root window
2009-04-02 10:14:07 +02:00
Alexander Larsson
077eab6edf
Clear to end of window if passing zero width or height to gdk_window_clear_area (fixes clist/ctree clearing)
2009-04-02 10:14:07 +02:00
Alexander Larsson
ec5d176278
Move gdk_window_get_deskrelative_origin to the GdkWindowImpl and make the common code handle abs_x/y
2009-04-02 10:14:07 +02:00
Alexander Larsson
891440d288
The double get_composite_drawable case can happen for pixmap targets too, so move the code to gdk_draw_drawable
2009-04-02 10:14:07 +02:00
Alexander Larsson
b6e84d3105
Fix draw_drawable being offset when using window as source (testgtk text test)
2009-04-02 10:14:07 +02:00
Alexander Larsson
ac637d9d15
gdk_bitmap_create_from_data - drawable may be NULL
2009-04-02 10:14:06 +02:00
Alexander Larsson
be863a9056
gdk_pixmap_new - drawable may be NULL
2009-04-02 10:14:06 +02:00
Alexander Larsson
51d4efd8d2
gdk_pixmap_draw_pixbuf - gc may be NULL
2009-04-02 10:14:06 +02:00
Alexander Larsson
c7554a2c76
Don't convert foreign windows to child when reparented to non-toplevel
2009-04-02 10:14:06 +02:00
Alexander Larsson
b647c6e5fd
Track clip_mask in GdkGC. Fix gdk_gc_add_drawable_clip to handle clip masks
2009-04-02 10:14:06 +02:00
Alexander Larsson
864649157d
Move _gdk_gc_remove_drawable_clip from after each time its set to before each pixmap set and when adding a new different region
...
This means we can avoid changing the clip if we're drawing with the same gc to the same clip region
2009-04-02 10:14:06 +02:00
Alexander Larsson
e9ee842db1
Move drawable clip tracking into GdkGC
2009-04-02 10:14:06 +02:00
Alexander Larsson
5ff017e64e
Move clip offsetting into _gdk_gc_intersect_clip_region
2009-04-02 10:14:06 +02:00
Alexander Larsson
6a82287005
Fix coordinates reported from gdk_window_get_pointer (had sign reversed)
2009-04-02 10:14:06 +02:00
Alexander Larsson
47acf79494
Actually report x/y_root against the root window
2009-04-02 10:14:06 +02:00
Alexander Larsson
2e3661e453
Avoid crash by not passing in NULL mask pointer to _gdk_windowing_get_pointer
2009-04-02 10:14:05 +02:00
Alexander Larsson
3a6d68e836
Add g_warning to not yet supported code
2009-04-02 10:14:05 +02:00
Alexander Larsson
aee3c571b0
Ensure we have native window before reparenting to toplevel
2009-04-02 10:14:05 +02:00
Alexander Larsson
2b9dc3338a
Fix up keyboard grab handling
2009-04-02 10:14:05 +02:00
Alexander Larsson
d47ee4d797
Grab pointer on toplevel window, not on nearest native, so that we always get all events on toplevel
2009-04-02 10:14:05 +02:00
Alexander Larsson
f39bdc7e0f
Make sure we change the event mask on native window if they change between toplevel and child
2009-04-02 10:14:05 +02:00
Alexander Larsson
07f76be87a
Change assert to warning with some information
2009-04-02 10:14:05 +02:00
Alexander Larsson
6b1d7fd53d
Make synchronized_configure work for child windows (used by in-process plugs) and ensures a native window exist
2009-04-02 10:14:05 +02:00
Alexander Larsson
346acdca54
Never set shapes on foreign windows
2009-04-02 10:14:05 +02:00
Alexander Larsson
ec4f8baa08
For foreign parents, use the real parent not the root (which is what we list as parent in the APIs)
2009-04-02 10:14:05 +02:00
Alexander Larsson
d326a638fb
Really create a native window when getting xid
2009-04-02 10:14:04 +02:00
Alexander Larsson
32cd341f60
Export gdk_window_set_has_native
2009-04-02 10:14:04 +02:00
Alexander Larsson
8fc7a9547c
Create native window when requesting xid
2009-04-02 10:14:04 +02:00
Alexander Larsson
eabac453e6
Initial client-side-windows work
...
The history before this was kind of twisted as several different
approaches were tested, so that was all squashed into this initial
commit to hide the uninteresting changes and files that were later
removed.
2009-04-02 10:14:01 +02:00
Alexander Larsson
e2a2ba9d98
Revert patch that conflicts with client-side-windows work
...
Revert commit f4090b5c84
, as that
conflicts with the client-side-windows work. Furthermore, that
change is already applied as part of the client-side-windows work.
2009-04-02 10:06:01 +02:00
Behdad Esfahbod
d21f55fe9a
Bug 437533 – Implement draw_shape PangoRenderer method
...
2009-03-27 Behdad Esfahbod <behdad@gnome.org>
Bug 437533 – Implement draw_shape PangoRenderer method
* gdk/gdkpango.c (gdk_pango_renderer_draw_shape),
(gdk_pango_renderer_class_init): Implement draw_shape
* demos/gtk-demo/rotated_text.c (fancy_shape_renderer),
(create_fancy_attr_list_for_layout), (rotated_text_expose_event),
(do_rotated_text):
1) Port to pangocairo
2) Also show a rotated label
3) Install a custom shape renderer on both. The second one goes
through gdkpango and hence tests the patch above. It's working.
svn path=/trunk/; revision=22592
2009-03-27 16:54:10 +00:00
Sven Neumann
7cfac711e2
compile fix for build with DIRECT_ENABLE_DEBUG.
...
2009-03-25 Sven Neumann <sven@gimp.org>
* gdk/directfb/gdkwindow-directfb.c
(gdk_window_directfb_process_all_updates): compile fix for build
with DIRECT_ENABLE_DEBUG.
svn path=/trunk/; revision=22583
2009-03-25 00:07:12 +00:00