Commit Graph

2926 Commits

Author SHA1 Message Date
Alexander Larsson
62db28607b The shape is in window coordinate, so properly offset it when using it 2009-07-07 17:10:49 +02:00
Alexander Larsson
52e3d2cf0e Optimize clip-to-window with clipmask case when fully visible or obscured
This avoids creating alot of bitmaps in common trivial cases.
2009-07-07 17:10:49 +02:00
Alexander Larsson
2678a454e5 Make clipmasks work for pixbuf rendering
This is more important in the client side windows world, as clip masks
may be used for clipping to non-native subwindows. This fixes a bug
in aisleriot where it uses masked pixbuf drawing and it ends up drawing
over the moving card subwindow.
2009-07-07 17:10:49 +02:00
Alexander Larsson
5f12fe2b3b Add _gdk_gc_get_clip_mask
Internal function to get the clip mask of a gc (if set)
2009-07-07 17:10:49 +02:00
Matthias Clasen
b3969a3d75 2.17.3 2009-07-07 01:05:29 -04:00
Matthias Clasen
93556ea899 Make distcheck pass 2009-07-06 23:06:46 -04:00
Matthias Clasen
a213b00d8b More documentation fixes 2009-07-05 20:56:45 -04:00
Matthias Clasen
3b3e4e2a4b More small documentation fixups 2009-07-05 20:56:45 -04:00
Matthias Clasen
44bb1fb30e Small documentation fixes 2009-07-05 20:56:44 -04:00
Hans Breuer
cd58baa7e3 Updated msvc build 2009-07-04 12:19:13 +02:00
Hans Breuer
7e116727d7 Fix condition to deliver root coords 2009-07-04 12:19:12 +02:00
Hans Breuer
23b1b350b0 Enable window creation with GDK_WINDOW_CHILD again 2009-07-04 12:19:11 +02:00
Hans Breuer
1bc0954495 Initialize 'private' before use 2009-07-04 12:19:10 +02:00
Hans Breuer
fbf73aada9 Updated msvc build 2009-07-04 12:19:05 +02:00
Hans Breuer
bbd62f4ad8 Conditionally define WS_EX_COMPOSITED 2009-07-04 12:19:04 +02:00
Matthias Clasen
8031910e21 Add doc stubs 2009-07-03 15:22:02 -04:00
Alexander Larsson
2e3866b5b2 Make GdkDrawable draw_drawable backwards compat
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.
2009-07-01 19:50:49 +02:00
Alexander Larsson
038398d493 Move new draw_drawable argument to end to make it more backwards compat 2009-07-01 16:13:31 +02:00
Alexander Larsson
10bf7ca744 Clean up embedding api
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.
2009-07-01 14:36:36 +02:00
Alexander Larsson
681c3c288b Remove debug spew, add TODO_CSW 2009-07-01 13:33:45 +02:00
Alexander Larsson
199582aed3 gdk_win32_blit, don't get the size of the impl 2009-07-01 13:33:06 +02:00
Alexander Larsson
b1df568239 Some win32 cleanups 2009-07-01 12:06:57 +02:00
Alexander Larsson
593d5441d4 Fix win32 GC set_region handling of reset_region 2009-07-01 12:06:04 +02:00
Alexander Larsson
5341efd4d4 Make win32 backend build and minimally work 2009-07-01 10:28:06 +02:00
Alexander Larsson
11a96ce2f6 Don't use GDK_WINDOW_SCREEN, as its an X11 specific macro 2009-07-01 10:28:05 +02:00
Alexander Larsson
0c6f64a76c Don't return value from void function
This fixes the previous commit where the return value was removed.
2009-07-01 10:27:54 +02:00
Alexander Larsson
413b39962f Add missing symbols to gdk.symbols 2009-06-30 12:40:51 +02:00
Alexander Larsson
b50dfa6923 Add gdk_window_get_root_coords to gdk.symbols 2009-06-30 10:55:06 +02:00
Alexander Larsson
3b6cf72f39 Move destroyed check to common code for get_origin & get_root_coords
Also remove weird return value from get_root_coords
2009-06-30 09:30:53 +02:00
Alexander Larsson
64e7c7828d Don't hide foreign children when emulating visibility
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.
2009-06-26 20:11:57 +02:00
Alexander Larsson
c84c0e92f8 Better implementation of native clear_area
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.
2009-06-26 17:07:24 +02:00
Alexander Larsson
0e548579de Implement gdk_window_clear_area natively for foreign windows
This fixes a redraw issue with the notification area in xfce4.
2009-06-26 15:45:53 +02:00
Alexander Larsson
4e902cd223 Clip cairo drawing against client-side child windows
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.
2009-06-26 14:20:05 +02:00
Alexander Larsson
43bc999e6d Ensure that we always calculate clip regions for root 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.
2009-06-25 17:05:21 +02:00
Alexander Larsson
794f2815de Fix g_signal_emit calls
The switch to g_signal_emit was all messed up, I forgot to add signals[]
around the signal enum and did not pass in the detail quark.
2009-06-25 17:04:18 +02:00
Alexander Larsson
cf1c6bc2ed Fix typos 2009-06-24 20:59:29 +02:00
Alexander Larsson
955da9fc76 Factor out common code to sync_native_window_stack_position 2009-06-24 20:56:05 +02:00
Alexander Larsson
7969c1842a Remove old obsolete comment 2009-06-24 20:35:15 +02:00
Alexander Larsson
b093db8da9 Use g_signal_emit instead of g_signal_emit_by_name when possible 2009-06-24 20:33:13 +02:00
Alexander Larsson
8518aa2bf3 Rename accumulate_get_parent to accumulate_get_window
This function is used in several places, not just get_parent
2009-06-24 20:25:40 +02:00
Alexander Larsson
ca06216f20 Simplify _gdk_display_get_last_pointer_grab using g_list_last 2009-06-24 20:20:33 +02:00
Richard Hult
52ca2f29cc Update _gdk_windowing_pointer_grab 2009-06-20 11:50:10 +02:00
Richard Hult
56efcf62c4 Remove duplicate definition of GdkInputWindow 2009-06-20 11:50:10 +02:00
Richard Hult
f26fe5bb49 Update gdk_window_quartz_show, ..._get_origin, ..._get_pointer 2009-06-20 11:50:03 +02:00
Richard Hult
eb70b75118 Rename gdk_window_beep to _gdk_windowing_window_beep 2009-06-20 11:28:57 +02:00
Matthias Clasen
3dcb40e6be Correct a couple of typos 2009-06-19 09:14:18 -04:00
Alexander Larsson
0c7a26690d Fix spelling of synthesize 2009-06-18 20:58:13 +02:00
Alexander Larsson
7303f3c9fd Merge branch 'master' into client-side-windows
This updates client-side-windows to the the latest soname
change for easier testing.

Conflicts:
	gdk/x11/gdkwindow-x11.c
	tests/Makefile.am
2009-06-17 12:56:05 +02:00
Alexander Larsson
c08bf93fe5 Don't reset window hints when showing multiple times
gdk_window_show() should only set the initial hints on the first
run, not if the window is already mapped when gdk_window_show is
called.
2009-06-16 21:34:37 +02:00
Matthias Clasen
de3cc27706 Cleanup some translation handling
Use g_*gettext functions in gdk-pixbuf instead direct gettext
calls to benefit from the maybe-dont-translate functionality
in GLib. Also, replace a hand-rolled version by g_dpgettext2
in gtkbuilderparser.c. Fixes bug 585791.
2009-06-15 18:25:04 -04:00
Alexander Larsson
d44d5301a6 Remove ununsed variables 2009-06-12 12:47:20 +02:00
Alexander Larsson
bd0e95081f Always return FALSE from idle callback to avoid loop
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.
2009-06-12 12:45:31 +02:00
Alexander Larsson
56dfbd997e Handle gdk_window_beep on offscreen windows 2009-06-11 22:11:48 +02:00
Alexander Larsson
5dc6709ea0 Handle the window being destroyed in do_synthesize_crossing_event
This can happen since we ref the window and do the function in an idle.
2009-06-11 21:56:02 +02:00
Alexander Larsson
278e5bd170 Send crossing event due to geometry change in idle
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.
2009-06-11 21:49:17 +02:00
Alexander Larsson
4987ca9235 Add gdk_window_offscreen_children_changed 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.
2009-06-11 12:06:01 +02:00
Alexander Larsson
4d54de336b Add gdk_window_get_root_coords
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.
2009-06-08 20:01:05 +02:00
Alexander Larsson
a8549898ab Update event emulation to handle offscreen children
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.
2009-06-08 19:42:34 +02:00
Alexander Larsson
904f0ccb7c Base pointer grab on get-offscreen-parent 2009-06-08 19:39:14 +02:00
Alexander Larsson
f195fbc221 Implement offscreen get_pointer with offscreen signals 2009-06-08 19:39:14 +02:00
Alexander Larsson
e1b52da0ab Add signals for offscreen window embedding
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
2009-06-08 19:39:06 +02:00
Matthias Clasen
c7a0a513f5 Remove nonworking conditionals
Don't pretend that we care about XShape-less builds anymore.
See bug 584637.
2009-06-05 23:06:12 -04:00
Matthias Clasen
4b16b875db Avoid warnings in atom conversion
Cave in and revert to silently converting GDK_NONE to None.
Fixes bug 580511.
2009-06-05 22:36:48 -04:00
Alexander Larsson
4720bbc15e Make window_get_pointer a window impl virtual 2009-06-05 15:18:36 +02:00
Alexander Larsson
247e1945a0 window_get_pointer should return the direct child
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).
2009-06-05 15:18:36 +02:00
Alexander Larsson
cd7afc14fd Update GdkOffscreenWindow to new draw_drawable prototype
All rendering of drawables on offscreen was broken due to this change which
had not been implemented fully in offscreen windows.
2009-06-04 12:51:04 +02:00
Alexander Larsson
9437138db2 Fix some warnings added by the input handling
Add casting and actually fix parenthisation of boolean expression
2009-06-03 11:24:27 +02:00
Alexander Larsson
609b03c517 Further clean up window drawing redirection/clipping
This combines the OFFSET_GC and various SETUP/RESTORE gc macros
to a single BEGIN/END_DRAW macro pair.
2009-06-01 14:48:11 +02:00
Alexander Larsson
1d739c2ff6 Fix up gdk_window_set_has_native rename issues
Seems like i forgot a bunch of things.
2009-06-01 14:47:38 +02:00
Alexander Larsson
e123931a65 Add more GdkWindow implementation docs 2009-06-01 13:38:04 +02:00
Alexander Larsson
a84cc4e9f3 Whitespace cleanup gdkwindow.c
Almost everything here changed anyway, so might as well clean it up.
2009-06-01 12:04:36 +02:00
Alexander Larsson
287b821705 Rename gdk_window_set_has_native to gdk_window_ensure_native
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.
2009-06-01 11:57:59 +02:00
Caolan McNamara
5964109ef3 Plug a memory leak in Xrandr code 2009-05-30 00:05:35 -04:00
Alexander Larsson
d1f5050262 Make disabled xinput work again 2009-05-29 16:45:06 +02:00
Alexander Larsson
7372379c24 Initial version of input support 2009-05-29 16:39:12 +02:00
Alexander Larsson
0b586a5ad7 Add support for client side graphics exposures in gdk_draw_drawable 2009-05-27 17:10:32 +02:00
Alexander Larsson
44c7264bc7 Add _gdk_gc_get_exposures 2009-05-27 17:06:46 +02:00
Alexander Larsson
8cb385cd31 Add support for visibility notification 2009-05-26 20:53:48 +02:00
Alexander Larsson
6c76f8f6ce Add gdk_region_rect_equal to compare a region with a rect 2009-05-26 20:48:10 +02:00
Alexander Larsson
8a689f2e15 Handle flushing implicit paint while there is a paint outstanding
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.
2009-05-26 11:30:46 +02:00
Alexander Larsson
7698daf97a Merge branch 'master' into client-side-windows
Conflicts:
	gdk/x11/gdkwindow-x11.c
2009-05-25 14:30:01 +02:00
Matthias Clasen
96912b564f Avoid another case of treating None as an atom 2009-05-24 00:30:58 -04:00
Matthias Clasen
375d19aa92 Avoid warnings when handling SelectionNotify
The property field in SelectionNotify events may be None instead
of an atom.
2009-05-17 20:41:49 -04:00
Matthias Clasen
141ddd99f3 Avoid unintended side-effect in gdk_window_get_events
Calling gdk_window_get_events() had the side-effect of letting
property change notification through to the application, which
was not intended. Now we keep StructureNotify and PropertyNotify
filtered out when they were before. Reported in bug 582003.
2009-05-10 02:08:41 -04:00
Matthias Clasen
4fc49fd8db Don't enforce property change events on the root window
The code in gdk_x11_window_set_events is only meant to enforce
property change events on child windows. Pointed out in bug 531490.
2009-05-10 01:54:43 -04:00
Matthias Clasen
6fc6b8b4e8 Add diagnostics for XID collisions
This should help with diagnosing crashes caused by over-eager XID
reuse in Xlib, see bug 581526.
2009-05-05 19:29:05 -04:00
Behdad Esfahbod
a398c840be Add git.mk to generate .gitignore files
Add four new doc templates that were not in repository.
2009-05-04 14:29:21 -04:00
Matthias Clasen
6aa6338578 Fix handling of GDK_NONE
Don't intern "NONE" and warn if GDK_NONE is converted to an
X atom. Problem pointed out in bug 580511.
2009-05-03 21:38:54 -04:00
Brian Cameron
33f4ead506 Minor fix for GTK+ mediaLib code.
After doing some performance analysis, it was found that the GTK+ mediaLib code
triggers unnecessary lazy loading of dependent libraries.  The current code
uses RTLD_DEFAULT, RTLD_PROBE, RTLD_NEXT, and RTLD_SELF.  However, RTLD_PROBE
is all that is necessary, and avoids triggering the lazy loading.  So this
commit fixes the code to just use RTLD_PROBE.  (Bug 580678)
2009-04-29 18:52:32 -05:00
Christian Persch
0e99a5849e Allow unsetting the icon title set with gdk_window_set_icon_name
Change gdk_window_set_icon_name to allow using NULL to unset a
previously set icon title, so that the icon title tracks the normal
title again. Bug #535557.
2009-04-20 14:53:51 +02:00
Carlos Garcia Campos
5261d14d6f Fix memory leak in gdkscreen-x11
When RandR 1.2 X driver doesn't return any usable multihead data the
monitors array is freed, without freeing the memory allocated by the array
elements before. Fixes bug #578354
2009-04-10 00:14:23 -04:00
Sven Neumann
de64faabeb Fix compilation with DirectFB 1.0
The code used a field introduced with DirectFB 1.2. Added a
compile-time version check to make it work with DirectFB 1.0.
2009-04-09 16:50:25 +02:00
Alexander Larsson
4ecd6a0f89 Merge branch 'master' of ssh://alexl@git.gnome.org/git/gtk+ 2009-04-07 19:29:19 +02:00
Alexander Larsson
87459ff86c Don't move global user time backwards
When setting the user_time on a specific app to something, make sure
we're not moving the global per-display user time backwards.
2009-04-07 15:37:40 +02:00
Tor Lillqvist
c338228a86 Bug 578094 - ProcessIdToSessionId needs to be declared as WINAPI
Patch by  Shixin Zeng.
2009-04-06 15:10:35 +03:00
Cody Russell
1288ef1707 Grab changes 2009-04-02 10:16:30 +02:00
Cody Russell
f4331caf83 grabs 2009-04-02 10:16:30 +02:00
Cody Russell
49a0ec6e95 Updates 2009-04-02 10:16:30 +02:00
Cody Russell
08961c4def Get width/height from GetSystemMetrics() 2009-04-02 10:16:30 +02:00
Alexander Larsson
d64b51de4d Fix coordinates for background clearing when redirecting
Backport from svn of this fix
2009-04-02 10:16:30 +02:00