Commit Graph

18004 Commits

Author SHA1 Message Date
Alexander Larsson
b272456023 Remove unused label 2009-04-02 10:15:28 +02:00
Alexander Larsson
a006d85928 Avoid warnings about non-handled GDK_EVENT_LAST enum 2009-04-02 10:15:28 +02:00
Alexander Larsson
a711f51629 Fix setting of private->shaped when setting input shape
I.e. it should only be set/unset when setting ShapeBounding.
2009-04-02 10:15:28 +02:00
Alexander Larsson
fe6f46c589 Don't look for EXPOSE mask set to disable bg none setting
We always set EXPOSE in the client-side-windows world, so this
doesn't make sense anymore.
2009-04-02 10:15:28 +02:00
Alexander Larsson
cc32207534 Fix typos in X11 details of new OSX APIs 2009-04-02 10:15:27 +02:00
Alexander Larsson
5ca1865f5d Don't ignore native CROSSING_GRAB/UNGRAB events
These are sent when someone else grabs the pointer, and we don't
want to miss these expose events. For instance, we missed enter
and leave events on alt-tab.

There were some issues with these wrt out-of-sync grab information
in the client, but that should now be handled. So, it should work
or at least be fixable if we find some bug.
2009-04-02 10:15:27 +02:00
Alexander Larsson
016c5fd081 Track pointer grabs on Xserver time
After a successful grab/ungrab we wait for an xserver
roundtrip until we change the tracked grab in GdkDisplay.
This way that data is always up-to-date wrt events comming in.
2009-04-02 10:15:27 +02:00
Alexander Larsson
d2c1c0a8db Add _gdk_x11_roundtrip_async 2009-04-02 10:15:27 +02:00
Richard Hult
24aa1620bf Update for changes in the paintable interface
Get rid of invalidate_maybe_recurse and process_updates. Implement
_gdk_windowing_{before,after}_process_all_updates(), and keep track of
when we're inside process_all_updates in the common code so we know
when to flush windows. Implement
_gdk_windowing_window_process_updates_recurse by means of
setNeedsDisplayInRect: displayIfNeeded. Use the added window argument
in begin_paint_region to get the right window (the paintable is always
the impl window now).
2009-04-02 10:15:27 +02:00
Richard Hult
65b5644cda Call _gdk_window_process_updates_recurse() in drawRect instead of creating our own expose events 2009-04-02 10:15:27 +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
Richard Hult
95cbc754d4 Setup ->impl_window on the root window 2009-04-02 10:15:27 +02:00
Richard Hult
9e0899bd2f Add gdk_windowing_window_get_next_serial 2009-04-02 10:15:27 +02:00
Richard Hult
19951c064e Remove gdk_keyboard_grab_info_libgtk_only which moved to the common code 2009-04-02 10:15:26 +02:00
Richard Hult
defc779df5 Add serial argument to _gdk_windowing_got_event 2009-04-02 10:15:26 +02:00
Alexander Larsson
32a070d09a Fix gdk_window_has_no_impl typo 2009-04-02 10:15:26 +02:00
Alexander Larsson
ca1aeff814 Only set cursors on toplevel.
This fixes a problem where we used to set them on a native window, but we
never unset it becase when the pointer moved to another native window
we just set the cursor on that window. Always setting on the toplevel
fixes this.
2009-04-02 10:15:26 +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
19cd4d6af8 Revert "Convert all pending X events in _gdk_events_queue"
This reverts commit 7cc15ec6ea1504133dfe6febbdb12615550bb966.

Its risky to convert all the events in a go like this, as it
increases the out-of-order issues. It also isn't a full solution
to the motion hint issue as it will only work for the events
we happen to convert. It would be better to use serials to
handle motion hinting.
2009-04-02 10:15:26 +02:00
Alexander Larsson
6a0d317866 Keep track of the impl windows wrapper directly with a ref
This is needed so that the ->wrapper of the impl window doesn't
go away while there are virtual windows referencing the impl
window.
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
e60af9d315 Move keyboard grab info to common code
This is the first stage in tracking keyboard grabs in the common code.
This lets us handle destroying or unmapping virtual window with a
keyboard grab.
2009-04-02 10:15:26 +02:00
Alexander Larsson
c0ad534d81 Convert all pending X events in _gdk_events_queue
If we only convert the first then motion hint emulation won't
work since we don't see the next motion even until we've
fully handled this one.

However, this changes a behaviour that has been like this since
the mists of time. I don't know if it could cause other issues.
I haven't seen any yet though.
2009-04-02 10:15:25 +02:00
Alexander Larsson
cb05af0a61 Implement GDK_POINTER_MOTION_HINT_MASK support 2009-04-02 10:15:25 +02:00
Alexander Larsson
d267452bb7 New flicker flicker fixing approach
There was a performance problem with the old flicker fixing
approach. For moved windows we copied the window data to the double
buffer pixmap and then back to the window with the rest of the
expose data. In some cases the copy from window data to pixmap was
very slow because the pixmap was allocated in system memory and
the window in video memory.

The new approach is to delay all window moves and then replay them
after the expose has drawn to the double buffer pixmap but before
drawing it to the window. Furthermore, we remove all exposed areas
from the destination of the delayed moves so we won't copy something
just to then immediately draw over it.

This makes scrolling in firefox fast, and it makes tests/flicker not
show any (detectable) flicker.
2009-04-02 10:15:25 +02:00
Alexander Larsson
3155fdcd41 gdk_window_process_updates_internal only needs to flush outstanding moves 2009-04-02 10:15:25 +02:00
Alexander Larsson
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
Alexander Larsson
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
Alexander Larsson
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
Alexander Larsson
7da48afcaa Don't allow native window > 65535 pixels 2009-04-02 10:15:25 +02:00
Richard Hult
89f1cb5178 First cut at getting events working 2009-04-02 10:15:25 +02:00
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