Richard Hult
08bc1864cc
Attempt to implement draw_drawable with src = dest = window
2009-04-02 10:15:25 +02:00
Richard Hult
2ea8ea2f0d
Remove unused function _gdk_quartz_window_scroll
2009-04-02 10:15:24 +02:00
Richard Hult
80c8976c28
Fix typos that broke loading without lazy symbol lookup
2009-04-02 10:15:24 +02:00
Richard Hult
7ab3435a58
Remove autoreleasepool in drawRect, not necessary
2009-04-02 10:15:24 +02:00
Richard Hult
f12a992be2
Only setup tracking rect for toplevels, we only want enter/leave for those
2009-04-02 10:15:24 +02:00
Richard Hult
348abef6f2
Don't use drawable_get,release_context in _gdk_windowing_create_cairo_surface
...
This fixes a mismatch in save/release gstate for the CGContext. If
this function is ever used for pixmaps, we need to add support for
that, probably will have to do so soon.
2009-04-02 10:15:24 +02:00
Richard Hult
edb35763a2
Get rid of all the synthesized crossing events except for ANCESTOR one on the toplevel
2009-04-02 10:15:24 +02:00
Richard Hult
330e790fb2
Rename _gdk_quartz_events_send_map_events to ..._event
2009-04-02 10:15:24 +02:00
Richard Hult
32555badb5
Clean up some whitespace
2009-04-02 10:15:24 +02:00
Richard Hult
54e6878001
Add fill_crossing_event to be used soon
2009-04-02 10:15:24 +02:00
Richard Hult
c3637ab20f
Only send map events for toplevels
2009-04-02 10:15:24 +02:00
Richard Hult
8e8aa53298
Add enter/leave notify to get_event_mask_from_ns_event now that those are handled like other events
2009-04-02 10:15:24 +02:00
Richard Hult
da8666d745
Clean up the scroll support a little
2009-04-02 10:15:24 +02:00
Richard Hult
25b311bac3
Make the various fill_*_event functions consistent
2009-04-02 10:15:24 +02:00
Richard Hult
4c01ca7ddd
Rework the event translation to look more like X11
...
Put the event in the queue with a pending flag, remove again if not
handled.
2009-04-02 10:15:24 +02:00
Richard Hult
036e045d53
Update the window size after getting windowDidResize
2009-04-02 10:15:23 +02:00
Richard Hult
e7eb75c0ca
Remove the old workarond for broken tracking rects
...
The one that puts windows outside the screen and moves them in when
showing. It might not be needed anymore and the workaround doesn't
work with the client-side window branch anyway because the window is
already mapped when we get showed for some reason.
2009-04-02 10:15:23 +02:00
Richard Hult
257dea55a7
Handle NULL event mask in _gdk_windowing_window_at_pointer
2009-04-02 10:15:23 +02:00
Richard Hult
19b1f6a93a
Fix bug from first patch round, get private from window, not from impl
2009-04-02 10:15:23 +02:00
Richard Hult
e9d3f22ac8
Offset subviews with the parent's abs coordinate
2009-04-02 10:15:23 +02:00
Richard Hult
546a1e4cd6
Change window check to quartz window check in gdkinput
2009-04-02 10:15:23 +02:00
Richard Hult
5eacab593b
Setup iface for queue_translation/antiexpose
2009-04-02 10:15:23 +02:00
Richard Hult
0e1f51ecd1
Add quartz window check macro
2009-04-02 10:15:23 +02:00
Richard Hult
a362be9979
Add stubs for queue_translation/antiexpose
2009-04-02 10:15:23 +02:00
Richard Hult
cb8a3386c7
Implement _gdk_windowing_create_cairo_surface
2009-04-02 10:15:23 +02:00
Richard Hult
f080825430
Remove gdk_display_pointer_is_grabbed and gdk_pointer_grab_info_libgtk_only
2009-04-02 10:15:23 +02:00
Richard Hult
47ed2c553d
Remove gdk_window_set_child_input_shapes
2009-04-02 10:15:23 +02:00
Richard Hult
cede19dc65
Update more toplevel checks and update set_background and back_pixmap
2009-04-02 10:15:23 +02:00
Richard Hult
68640f9e99
Add mask argument to _gdk_windowing_window_at_pointer, and update more checks
2009-04-02 10:15:22 +02:00
Richard Hult
068b6f88e0
Update gdk_window_get_deskrelative_origin, gdk_window_get_root_origin, gdk_window_get_frame_extents
2009-04-02 10:15:22 +02:00
Richard Hult
3f7e3a22f5
Update gdk_window_quartz_set_background and gdk_window_quartz_set_back_pixmap
2009-04-02 10:15:22 +02:00
Richard Hult
4cf7fe5832
Add more toplevel window checks
2009-04-02 10:15:22 +02:00
Richard Hult
93d1d51e3b
Update set_urgency_hint/geometry_hints/modal_hint/set_skip_taskbar_hint/set_skip_pager_hint
2009-04-02 10:15:22 +02:00
Richard Hult
27a80094bc
Update gdk_window_set_type_hint and gdk_window_get_type_hint
2009-04-02 10:15:22 +02:00
Richard Hult
ff86156762
Update gdk_window_focus
2009-04-02 10:15:22 +02:00
Richard Hult
1e5a22dabe
Remove gdk_window_quartz_clear_area
2009-04-02 10:15:22 +02:00
Richard Hult
f5806eac0c
Update gdk_window_quartz_reparent
2009-04-02 10:15:22 +02:00
Richard Hult
2517076f76
Update gtk_window_quartz_hide
2009-04-02 10:15:22 +02:00
Richard Hult
afdb3f2ee8
Update signature for gdk_window_quartz_show and adapt the implementation
2009-04-02 10:15:22 +02:00
Richard Hult
650223ca3b
Rename _gdk_windowing_window_destroy to _gdk_quartz_window_destroy and add to the impl iface
2009-04-02 10:15:22 +02:00
Richard Hult
b20991af9b
Update _gdk_window_impl_new and add private variables where we changed impl to private
2009-04-02 10:15:22 +02:00
Richard Hult
b1b358c820
Remove width/height from GdkWindowImplQuartz and use those in GdkWindowObject
2009-04-02 10:15:22 +02:00
Richard Hult
774cebae69
Remove get_size and get_visible region
2009-04-02 10:15:21 +02:00
Richard Hult
1ee805f7be
Don't init size in gdk_window_impl_quartz_init
2009-04-02 10:15:21 +02:00
Richard Hult
57214245da
Include check for offscreen windows in WINDOW_IS_TOPLEVEL
2009-04-02 10:15:21 +02:00
Richard Hult
ff9822a833
Add reset_origin argument to _gdk_windowing_gc_set_clip_region
2009-04-02 10:15:21 +02:00
Alexander Larsson
4ec5b7648b
Fix typo in pixmap window backing
...
It should be backing_y_offset, not backing_x_offset for exposure_y_offset.
2009-04-02 10:15:21 +02:00
Alexander Larsson
d82cee80c3
Don't send expose events if region is empty
2009-04-02 10:15:21 +02:00
Alexander Larsson
8a0ef57ba3
Don't expose a temporary grab during a scrollwheel button press/release cycle.
...
If we do this there is a short window where we think there is a grab, and
if we generate a client side pointer motion event in this time (e.g. from
a window move) we could be delivering that according to the grab. But in
the Xserver that grab is infinitely short as it sends Press and then
Release immediately.
To see a problem from this, try using the scrollwheel to quickly scroll
in the testgtk list of buttons.
2009-04-02 10:15:21 +02:00
Alexander Larsson
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
Alexander Larsson
50d9a9018a
Ifdef out x11 specific code
2009-04-02 10:15:21 +02:00
Alexander Larsson
e718893611
Fix performance issue with find_native_sibling_above
...
It keep recursing a lot, unnecessary
2009-04-02 10:15:20 +02:00
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