Commit Graph

69 Commits

Author SHA1 Message Date
Matthias Clasen
fbf1093d5c Free the translate queue when closing a display
Not that many people are ever going to hit this.
https://bugzilla.gnome.org/show_bug.cgi?id=645236
2011-04-08 21:34:25 -04:00
Benjamin Otte
8d1b7362b3 x11: Copy from actual window, not parent
This code is a relic from GTK2 days and should not be necessary anymore,
as code now makes sure to only copy those parts of the window that are
not overlapped by parent windows.

By deleting it we fix potential issues with composited and translucent
windows copying the wrong data.

https://bugzilla.gnome.org/show_bug.cgi?id=643416
2011-03-07 17:45:08 +01:00
Matthias Clasen
454c36523a Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 18:50:09 -05:00
Benjamin Otte
a8b69df376 x11: Rename GdkScreenX11 to GdkX11Screen 2010-12-21 12:07:08 -05:00
Benjamin Otte
4db086da4b x11: Rename GdkDisplayX11 to GdkX11Display
Also rename all the macros etc.
2010-12-21 12:07:07 -05:00
Benjamin Otte
8e2240f699 x11: Rename GdkDisplayX11 to GdkX11Display 2010-12-21 12:07:07 -05:00
Matthias Clasen
021f595a38 Rename _gdk_window_move_resize_child
Rename _gdk_window_move_resize_child and _gdk_window_process_expose
to _gdk_x11.
2010-12-21 12:07:01 -05:00
Matthias Clasen
214342eac5 Clean up gdkx.h a bit
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.

Also remove a workaround for a long-fixed X server bug.
2010-12-21 12:07:01 -05:00
Matthias Clasen
28b7c6f05d Rename _gdk_event_mask_table to _gdk_x11_event_mask_table 2010-12-21 12:07:00 -05:00
Benjamin Otte
1bb6f48bb3 gdk: Rename GdkWindowObject to GdkWindow
... and remove most of the casting that used to be necessary.
2010-12-02 20:21:03 +01:00
Benjamin Otte
a3c5005eef x11: Use GDK_WINDOW_XID() instead of writing it out 2010-12-02 20:17:27 +01:00
Benjamin Otte
dc7d8dae67 x11: Change GDK_WINDOW_SCREEN macro
on't look at GdkDrawableImplX11->screen, but call
gdk_window_get_screen() instead.
2010-12-02 20:17:27 +01:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Benjamin Otte
a6e936788a gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Benjamin Otte
f7608c33ac gdk: Move scratch GC handling to X11
... and implement it directly instead of using GdkGC, as GdkGC is about
to be deleted, but we need this code.
2010-08-10 21:02:29 +02:00
Benjamin Otte
65ac54bb23 gdk: Make window moves a custom vfunc
The window move code needs special attention for multiple reasons:
- invalid areas for expose events need to be modified
- self-copy is not supported by Cairo
- in X11, copying from an overlapped Window might cause unexposed areas
  to be copied in, spo expose events for those need to be generated.

This was all special cased in various parts of the code. By making it an
explicit vfunc, we can work around it.
2010-08-10 21:02:28 +02:00
Javier Jardón
404e7d0e00 gdk/: fully remove gdkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:21:31 +02:00
Benjamin Otte
300e6b84cd s/GdkRegion/cairo_region_t/ in all of gtk
https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Benjamin Otte
3e96cfe8fc Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Matthias Clasen
be22a62160 Cleanups
This commit removes dead code, mostly pointed out by clang.
2009-09-10 13:53:28 -04:00
Alexander Larsson
939e55223c Ensure that queue_translation is paired with the right X operation
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().
2009-08-13 14:46:02 +02:00
Alexander Larsson
a3ee8271a9 Check for GraphicsExpose too in expose_serial_predicate
GraphicsExpose cause invalidation too, so we need to look for such
events in addition to normal Expose events.
2009-08-13 14:46:01 +02:00
Alexander Larsson
0fc8c475a8 Remove old comment about guffaw scrolling
We no longer use guffaw scrolling since the client side windows
branch was merged.
2009-08-10 14:27:53 +02:00
Alexander Larsson
d9fcda1072 Don't recursively set bg none on the parent when e.g. moving children
To avoid drawing the window background of other windows in the area
where the window was we set the bg to none recursively. However, this
is quite costly it the moved window has many siblings. Furthermore, it
is uncommon that siblings overlap, so this cost has little gain.

So, we only set bg None on the parent, which means that there will
be some more flicker in the uncommon case of overlapping siblings.
2009-04-02 10:15:28 +02:00
Alexander Larsson
7da48afcaa Don't allow native window > 65535 pixels 2009-04-02 10:15:25 +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
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
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
4442463481 Move all native children (recursively) in gdk_window_scroll 2009-04-02 10:15:16 +02:00
Alexander Larsson
36ce54878b Make _gdk_windowing_window_queue_translation a GdkWindiwImpl call 2009-04-02 10:15:15 +02:00
Alexander Larsson
eabac453e6 Initial client-side-windows work
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.
2009-04-02 10:14:01 +02:00
Emmanuele Bassi
e27632cd6d Abstract some GdkWindow API into an interface that the backends must
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-06-27 14:27:44 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Cody Russell
a0e6b36478 Bug 525461 - Don't invalidate under an input-only child
2008-05-25  Cody Russell  <bratsche@gnome.org>

        Bug 525461 - Don't invalidate under an input-only child

        * gdk/x11/gdkgeometry-x11.c (_gdk_window_move_resize_child):
        Check that the window is not input-only before invalidating.
        Report and patch by Owen Taylor.


svn path=/trunk/; revision=20165
2008-05-25 23:21:40 +00:00
Michael Natterer
92f86e0496 gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.h
2008-01-14  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.h
	* gdk/gdkcairo.h
	* gdk/gdkcolor.h
	* gdk/gdkgc.h
	* gdk/gdkinternals.h
	* gdk/gdkregion.h
	* gdk/gdkwindow.h: made GdkRectangle*, GdkRegion* and GdkColor*
	parameters const.

	* gdk/gdkcairo.c
	* gdk/gdkgc.c
	* gdk/gdkwindow.c
	* gdk/gdkrectangle.c
	* gdk/gdkpolyreg-generic.c
	* gdk/gdkregion-generic.c
	* gdk/directfb/gdkcolor-directfb.c
	* gdk/directfb/gdkgc-directfb.c
	* gdk/directfb/gdkgeometry-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkcolor-quartz.c
	* gdk/quartz/gdkgc-quartz.c
	* gdk/quartz/gdkgeometry-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkgeometry-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkcolor-x11.c
	* gdk/x11/gdkgc-x11.c
	* gdk/x11/gdkgeometry-x11.c
	* gdk/x11/gdkmain-x11.c
	* gdk/x11/gdkprivate-x11.h
	* gdk/x11/gdkwindow-x11.c: changed accordingly.

	* gdk/gdkpolyreg-generic.c: uncruftify to have proper function
	headers.


svn path=/trunk/; revision=19365
2008-01-14 14:02:12 +00:00
Behdad Esfahbod
c99b1edf39 Fix serial number comparison regression introduced recently. (#474897)
2007-09-10  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/x11/gdkgeometry-x11.c (gdk_window_queue),
        (_gdk_window_process_expose): Fix serial number comparison regression
        introduced recently. (#474897)


svn path=/trunk/; revision=18789
2007-09-10 18:07:39 +00:00
18:22:28 Tim Janik
57e8bdcb54 fix invalid list node accesses, spotted by Benjamin Berg, bug #475158.
2007-09-09 18:22:28  Tim Janik  <timj@gtk.org>

        * gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose): fix invalid
        list node accesses, spotted by Benjamin Berg, bug #475158.



svn path=/trunk/; revision=18769
2007-09-09 16:24:34 +00:00
Tim Janik
592dc62de8 fix X serial handling to cope with wraparounds and maintain referential
Thu Aug 23 15:32:09 2007  Tim Janik  <timj@imendio.com>

	* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose): fix
	X serial handling to cope with wraparounds and maintain referential
	integrity when removing list nodes. based on a patch by Hui Wang,
	fixes #461648.

svn path=/trunk/; revision=18693
2007-08-28 15:26:23 +00:00
Xan Lopez
9a0af6de47 replace GDK_WINDOW calls by cast to GdkWindow. Patch by Tilman Sauerbeck
2007-06-17  Xan Lopez  <xan@gnome.org>

	* gdk/x11/gdkgeometry-x11.c: replace GDK_WINDOW calls by cast to
	GdkWindow. Patch by Tilman Sauerbeck from #2063820.

svn path=/trunk/; revision=18170
2007-06-17 11:24:25 +00:00
Matthias Clasen
61de24aa9a Factor out window movement functions. (#63820, Tilman Sauerbeck)
2007-04-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkgeometry-x11.c: Factor out window movement
        functions. (#63820, Tilman Sauerbeck)



svn path=/trunk/; revision=17665
2007-04-27 23:31:58 +00:00
Matthias Clasen
e47eff75da Factor out translate_pos(). (#63820, Tilman Sauerbeck)
2007-04-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkgeometry-x11.c: Factor out translate_pos().
        (#63820, Tilman Sauerbeck)



svn path=/trunk/; revision=17664
2007-04-27 23:29:23 +00:00
Matthias Clasen
dad718f622 Factor out window mapping and unmapping functions. (#63820, Tilman
2007-04-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkgeometry-x11.c: Factor out window mapping
        and unmapping functions.  (#63820, Tilman Sauerbeck)



svn path=/trunk/; revision=17663
2007-04-27 23:26:46 +00:00
Matthias Clasen
197f292161 Make list handling code easier to read. (#63820, Tilman Sauerbeck)
2007-04-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkgeometry-x11.c: Make list handling code
        easier to read.  (#63820, Tilman Sauerbeck)



svn path=/trunk/; revision=17662
2007-04-27 23:23:52 +00:00
Søren Sandmann
6cb19cf3ad gtk/gtklayout.c (gtk_layout_realize), gtk/gtkiconview.c
Mon May 15 15:12:05 2006  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtklayout.c (gtk_layout_realize),
	* gtk/gtkiconview.c (gtk_icon_view_realize),
	* gtk/gtktreeview.c (gtk_tree_view_realize): Set the background of
	the clip windows to NULL, since they are generally invisible and
	don't have EXPOSURE set, which means they temp-unvlicker code
	doesn't apply to them.

	* gdk/x11/gdkgeometry-x11.c (_gdk_window_move_resize_child): Unset
	the background of the parent window during resizing. Invalidate
	the uncoered area of the parent window. Bug 341332.
2006-05-15 19:17:30 +00:00
Matthias Clasen
0f133f4f4b New function which can be used to implement scrolling in non-window
2005-06-21  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkgeometry-x11.c (gdk_window_move_region): New
	function which can be used to implement scrolling in
	non-window widgets.  (#135165, Søren Sandmann)
2005-06-21 04:09:52 +00:00
Matthias Clasen
2a2d769d42 Make PLT-reduction work with gcc4, and don't include everything in
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-03-16 03:17:27 +00:00
Matthias Clasen
0742ff3ae3 Add hidden aliases for exported symbols which are used internally in order
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
2004-08-09 20:14:43 +00:00
Soeren Sandmann
69ab514aef Bug 113310.
Sat Jul 10 00:37:45 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Bug 113310.

	* gdk/x11/gdkwindow-x11.c (_gdk_x11_window_tmp_{un|re}set_bg):
	New functions that can do a recursive unset/reset bg.

	* gdk/x11/gdkgeometry-x11.c: Remove
	gdk_window_tmp_{un|re}set_bg().

	* gdk/x11/gdkwindow-x11.c (pre_unmap, post_unmap): New functions
	called before and after unmapping a window. They unset the
	background of all other windows to prevent flicker from the X
	server repainting the background. post_unmap() also invalidates
	the parent of the unmapped window to draw it without roundtrips.

	* gdk/x11/gdkwindow-x11.c (show_window_internal): Unset
	background of newly mapped windows and all desendants to prevent
	flicker.
2004-07-09 22:44:35 +00:00
Matthias Clasen
db167a4a5f Make static.
2004-05-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.c (singlehead_...):
	* gdk/x11/gdkkeys-x11.c (get_effective_keymap):
	* gdk/x11/gdkgeometry-x11.c (expose_serial_predicate):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Make static.
2004-05-10 20:51:19 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
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>
2004-03-06 03:38:59 +00:00