gdk_window_get_geometry calls the native function for all non-native
windows. This returns coords relative to the native parent. We need
to convert this to be relative to the client side parent.
This fixes DnD coordinates in firefox (bug 588437).
If antiexposures are queued and then we do the outstanding moves
we will queue translations that will affect incomming exposes
wrongly wrt the antiexposure. So, make sure we process the outstanding
moves before doing the antiexposure.
Additionally this commit adds a bunch of comments about how the
expose handling works and fixes a small bug that made us always
flush outstanding moves a little to early than necessary.
Apps may change the window hierarchy while recursing over it by
destroying windows from the expose event handler. We need to copy
the children list and ref all the children while recursing.
This fixes some crashers in gedit (bug #589367, bug #591434)
The X11 queue_translation operation uses NextRequest to get the serial
of the XCopyArea operation where the translation should end. However,
if the gc passed to gdk_draw_drawable has a non-flushed clip region
(which it commonly has now for the window clipping) then the next
operation will be the GC flush, not the XCopyArea.
To handle this right we now pass in the GC to be used to
queue_translation and ensure that it is flushed before calling
NextRequest().
When we copy the region we need to also re-expose the areas of
the copied region that was not also in the destination.
And, we need to do this invalidation after the move, as the
move also moves any invalid area.
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.
When moving an area we move any invalid region in this area to the
new place, but there really is no need to remove the old invalid
area as it would just be invalidated again (being newly exposed).
This extends the usage of the native clear region call such that its
called also for windows that have parent relative background all the
way up to a native window. That way we get true background relative
background clearing even to a foreign parent, which means that some
transparent notification icons look right again.
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.
We used to invalidate the whole window when raised, but this is
unnecessary much, we now just invalidate the visible area minus the
previously visible area.
This also fixes a problem where expose calling raise caused a loop (#588438)
This never worked before csw since the root window is never
set as IS_MAPPED, but with the new viewable check (which is
true for the root window) we could erronously queue exposes
on the root window.
This happened unexpectedly in bug 589369, where metacity
got a GraphicsExpose event on the root window due to some
graphics operation, queueing an expose which would be handled
by clearing that area. That is fixed with this commit.
We get the real pixmap size and use as cairo surface size rather
than doing some magic to try to get clipping on the right hand size
(and the magic looks wrong anyway).
The previous code could result in the width/height being to big for
the cairo 28.4 fix point size and thus not drawing anything.
This fixes bug #588076.
gdk_window_input_shape_combine_mask() can accept NULL for the mask
parameter, but it wasn't checking for NULL before passing the
resulting GdkRegion to gdk_region_destroy(). Fixes#589275
When the region is empty we can return early, because there
is no more area to remove. This happens often for children
of scrolled windows (i.e. things that are clipped out.
The scrolling and region moving code needs to avoid drawing when the
window is mapped, which it did. However, it also needs to avoid
drawing when any of its parents are not mapped, which it didn't so
switch to using gdk_window_is_viewable().
This fixes the index rendering in evolution (#588169)
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)
We really need to wait for the MapNotify from the xserver to ensure
that the window has been mapped, as it may be delayed by the WM, network
or similar things.
This fixes a problem in the /ui-tests/keys-events gtk test
Turns out pygtk build broke due to the argument addition to draw_drawable.
So, we now add a new vfunc for the new draw_drawable and are thus
backwards compat.
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.
We emulate visibility by unmapping (in X) all mapped (according to
gdk) windows that are not visible (all parents mapped). This is because
there may be client side windows inbetween the native windows in the
hierarchy, so you can't know a native window is visible just because
all the parent native windows are mapped.
However, we don't want to unmap foreign windows, as that may cause all
sort of unexpected issues. This should be safe, because generally the
parent of a foreign window is a native window (e.g. a socket), so its
gdk visibility state is the same as the Xserver one.
This fixes an issue with the GDM notification area where the unmap of
the plug caused spurious UnmapNotify events that confused GtkSocket and
caused icons to become one pixel wide.
Last commit was bad, as it didn't clip against client side
children. This implements such clipping first and then
only clears the rectangles that need to be cleared.
This is how cairo works with native children.
This fixes an issue where the drag target outline is visible on the
evolution folder treeview when it isn't with native windows.
Without this we can't draw to them, which caused problems for e.g.
gnome-settings-daemon clearing the background when the desktop
background changed.
Note: We don't actually clip away child windows from the root window,
the clip is just based on the size of the root window.
In the destroyed window case in do_synthesize_crossing_event we didn't
return a value which can cause infinite "loops". Always return FALSE
to make sure the idle doesn't run again.
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.
You can call this if you have offscreen children and the geometry of
them changed. This will cause re-picking of the active window sending
enter and leave events as needed.
We want to be able to map any window coordinate to a root coordinate, not
just the origin, because you can't rely anymore on a simple translation
from window coordinates to parent with offscreen windows. This lets
us e.g. pop up menus in the right place even if they are popped up from
a no-window widget.
We use the offscreen signals for getting parent, picking
children at a point and mapping coordinates between windows
embedding offscreens and offscreens.
This means we have two hierarchies more or less, one visible to apps via
the standard APIs and for drawing where the offscreens are their own
separate toplevels, and another one for event handling where embedded
offscreens appear as if they were children of the embedding window.
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
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).
This also removes the (unimplemented) possibility to change a window to
non-native. This seems generally not very useful, and there are some problems
with it, for instance if two "users" need a window to be native and then
one of the "users" doesn't need it anymore it can't change it back, because
it is unaware of the other reason the window is native.
If a native window or a window with a native subwindow is moved or resized
then the client window moves and implicit paints need to be flushed since
the native window move will copy/overwrite data. This may happen while there
is an outstanding paint if the move is inside an expose event (weird, but
flash embedded in webkit hit this).
Right now we're asserting here, but the right fix is to allow this but
to not flush the parts that are currently in a (non-implicit) paint. This
means we flush all results from previous not-yet-flushed exposes, but not
the ones being drawn.
In the new world offscreen windows are not put in the hierarchy, but are
rather toplevels for themselves. Offscreen hooks don't make any sense
in this model.
It often happens that we move region A to B and then we move a subset
of B to C. When possible we'd like to replace this with a move from
A directly to C, and a suplimentary move from A to the areas of B not
overwritten by C.
Getting an optimal move combiner seems quite complicated, but this
simple approach gets most of the interesting cases right and isn't
all to complicated.
There is no need to copy something that is already invalid and will
be marked as invalid in the destination anyway, so we remove this
area from the region to copy.
The expose translation is useful for tracking how outstanding
invalid (exposed on server) areas are copied, and how we need to
compensate for that on the client side to redraw the right area.
So, we should queue the translation at the time we actually move
the bits on the server side, not when moving the window on the
client side.
Also, clean up some naming of parameters.
We now copy outstanding window moves directly on the window and
not to an intermediary pixmap, this means our previous code to
combine window copies was wrong (it relied on each copy not
destroying the source date).
Furthermore, we can't just remove all the update area from the
destination of the outstanding moves, as sometimes things get
copied into that area and then used as the source of another
copy.
We replace the previous window copy combining with a naive
version that just queues each move, just to get things right.
Further work to optimize copies is possible.
Also, we don't remove copy destinations that are used as source
for later copies.
We also clean up the memory management by not having
move_region_on_impl taking ownership of the passed in region.
Apps that set no exposure mask rely on the system clearing things
to the window background, so we need to do this ourselves.
Also, don't do this on foreign windows, as they are not controlled
by us. In fact don't do exposes on foreign windows either.
This is required for the GtkSocket code, as it shows the plug child
even though the current cached state is (wrongly) that its already
mapped.
This makes blink work for non-local case in testsocket.
Native descendants of a virtual children are not automatically destroyed
with the parent as if it was a native window, so we need to handle
the native recursion tracking manually in _gdk_window_destroy_hierarchy()
Some apps really need to set custom event masks on native child windows,
for example emacs sets the event masks with gdk, but then reads out
the raw X events via a filter, so gdk event emulation doesn't work for that.
When we get motion or button events we map back from the event position and
window to the toplevel before doing anything, because a toplevel native window
could e.g. overlap a child window or whatever.
These are generated when we get an implicit grab on a native
child window, and we can't filter them with _has_grab() because
they are sent before the button press event where we detect
the implicit grab.
This makes clicks work in the flash plugin again
It turns out we really have to ignore grab/ungrab events or we'll
report double crossing events when we grab or ungrab.
However, we also can't ignore crossing events from grabs from other clients
as that leads to missed enter/leave events on e.g. alt-tab in metacity.
Fortunately we now track grabs very precisely, so we know with certainty
whether we have a grab at the time (serial) of the native crossing events,
and only if we do we ignore them.
If we get crossing events with subwindow unexpectedly being NULL
that means there is a native subwindow that gdk doesn't know about.
We track these and forward them, with the correct virtual window
events inbetween.
This is important to get right, as metacity uses gdk for the frame
windows, but gdk doesn't know about the client windows reparented
into the frame.
Having GDK_WINDOW_CHILD windows with root as the parent apparently works,
and metacity uses it. The current gdk_window_get_toplevel() returns the
root window for that, which is wrong, so we check that explicitly.
This causes all sorts of weirdness with pointer_over_window
being the rootwindow and then crashing gdk_window_get_toplevel() later.
With this metacity stops crashing madly.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
GtkNotebook tabs
* gtk/gtkwidget.c (_gtk_widget_synthesize_crossing): Be a little
more careful when navigating up the parent chain.
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Reset the
pointer window thats stored on the screen when it is destroyed.
svn path=/trunk/; revision=22420
* gtk/gtkwidget.c (gtk_widget_get_snapshot): Use a different approach
to snapshotting that is in line with what is done in the client-side
windows branch, and that works for widgets regardless if they are
double-buffered or not. Patch by Alex Larsson.
* gdk/gdkwindow.c (_gdk_window_calculate_full_clip_region): Clip
to the parent.
svn path=/trunk/; revision=22187
2009-01-09 Christian Dywan <christian@imendio.com>
Fail in gdk_window_new if _gdk_window_new failed
* gdk/gdkwindow.c (gdk_window_new): Add g_return_val_if_fail
in case _gdk_window_new is NULL. Approved by Tim Janik
svn path=/trunk/; revision=22082
2008-10-21 Michael Natterer <mitch@imendio.com>
* gdk/gdkdraw.c
* gdk/gdkimage.c
* gdk/gdkscreen.c
* gdk/gdkwindow.c: replace assertions for obj != NULL by
GDK_IS_OBJ(), remove redundant != NULL checks when there is
already a type check, add some g_return_if_fail() that were
missing entirely, fix some broken indentation and spacing.
svn path=/trunk/; revision=21695
2008-07-02 Cody Russell <bratsche@gnome.org>
Bug 541305 – [Win32] Scrolling was broken after GdkWindow refactoring
* gdk/win32/gdkwindow-win32.c: Reverted some logic so that scrolling
works again.
* gdk/win32/gdkgeometry-win32.c: Removed some more unnecessary checks.
* gdk/win32/gdkkeys-win32.c: Removed unused variable to fix compile-time
warnings.
svn path=/trunk/; revision=20737
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-06-30 Michael Natterer <mitch@imendio.com>
Some unrelated cleanups found while reviewing
the offscreen window patch:
* gdk/gdkwindow.c: add missing Since: 2.14 to the redirection
functions, fix some function header indentation, update
documentation of redirect_to_drawable().
* gdk/x11/gdkwindow-x11.c
* gdk/x11/gdkpixmap-x11.c: fix function header
formatting/indentation.
* gtk/gtkwidget.c: use I_() on "damage_event".
svn path=/trunk/; revision=20708
2008-06-27 Emmanuele Bassi <ebassi@gnome.org>
Abstract some GdkWindow API into an interface that the backends
must implement. (based on a patch by Alex Larsson)
* gdk/Makefile.am: Add gdkwindowimpl.[ch]
* gdk/gdk.symbols: Move symbols around.
* gdk/gdkinternals.h:
* gdk/gdkwindowimpl.[ch]: Move some of the GdkWindow API we require
from the backends to a GInterface that the backends should implement
instead.
* gdk/gdkwindow.c: Provide some of the GdkWindow public API as a
wrapper call around the GdkWindowImpl interface vtable.
* gdk/x11/gdkevents-x11.c:
* gdk/x11/gdkgeometry-x11.c:
* gdk/x11/gdkprivate-x11.h:
* gdk/x11/gdkwindow-x11.c:
* gdk/x11/gdkwindow-x11.h: Update the X11 backend to implement
the GdkWindowImpl interface.
svn path=/trunk/; revision=20695
2008-03-18 10:49:20 Tim Janik <timj@imendio.com>
* Applied pixmap redirection patch by Alexander Larsson with
various updates from:
Bug 318807 – Offscreen windows and window redirection.
Updates:
* updated docs to mention "Since 2.16".
* tests/testgtk.c: fixed snapshooting pixmap leak.
convert pixmap to pixbuf after snapshooting, to compensate for different
bit depths (occurs when snapshooting ARGB visuals and displaying the
pixmap in an RGB visual).
* gdk/gdkwindow.[hc]: made GdkWindowRedirect private.
* gdk/gdkwindow.c: removed damage idle handler, there's no aparent
need for it. enqueue damage notification as GDK_DAMAGE events
for each painting redirection at the start of the event queue.
consider windows with a redirection fully visible when invalidating,
and when updating from backing store. cleaned up stale variables.
* gdk/gdkevents.c: added _gdk_event_queue_prepend().
* gtk/gtkwidget.c: fixed coordinates for !NO_WINDOW widgets in
gtk_widget_get_snapshot; this fixes garbage snap offsets for gammacurve,
tree, drawingarea, text, handlebox, etc.
clip the redirected window hierarchy to window sizes, the visible
rectangles don't need to be taken into account here.
extended snapshooting docs to recommend gdk_pixbuf_get_from_drawable()
in case pixmap visuals could mismatch.
* gdk/x11/gdkwindow-x11.c: removed _gdk_windowing_window_get_visible_rect().
Base patch:
* tests/testgtk.c: add a "Snapshot" test to demonstrate snapshooting
of possibly obscured widgets into an offscreen pixmap.
* gtk/gtkwidget.[hc]: add GtkWidget::damage-event signal, add
gtk_widget_get_snapshot() to render a widget's contents to a GdkPixmap.
* gtk/gtkmain.c: dispatch GDK_DAMAGE events.
* gdk/gdkwindow.c: moved outer gdk_window_new() and gdk_window_reparent()
implementations here, adapted them to propagate redirects to child windows.
gdk_window_end_paint(): copy repainted window contents to redirection pixmap,
clipped to visible region. queue GDK_DAMAGE event delivery.
gdk_window_redirect_to_drawable(): install window painting redirection.
gdk_window_remove_redirection(): remove previously installed redirection.
* gdk/x11/gdkwindow-x11.c: added _gdk_windowing_window_get_visible_rect(),
renamed _gdk_window_new() and _gdk_window_reparent().
* gdk/gdkwindow.h: added GdkWindowRedirect* to GdkWindowObject, export
gdk_window_redirect_to_drawable() and gdk_window_remove_redirection().
* gdk/gdkevents.h: added GDK_DAMAGE event type.
* gdk/gdkevents.c: extract time and state from GDK_DAMAGE events.
* gdk/gdkinternals.h: added internal prototypes.
svn path=/trunk/; revision=20122
2007-11-09 Kristian Rietveld <kris@imendio.com>
* gdk/gdkwindow.c (gdk_window_process_all_updates): guard for
windows with GDK_WINDOW_DESTROYED set. (Fixes#482531, reported
by Sebastien Bacher).
svn path=/trunk/; revision=18975
2007-09-12 Kristian Rietveld <kris@imendio.com>
Fixes#426246.
* gdk/gdk.symbols:
* gdk/gdkwindow.[ch]
(gdk_window_freeze_toplevel_updates_libgtk_only),
(gdk_window_thaw_toplevel_updates_libgtk_only): new functions
to freeze a toplevel window and all its descendants. To be made
public in 2.14,
(gdk_window_schedule_update): return if toplevel is frozen,
(gdk_window_process_all_updates): defer processing updates if toplevel
is frozen.
* gtk/gtkwindow.c (gtk_window_configure_event): directly size
allocate for override redirect windows, freeze toplevel and
descendants otherwise and wait until resizing is done.
svn path=/trunk/; revision=18802
2007-08-08 Behdad Esfahbod <behdad@gnome.org>
* gdk/gdkwindow.c (gdk_window_invalidate_region): Use gtk_true
instead of rolling a new one. Patch from Xan Lopez.
svn path=/trunk/; revision=18595
2007-07-20 Ryan Lortie <desrt@desrt.ca>
* gtk/gtkwidget.c (gtk_widget_is_composited): add note that the
semantics of this call, when mixed with the new
gdk_window_set_composited(), will change in the future.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): only grab Damage
events that belong to us.
svn path=/trunk/; revision=18506
2006-07-17 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkwindow.c (gdk_window_get_pointer): Add some more
detail to the docs. (#311399, Nikos Kouremenos)
2006-05-30 Matthias Clasen <mclasen@redhat.com>
* gdk/gdkpixmap.c:
* gdk/gdkwindow.c: Don't use G_DEFINE_TYPE, since the instance
struct name does not match the type name. (#343453, Ed Catmur)
2006-04-11 Anders Carlsson <andersca@imendio.com>
* gdk/gdkinternals.h:
* gdk/gdkwindow.c:
(_gdk_paintable_get_type):
(gdk_window_begin_paint_region):
(gdk_window_end_paint):
(gdk_window_process_updates):
(gdk_window_invalidate_maybe_recurse):
Add new GdkPaintable interface which implementation objects can
implement in order to override gdk painting functions.
2006-02-03 Federico Mena Quintero <federico@ximian.com>
Work around https://bugs.freedesktop.org/show_bug.cgi?id=4320,
which used to be our own
http://bugzilla.gnome.org/show_bug.cgi?id=314616. If one uses a
pixmap for a pattern in Cairo, and sets the pattern to
CAIRO_EXTEND_REPEAT; and if the destination surface is also a
pixmap, Cairo does a slow copy instead of using XCopyArea(). So,
we use the same code that we used in GTK+ 2.6 (pre-cairo), by
filling the double-buffer pixmap with a tiled GC and
XFillRectangle().
* gdk/gdkwindow.c (BackingRectMethod): New structure with a
cairo_t and a GdkGC field. Depending on which of these fields
gets filled in, we'll use Cairo or GDK to clear the double-buffer
pixmap when painting a window.
(setup_backing_rect_method): Fill a BackingRectMethod as
appropriate, depending on the window's configuration and our
knowledge of whether Cairo is fast or slow when doing repeating
patterns.
(gdk_window_clear_backing_rect): Call
setup_backing_rect_method(). Depending on what it returns, use
Cairo to clear the double-buffer pixmap, or plain GDK.
2005-11-10 Michael Natterer <mitch@imendio.com>
Applied patch from maemo-gtk that addresses many issues wrt
display migration and display closing (bug #85715).
* gdk/gdkdisplay.c (gdk_display_dispose): don't just set the
default display to NULL when it's closed. Instead set the most
recently opened display as new default (if one exists).
* gdk/gdkpango.c (on_renderer_display_closed): fixed signature
of this callback.
* gdk/gdkscreen.c (gdk_screen_dispose): check if the GCs still
exist before unrefing them.
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): if the screen
is closed, allow destruction of the root window.
* gdk/x11/gdkdisplay-x11.c: moved some stuff from finalize() to
dispose(), free stuff that was leaked before.
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_uninit_screen): check if
the xsettings_client still exists before destroying it.
* gdk/x11/gdkkeys-x11.c: added finalization and free the allocated
X resources.
* gdk/x11/gdkpixmap-x11.c: moved stuff from finalize() to new
dispose() implementation.
* gdk/x11/gdkscreen-x11.c: moved stuff from finalize() to
dispose() and check if it still exists before unrefing it. Set
their pointers to NULL/None *after* upchaining in dispose(),
because X11 implementations of members of the parent class still
need them for their own destruction.
* gdk/x11/gdkvisual-x11.c: removed finalize() implementation which
was g_error()ing when finalizing a visual.
* gtk/gtkclipboard.c (gtk_clipboard_finalize): don't use
get_clipboard_widget() because it would create the widget if it
doesn't exist. Use g_object_get_data() directly instead.
* gtk/gtktextdisplay.c (on_renderer_display_closed): fixed signature
of this callback.
2005-09-26 Matthias Clasen <mclasen@redhat.com>
Fix#316871, reported by Dan Winship:
* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
(gdk_window_shape_combine_region): Set it here.
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
remove the child area for shaped windows.
2005-05-11 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
to draw the swatch in to avoid having an extraneous window.
* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
color when !has_opacity.
2005-05-10 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
files for Cairo convenience functionality.
* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
convenience functions to add GdkRectangle, GdkRegion to a cairo path.
* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().
* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
gdk_drawable_create_cairo_context() to gdk_cairo_create().
* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
Rename gdk_pixbuf_set_as_cairo_source() to
gdk_cairo_set_source_pixbuf().
* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
Adjust for renames.
* gdk/gdk.symbols: Update.
* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
coordinate system problem that was causing the wrong portions
to be invalidated.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
gtk/gtkcellview.c (gtk_cell_view_expose)
gtk/gtkdnd.c (gtk_drag_highlight_expose)
gtk/gtkentry.c (gtk_entry_draw_text)
gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.
* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
GTK+ style ... use instance-private data and standard names for
private structure, etc. Move function docs inline.
* gtk/gtkcalendar.[ch]: Switch to drawing everything in
expose. Switch drawing to Cairo.
* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
gtk_calendar_freeze/thaw
2005-04-28 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add a draw-border style property to allow
themes to draw outside the widget's allocation.
* gdk/gdkwindow.c gtk/gtkstyle.c: Remove some save/restore pairs
that were working around the clip-leakage bug in Cairo.
* gtk/gtkstyle.c: Use cairo_fill_preserve() rathe than
save/fill/restore.
* gdk/gdkgc.c gdk/gdkinternals.h: Add _gdk_gc_update_context()
That updates a Cairo context to match a GC.
* gdk/gdkdraw.c: Use _gdk_gc_update_context() to add support
for tiles/stipples/clipping to gdk_draw_glyphs(),
gdk_draw_trapezoids().
* gdk/gdkpango.c: Use _gdk_gc_update_context() instead of internal
implementation of stipples. Use one cairo_t across the entire
drawing operation. Replace cairo_matrix_create() with
stack-allocated matrices.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c: Save various aspects of the
GC state (fill, tile, stipple, foreground, background, clip region)
in instance-private-data for future use. Add getters.
Get rid of _gdk_windowing_gc_get_foreground() function implemented
by the backends.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Add
_gdk_gc_init() to do initial setup of the GC from values;
fixes some problems from drawable redirection.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Move
gdk_gc_copy() and gdk_gc_set_clip_{region,rectangle}() into
the generic code, add _gdk_windowing_gc_copy(),
_gdk_windowing_gc_set_clip_region() to do backend specific
stuff.
* gdk/x11/{gdkprivate-x11.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
gdk/win32/{gdkprivate-win32.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
gdk/linux-fb/{gdkprivate-fb.h,gdkgc-fb.c.c,gdkdrawable-fb.c}:
Don't duplicate state that now is stored by the generic code.
* gdk/gdk.symbols Update
2005-04-18 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c
* gdk/gdkcolor.c gdk/gdkwindow.c gdk/gdkpixbuf-render.c
gdk/gdkpango.c tests/testcairo.c: Update to new Cairo API for
setting color and opacity. (#301066, Vincent Noel)
Mon Mar 28 15:13:42 2005 Søren Sandmann <sandmann@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
invalidate areas that are covered by mapped input-output child
windows. Bug 141380.
2005-02-24 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: Use cairo_set_device_offset().
* gdk/win32/gdkdrawable-win32.[ch] gdk/win32/gdkwindow-win32.c
gdk/win32/gdkpixmap-win32.c:
Add_gdk_win32_drawable_acquire/release_dc() to get a DC for the
drawable. Add _gdk_drawable_win32_finish() to clean up resources
when a drawable is destroyed.
* gdk/win32/gdkgc-win32.c gdk/win32/gdkdrawable-win32.c
(blit_from_pixmap) gdk/win32/gdkprivate-win32.h : Use
acquire/release_dc when getting a DC to use with a GC or for
blitting from a pixmap.
* gdk/win32/gdkdrawable-win32.[ch]: Implement ref_cairo_surface()
* gdk/win32/gdkpango-win32.c gdk/win32/gdkdrawable-win32.c Makefile.am:
Remove gdk_screen_get_pango_context(), draw_glyph[_transformed]
implementations.
* gdk/win32/gdkdrawable-win32.c: Remove
gdk_draw_rectangle_alpha_libgtk_only()
2005-03-15 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c gdk/gdkwindow.c
gdk/x11/gdkdrawable-x11.c gdk/x11/gdkpixmap-x11.c gdk/x11/gdkwindow-x11.c
gdk/gdkinternals.h: Switch set_cairo_target() virtual function to
ref_cairo_surface()
* gdk/gdkdrawable.h gdk/gdkdraw.h: Switch set_cairo_target() virtual
function to create_cairo_context()
* gdk/gdkwindow.c: Clear double buffer pixmaps with Cairo.
* gdk/x11/gdkwindow-x11.c: Keep all components in GdkWindowObject.bg_color,
not just the pixel.
* tests/testcairo.c: Update for create_cairo_context()
* gdk/gdkdraw.c (gdk_draw_trapezoids, gdk_draw_glyphs[_transformed]):
Reimplement in terms of Cairo, bypass the vtable entries.
* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
gdk/x11/gdkgc-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkprivate-x11.h gdk/x11/Makefile.am: Remove
implementation of draw_trapezoids / draw_glyphs[_transformed].
* gdk/gdkpango.c: Switch GdkPangoRenderer to use Cairo
* gdk/gdkpango.c gdk/x11/gdkpango-x11.c: Move
gdk_pango_context_get_for_screen() into the backend independent code.
* gdk/x11/gdkdrawable-x11.[ch]: Remove Xft use, use RENDER directly
for drawing images.
* gdk/gdkdrawable.h gdk/x11/gdkdrawable-x11.c: Remove
gdk_draw_rectangle_alpha_libgtk_only.
* gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c: Add
gdk_pixbuf_set_as_cairo_source()
* gdk/gdk.symbols: Update
* gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkruler.[ch]
gtk/gtk[hv]ruler.c: Convert to Cairo rendering.
* gtk/gtkstyle.c (gtk_default_draw_check, gtk_default_draw_focus,
gtk_default_draw_option): Switch to Cairo. Simplify the checkbutton,
radio button style for now to get something more scalable.
* gtk/gtksettings.c: #if 0 out the code to use PangoXft for hinting/
antialiasing/dpi settings.
2005-03-15 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gdk/gdk.symbols: Group symbols by header and source file.
* gdk/makegdkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegdkalias.pl -def
* gdk/Makefile.am (gdkaliasdef.c): Add a rule to generate this
file.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h after the other
headers, include gdkaliasdef.c at the bottom.
2005-02-03 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdrawable.[ch] gdkpixmap.c gdkwindow.c: Add
gdk_drawable_set_cairo_target().
* tests/testtreeflow.c (enum): Use grand not rand as a variable
name because one of the cairo headers is pulling in stdlib.h.
* tests/testcairo.c tests/Makefile.am: Add a simple cairo based
example.
* configure.in: Bump release to 2.7.0, gtk_binary_version to 2.7.0.
* Require libpangocairo for all backends.
Wed Dec 22 14:22:19 2004 Søren Sandmann <sandmann@redhat.com>
* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
timeout. Written by Christian Persch.
Wed Dec 22 14:14:02 2004 Søren Sandmann <sandmann@redhat.com>
Bug #161561
* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
background for windows that get expose events.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
hack to repaint !expose windows.
Sat Nov 20 15:13:51 2004 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of
PangoRenderer targeting GDK drawables. Use to implement the old
gdk_draw_layout() and friends.
* gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Add gdk_draw_glyphs_transformed() gdk_draw_trapezoids() and
the corresponding members of GdkDrawableClass. Add a fallback
implementation of gdk_draw_trapezoids() in terms of pixbufs.
* gdk/gdkwindowing.h gdk/x11/gdkg-x11.h: Add
_gdk_windowing_gc_get_foreground() to enable the fallback
trapezoid implementation.
* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkdisplay-x11.h: Implement
draw_glyph_transformed, draw_trapezoids.
* gdk/x11/gdkdrawable-x11.[ch]: Add
_gdk_x11_drawable_draw_xtrapezoids, _gdk_x11_drawable_draw_xft_glyphs
for use of GdkX11Renderer.
* gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Implement
GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED in the RENDER codepath.
* gdk/gdkpango-x11.c: Add GdkX11Renderer... a subclass of
PangoXftRenderer that does tiles/stipples and fallback rendering
of trapezoids without the RENDER extension.
* gdk/gdkpango-x11.c gdk/x11/gdkscreen-x11.[ch] _gdk_x11_renderer_get:
Add _gdk_x11_renderer_get() to get a singleton GdkX11Renderer
for the screen.
* gdk/x11/gdkdrawable-x11.c (get_impl_drawable): Fix a None/NULL
confusion.
* gtk/gtklabel.[ch] gtk/gtk.symbols: Add gtk_label_set/get_angle(),
and an ::angle property.
* gtk/gtklabel.c: Remove #if 0'd dead code gtk_label_paint_word().
* gtk/gtktextdisplay.c: Switch to using a GtkTextRenderer subclass
of GdkPangoRenderer for drawing.
* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Switch to using
gtk_attr_shape_new_with_data() to store backreferences to
embedded pixmaps and widgets. Leave line_display->shaped_objects
around for backwords compatibility.
* gdk/gdkpango.[ch] (gdk_pango_context_set_colormap): Describe
as deprecated, remove implementation.
* gtk/gtkwidget.c (gtk_widget_create_pango_context): Remove
call to gdk_pango_context_set_colormap.
* demos/gtk-demo/Makefile.am demos/gtk-demo/rotated_text.c: Add
a demo showing drawing rotated text.
* tests/testgtk.c: Add a rotated-label test, and also a rotated
drawing test (differs from demos/gtk-demo/rotated_text by also
using a tile)
Wed Oct 6 00:45:04 2004 <timj@birnet.org>
* gdk/gdkwindow.c (gdk_window_is_viewable): check the iteration window
variable, not just the window passed in. fixes#145270.
2004-08-26 Matthias Clasen <mclasen@redhat.com>
Make gdk_window_process_[all]_updates() respect
update_freeze_counter (#144272, Soeren Sandmann)
* gdk/gdkwindow.c (gdk_window_schedule_update): New function to
install an idle for gdk_window_update_idle() if one isn't there
already.
(gdk_window_process_all_updates):
(gdk_window_process_updates): Only process the updates if the
window isn't frozen.
(gdk_window_invalidate_maybe_recurse): Schedule an update when
necessary.
(gdk_window_thaw_updates): Use gdk_window_schedule_update() instead
of directly installing the idle.
Mon Aug 9 15:41:17 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gdk/Makefile.am: Add rules to generate gdk.def and
gdkalias.h from gdk.symbols, and make make check check
the abi with abicheck.sh.
* gdk/gdk.symbols: New file. Definition of the GDK ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gdk/abicheck.sh: New file. Script to check the actually
symbols exported from libgdk-x11.2.0.so against the symbols
found in gdk.symbols.
* gdk/makegdkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gdk/*.c, gdk/x11/*.c: Include gdkalias.h
Tue Jul 13 00:40:29 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Do an
empty begin_paint_region()/end_paint() for windows without
EXPOSURE_MASK.
* gdk/x11/gdkwindow-x11.c (_gdk_x11_window_tmp_unset_bg,
_gdk_x11_window_tmp_reset_bg): Remove checks for EXPOSURE_MASK.
Sat Mar 13 12:17:16 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Make
this a total no-op when the new or old parent is
destroyed. (#134230, patch from Soeren Sandmann)
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy):
For foreign windows in our heirarchy, call
_gdk_windowing_window_destroy_foreign (window) and skip
all the normal destruction logic.
* gdk/x11/gdkwindow-x11.c gdk/win32/gdkwindow-win32.c:
Move code to request destruction of a foreign window
code into a separate _gdk_windowing_window_destroy_foreign().
* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_finalize):
Call GDK_WINDOW_DISPLAY() on the wrapper not on the
impl. (Also from Soeren's patch)
2004-03-05 Federico Mena Quintero <federico@ximian.com>
Fixes#136082 and #135265, patch by Morten Welinder.
* configure.in: Use AC_SYS_LARGEFILE.
* */*.c: #include <config.h>
Wed Feb 18 17:53:27 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Use a scratch GC in the
case where the background is a solid color.
(gdk_window_clear_backing_rect): Reset the clip region after use.
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): Go
back to using a scratch GC. Pointed out by Owen Taylor
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Only use a
scratch GC if the passed-in one is NULL
Wed Feb 18 14:27:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c (gdk_window_get_composite_drawable): Reset clip
region back to NULL on cached GC (rest of #134728)
Wed Feb 18 13:28:57 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix bug reported by Nam SungHyun.
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha):
Don't use a cached GC here since the function needs to modify the
foreground color.
* gdk/gdkwindow.c (gdk_window_end_paint): Reset clip region back
to NULL on the cached GC.
Wed Feb 18 01:44:59 2004 Soeren Sandmann <sandmann@daimi.au.dk>
GC caching, bug #125645 (based on patch by Brian Cameron)
* gdk/gdkscreen.h (struct _GdkScreen): Add GC cache
* gdk/gdkscreen.c (gdk_screen_dispose): New function. Unref the
cached GC's here.
* gdk/gdkdraw.c (_gdk_drawable_get_scratch_gc): New function to
get a scratch gc.
* gdk/gdkinternals.h: Declare the function here
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Use
_gdk_drawable_get_scratch_gc() instead of creating a new GC.
* gdk/x11/gdkgeometry-x11.c (gdk_window_copy_area_scroll): same
* gdk/x11/gdkdrawable-x11.c (draw_with_images): same
* gdk/gdkwindow.c (gdk_window_get_composite_drawable): same
* gdk/gdkwindow.c (gdk_window_end_paint): same
* gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): same
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_threshold_alpha): same
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_pixmap_and_mask_for_colormap): same
Tue Nov 18 00:12:55 2003 Matthias Clasen <maclas@gmx.de>
Fix for #119555, Peter Zelesny:
* gdk/gdkdrawable.h: Declare gdk_drawable_copy_to_image.
* gdk/gdkdraw.c (gdk_drawable_copy_to_image): Make public
by removing the _ prefix.
* gdk/gdkdraw.c, gdk/gdkpixbuf-drawable.c, gdk/gdkpixmap.c,
gdk/gdkwindow.c: Adjust all callers.
Mon Sep 1 19:39:14 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c (gdk_window_get_bg_gc): Fix bug where the
background pixmap was being offset twice, once by the ts_origin in
gdk_window_get_bg_gc(), and once by gdk_draw_rectangle().
Wed Aug 20 22:04:47 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c: Make the layers in the paint stack have their
own pixmap instead of sharing one.
* tests/testgtk.c (create_get_image): Fixes to make the window fit
on an 800x600 screen
Wed Jul 9 19:48:26 2003 Kristian Rietveld <kris@gtk.org>
Merge from stable.
* gdk/gdkdisplay.c (gdk_display_get_window_at_pointer): don't
directly return from ->window_at_pointer, but set win_x and win_y
first if needed. (Fixes#110166, reported by Arno Charlet).
* gdk/gdkwindow.c (gdk_window_get_composite_drawable): change
function to accept GdkDrawables and not just GdkWindows. This was
already done in some other functions a while back, but this patch
got lost for some reason.
Fri Jul 4 15:57:52 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter):
Use asynchronously _gdk_x11_set_input_focus_safe
to avoid having to trap errors and XSync().
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Use
_gdk_x11_set_input_focus_safe() here as well.
* gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed):
Rework handling of property notifies on _NET_WM_STATE
so that we ignore _NET_WM_DESKTOP notifies unless we
really care.
* gdk/x11/gdkimage-x11.c (gdk_image_check_xshm): Use
XShmQueryExtension() rather than XQueryExtension() to
avoid extra rountrip.
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
Remove unused call to XGetWindowAttributes()
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Remove
unused call to XGetKeyboardControl().
* gdk/x11/gdkdisplay-x11.c gdk/gdk.def (gdk_display_flush):
Add (#99571)
* gdk/win32/gdkevents-win32.c gdk/linux-fb/gdkevents-fb.c
No-op implementations of gdk_display_flush().
* gdk/gdkwindow.c (gdk_window_process_all_updates): Use
gdk_display_flush() rather than gdk_flush() to avoid
XSync().
* gdk/x11/gdkwindow-x11.c (update_wm_hints)
gdk/x11/gdkwindow-x11.h: Centralize all handling of WM_HINTS here
so that we don't have to get the property back from the server.
* gdk/x11/gdkwindow-x11.c (show_window_internal): Store
the serial of when we map a toplevel to allow optimizing
out notifies on _NET_WM_STATE/_NET_WM_DESKTOP.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Don't
XTranslateCoordinates() for override-redirect windows.
Fri Jul 4 15:59:27 2003 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_set_group): Remove comment
about setting window group after the window is mapped from docs
- nothing the ICCCM forbids that.
* gdk/x11/gdkcursor-x11.c (gdk_display_get_maximal_cursor_size):
Fix g_return_val_if_fail() in void return function.
* configure.in: Fix misplaced comma that was resulting
in XShm always being disabled.
Fri Jun 6 11:07:33 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (event_window_still_viewable):
Before delivering an event to a widget, check that
(if relevant), the event's window is still viewable.
(#105642, Dennis Björklund)
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy):
NULL out private->parent, since after destruction
it might not be valid any more.
* gdk/gdkwindow.c (gdk_window_is_viewable): Fix some
accesses before g_return_val_if_fail(). Treat
DESTROYED windows as unmapped.
Mon Oct 7 15:10:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkinternals.h
gdk/gdkwindow.[ch] gdk/linux-fb/gdkwindow-fb.c
gdk/win32/gdkwindow-win32.c gdk/x11/gdkwindow-x11.c:
- Replace GdkPointerHooks with a multihead-safe
GdkDisplayPointerHooks, leave GdkPointerHooks
around for singlehead.
- Add gdk_display_get_pointer() to get the pointer
location with the screen it is on.
* gdk/gdk.def gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]:
Change gdk_screen_get_window_at_pointer() to
gdk_display_get_window_at_pointer().
* gtk/gtktreeview.c demos/gtk-demo/changedisplay.c
tests/testgtk.c: Use gdk_display_get_window_at_pointer(),
not gdk_screen_get_window_at_pointer().
* gtk/gtkcolorsel.c: Fix grabbing color to be multihead
safe.
* gtk/gtkwidget.c: Allow gtk_widget_push_colormap (NULL).
since it is useful for writing code that doesn't
know the dcurrent state but needs a clean colormap.
* gtk/gtkrc.c: When loading the settings for a particular
screen, only reset toplevels on that screen.
* gtk/gtkiconfactory.h: Fix #ifdef GTK_MULTIHEAD_SAFE
that should have been #ifndef GTK_MULTIHEAD_SAFE.