Commit Graph

3007 Commits

Author SHA1 Message Date
Matthias Clasen
be22a62160 Cleanups
This commit removes dead code, mostly pointed out by clang.
2009-09-10 13:53:28 -04:00
Alexander Larsson
7124f5927a Don't send grab broken for implicit grabs on button release
This is how it used to work, you only get grab broken if someone
else gets a grab, or if the grabbed window gets destroyed or unmapped.
2009-09-10 19:27:45 +02:00
Alexander Larsson
c4d2c38238 Ensure recursing gdk_window_process_all_updates works
There are two issues here. First of all an ignored update didn't
use to unset update_idle which could cause all further idle repaints
to be ignored. (Bug #591583)

Secondly, if we ignore the process_all_updates we may end up not updating
the windows in update_windows unless something else triggers an update.
So, we handle this by checking for recursions and scheduling a new update
at the end of the outermost process_all_updates.
2009-09-10 13:56:54 +02:00
Bastien Nocera
4ccd47f47e Avoid duplicate keysyms, ignore mispelled one
GDK_Select and GDK_Clear were duplicated, GDK_Calculater is
only useful for compulsive misspellers.
2009-09-10 10:16:44 +01:00
Bastien Nocera
11898088a1 Bug 594668 - Add new Xorg keysyms
Add support for XF86keysym.h to gdkkeysyms-update.pl and
update the generated gdkkeysyms.h file for the latest sources.
2009-09-09 18:45:28 +01:00
Matthias Clasen
aa9bb7d8e4 Deprecate gdk_event_get_graphics exposes
This function is only used in deprecated, broken widgets. Also,
fix up some of its implmentation that clang was complaining about.
2009-09-09 09:00:15 -04:00
Alexander Larsson
113d21801b Fix handling of window cursor wrt grabs
Even for grabs we need to recurse up to look for what cursor to use.
2009-09-08 11:48:20 +02:00
Matthias Clasen
da00e171e7 Correct the initial event mask of the root window
This fixes bug 588455 where the panel stopped responding to Alt-F2 when
setting a transparent background.
2009-09-06 02:44:24 -04:00
Matthias Clasen
d09d810261 Fix a typo 2009-09-04 23:27:37 -04:00
Matthias Clasen
bec0d570b0 Fix the build 2009-09-04 23:00:27 -04:00
Matthias Clasen
5c14089225 Make window manager tracking work better
We were getting the new wm name with a 15 second delay, due to
some race. Reported in bug 593644.
2009-09-04 20:22:43 -04:00
Alexander Larsson
812b3c451d Deprecate GDK_WINDOW_OBJECT and GdkWindowObject 2009-09-04 17:59:18 +02:00
Alexander Larsson
d0ac27fe5f Add function accessors for x11 window/pixmap impl 2009-09-04 17:59:17 +02:00
Alexander Larsson
0c7830aa42 Make public GDK_WINDOW_TYPE and GDK_WINDOW_DESTROYED use functions calls 2009-09-04 17:59:17 +02:00
Alexander Larsson
f64ef921da Add gdk_window_is_destroyed 2009-09-04 17:59:17 +02:00
Alexander Larsson
a10e90b799 Move _gdk_window_event_parent_of to gdkinternals.h
gdkprivate.h is in installed file and this function does not
need to be exported.
2009-09-04 17:59:17 +02:00
Alexander Larsson
4adcb39f86 Ensure clip region valid before using it for emulating graphics exposures
If there is a drawable clip on it we don't want to use that.
2009-09-04 16:06:51 +02:00
Alexander Larsson
294e222fa8 Ensure gc clip region valid in _gdk_gc_update_context
There might be an old drawable clip on it, if so remove it.
2009-09-04 16:06:51 +02:00
Alexander Larsson
223bcd23f7 Correct the antiexposure vs implicit paint flush race
The check for a possible implicit paint flush before queueing an
antiexposure was wrong. An implicit flush doesn't actually NULL
the implicit paint, se we have add a flag to explicitly track if
it is flushed.
2009-09-04 13:14:25 +02:00
Alexander Larsson
753f159aad Don't access region when it might be freed
Passing region into _gdk_gc_set_clip_region_internal takes ownership,
so don't use it after that. We can just as well just move the usage
above the call.
2009-09-04 13:10:35 +02:00
Alexander Larsson
587bc97d9c Fix warnings in gdk_window_restack 2009-09-04 11:08:46 +02:00
Matthias Clasen
2f80806359 Fix the return type of gdk_selection_property_get
It returns the length of the property, not a boolean. Reported
in bug 593788.
2009-09-02 22:50:05 -04:00
Alexander Larsson
d67a7eda16 Add gdk_window_restack
This lets you restack a window above or below a specified sibling.
At least eclipse wants this functionallity.
2009-09-02 23:38:55 +02:00
Alexander Larsson
45956aea21 Add gdk_cairo_reset_clip
This is required to get back the original drawable clip due to
non-native windows on a cairo_t.
2009-09-01 17:06:41 +02:00
Matthias Clasen
32d59d174e Documentation fixes 2009-09-01 00:53:44 -04:00
Matthias Clasen
9be22cb574 Document gdk_window_geometry_changed 2009-08-31 19:51:19 -04:00
Alexander Larsson
3e40146c04 Fix order of cairo clip setting when drawing text
We need to set the window clip region before applying the gc clip region,
otherwise we will reset the gc clip region. Fixes bug 593595
2009-08-31 16:39:54 +02:00
Alexander Larsson
21efe59aa0 Don't delay showing windows until viewable in GDK_NATIVE_WINDOWS mode
If all windows are native there is no need for delaying the operations
so we just do all shows/hides directly.
2009-08-31 15:06:01 +02:00
Alexander Larsson
b18afe9054 Don't propagate GDK_NATIVE_WINDOWS to child processes
Generally you only need to work around bugs in one specific app, so we
don't want to affect the applications that application will start.
Thus we unset GDK_NATIVE_WINDOWS after reading it.
2009-08-31 15:06:01 +02:00
Alexander Larsson
4d3b19fa7c Update shape handling
For toplevels, never apply clip as shape, instead apply shape.
This way we don't have to re-set it all the time as the window size
changes. Furthermore, this change fixes unsetting a shape on a
toplevel window which didn't actually unset the shape before.

Additionally we never apply clips as shape if the shape would just
be the same as the regular window size. This means we won't unnecessarily
add a useless shape to most native child windows (and additionally this
helps apps that do weird X stuff that don't expect these shaped windows).
2009-08-31 15:06:01 +02:00
Alexander Larsson
cc5b22cc81 Don't update window->shaped from backends
This is properly updated from the main code these days and
should not be touched by the backend code.
2009-08-31 15:06:01 +02:00
Alexander Larsson
154be115ec Use temporary impl_iface variable to make lines shorter
I.e. we use:
 impl_iface = GDK_WINDOW_IMPL_GET_IFACE (private->impl);
And then use impl_iface instead of the full macro when calling vfuncs.

Also, in some places we avoid getting the iface multiple times.
2009-08-31 15:06:01 +02:00
Alexander Larsson
397951cc85 Add and use gdk_window_is_toplevel when possible
This makes a lot of code cleaner and easier to understand
2009-08-31 15:06:01 +02:00
Alexander Larsson
028610b104 Add window type an shape to window print for nicer debugging 2009-08-31 15:06:01 +02:00
Alexander Larsson
d3d7070995 Support DEBUG_WINDOW_PRINTING even with GDK_NATIVE_WINDOWS 2009-08-31 15:06:00 +02:00
Matthias Clasen
f649237bf2 Minor doc fix 2009-08-31 00:55:57 -04:00
Matthias Clasen
5e5ab90a57 Improve CSW docs 2009-08-31 00:55:32 -04:00
Matthias Clasen
2421e641f4 Warn when a parent is destroyed
Previously gdk_window_new would silently return NULL. Bug 590921.
2009-08-30 11:14:40 -04:00
Matthias Clasen
7e4e2c636e Fix a documentation error
Reported by Eduard Bagrov in bug 592862.
2009-08-29 20:23:07 -04:00
Matthias Clasen
145fdcbb9e Make beeps work again
Yay, beeps !
2009-08-29 13:06:04 -04:00
Alexander Larsson
858e6bcd65 Allow x and y to be NULL in gdk_window_get_geometry
Fixes a crash reported in bug #593249
2009-08-27 13:34:00 +02:00
Alexander Larsson
1932f32ef2 Correct generation of broken grabs
We send a broken grab when a *parent* gets unmapped, not when
a child gets unmapped!
2009-08-27 13:32:01 +02:00
Alexander Larsson
41054425b9 Make sure we only send one grab broken event
We were incorrectly sending grab broken events in two places which
could cause multiple events for a single grab broken.
2009-08-27 13:32:01 +02:00
Alexander Larsson
cf73930869 Don't unnecessarily set the event mask as that can cause X errors
For instance, two clients selecting for button events can cause BadAccess.
This fixes bug 592624, where a gdk_window_reparent caused us to re-set
the event mask, breaking the workaround for the mozilla BadAccess bug.
2009-08-26 14:53:27 +02:00
Alexander Larsson
2400e1440e Propagate the "send_event" flag for emulated events
This fixes bug 593011, where we were getting a bogus time on sent events
and the gnome-panel specifically looked for this and worked around it.
2009-08-26 10:36:26 +02:00
Alexander Larsson
7cc8cf2888 Fix cairo clipping to client side windows
When updating the clip region on cairo context (due to window changes or
paints of different sizes) we reset the old clip region, but this was
erronously done inside a cairo_save/cairo_restore pair, which made the
reset not take effect.

This fixes bug #592263.
2009-08-25 15:47:09 +02:00
Alexander Larsson
c2546c859d Clean up gdk_draw_drawable() composite handling
Instead of doing some magic in gdk_draw_drawable() to avoid double
offsetting when calling gdk_draw_drawable on the impl we call
the vfunc directly on the impl. Thus removing the weird magic from
gdk_draw_drawable().

I tested this with the testgtk test "text", where if the original magic
code is disabled typing a newline in the middle of a text line causes
the double offset issue to appear.
2009-08-25 10:37:18 +02:00
Alexander Larsson
c0084e2142 Fix clipping issue with clip masks
When the clip mask is completely inside the drawable clip region we
don't change the clip at all. However, we did set region_tag_applied,
so when the drawable clip was removed we removed the original clip mask.
This is no good, so we fix that by returning early in this case.

Fixes issue reported in bug #592752.
2009-08-25 10:37:18 +02:00
Alexander Larsson
0ad0646daf Fix clipping of drawn pixbufs in the no-render case
The fallback pixbuf rendering case ends up calling gdk_draw_image() on the
destination drawable wrapper, which resets the previously set clip region.
So, we need to manually get the impl and draw on that directly.

This fixes bug 592752 where we don't clip pixbuf rendering on non-render
Xservers.
2009-08-25 10:37:18 +02:00
Alexander Larsson
a79f929dd6 Add support for enabling only native windows
Some applications make weird assumtions on Gtk+ that do not work anymore
with the new client-side windows support. For instance SWT/Eclipse reorders
the stacking order of the X windows directly without telling gdk this,
which breaks gdk drawing as gdk now relies on knowing the stacking order
for window clipping.

This introduces a GDK_NATIVE_WINDOWS environment variable, which if set
causes Gtk+ to always use native windows. Its more compatible with
pre-csw Gtk+ behaviour if you do weird X-specific hacks, although it does
limit the size of GdkWindows to 65535x65535.
2009-08-24 15:22:29 +02:00