Commit Graph

178 Commits

Author SHA1 Message Date
Carlos Garnacho
f5a20ab65a Add gdk_event_[gs]et_source_device().
This function may be used to know the hardware device that triggered
an event, it could resort to the master device in the few cases there's
not a direct hardware device to relate to the event (i.e.: crossing events
due to grabs)
2010-12-15 03:17:58 +01:00
Benjamin Otte
3494f87a10 API: Remove GdkNoExposeEvent
It's not used by anyone and not supported by any backend but X11.
2010-12-02 20:21:04 +01: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
3e6a4af6d3 x11: _gdk_x11_drawable_update_size() => _gdk_x11_window_update_size() 2010-12-02 20:17:27 +01:00
Benjamin Otte
3b8aea389d x11: Use window macros instead of drawable macros
GDK_WINDOW_XID() instead of GDK_DRAWABLE_XID()
GDK_WINDOW_XDISPLAY() instead of GDK_DRAWABLE_XDISPLAY()
2010-12-02 20:17:27 +01:00
Milan Bouchet-Valat
2e3935ba9d Fix missing (transfer) annotations in GDK
Mostly missing (transfer none).
2010-11-24 21:37:20 +01:00
Michael Natterer
fb5dd9f72f Move all GdkDevice members to private and add one missing accessor 2010-11-23 20:25:13 +01:00
Ryan Lortie
8cca398a2f Gdk X11: Add setter for startup notify ID
For launch requests coming in over DBus.
2010-10-18 17:21:22 +02: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
Matthias Clasen
448d903c16 GDK docs: improve the gdk_x11_display_error_trap_push docs 2010-10-01 08:16:38 -04:00
Matthias Clasen
59bc9e8860 Fix an off-by-one error in serial range handling
trap->end_sequence is the first serial for which we don't
ignore errors anymore, so we know the trap is dead if
end_sequence <= processed_serial.

Bug 629608
2010-09-21 21:10:15 -04:00
Owen W. Taylor
93e203e067 Use g_warning() for X errors and X IO errors
Currently fprintf(stderr, ...) is used for X error and X IO errors
(unless compiled with debugging, in which case g_error() is used for
X errors.)

But if an application is redirecting log messages, we really want
X errors to appear in that same log, so it's better to use a g_logv()
variant.

Though g_warning() isn't really appropriate for "lost connection to the
server", G_LOG_LEVEL_INFO isn't part of the "prefixed log levels"
so will produce output without the application name and PID.

https://bugzilla.gnome.org/show_bug.cgi?id=630216
2010-09-21 00:30:46 -04:00
Matthias Clasen
2ddfaeddad More error trap cleanups
Remove syncs in front of gdk_error_trap_pop() calls, and convert
gdk_error_trap_pop() calls to gdk_error_trap_pop_ignored() in gdk.
2010-09-20 16:40:14 -04:00
Owen W. Taylor
14e38da150 Only store error codes in inner-most X error trap
When an error occurs with nested traps in place, only the innermost
trap should have the error code stored in it; outer traps are
shielded by the inner trap.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-20 16:35:41 -04:00
Havoc Pennington
e32ab82069 Improve tests for X error traps, fix two bugs
* don't lose track of previous X error handler
  if nested traps are pushed
* free any remaining traps when display
  is finalized

Test will fail unless bug 630032 is closed so
gdk_display_close() works.

https://bugzilla.gnome.org/show_bug.cgi?id=630033
2010-09-18 23:03:31 -04:00
Havoc Pennington
c7d73ee587 Fix bugs that crashed gdk_display_close() on x11
* _gdk_device_set_associated_device() did not allow NULL device
* GdkDisplay should dispose device manager to avoid devices
  trying to touch the display in finalize
* GdkDeviceManagerXI did not ref devices in id hash
* GdkDisplayX11 did not ref devices in ->input_devices
2010-09-18 22:57:36 -04:00
Havoc Pennington
b837ef5a6d Revamp and modernize X error traps
* add per-display gdk_x11_display_error_trap_push()
  (X11-specific because gdk_error_trap_push() probably
  should have been)
* make gdk_error_trap_push() handle only GDK displays
  not displays opened without a GDK wrapper
* make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop()
  automatically sync only if needed, so manual gdk_flush() is not
  required
* add gdk_error_trap_pop_ignored() which just asynchronously
  ignores errors, so never needs to sync
* add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because
  if you use plain pop() and don't need the return value,
  the async gdk_error_trap_pop_ignored() should be used
  instead. This results in lots of warnings to clean
  up in a later patch.

The main objective here was to avoid the need to sync just
to ignore an error. Now, syncing is automatic, and only
happens when we need to know the error code.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 18:19:27 -04:00
Matthias Clasen
6aa8941b84 Add annotations
The goi scanner warns about these nowadays.
2010-09-17 00:18:20 -04:00
Matthias Clasen
0dcaad3a85 Drop the gdk_display variable from gdk
This was the last exported variable; it wasn't multihead safe,
and there's easy replacement with gdk_display_get_default().
Also drop the GDK_DISPLAY() macro which was just a wrapper around
the variable.
2010-09-09 19:46:41 -04:00
Benjamin Otte
8868e77fa0 x11: Remove display_x11->have_render
Also remove setters and getters for the variable and the GdkTristate
enum, as it's the only place where it was used.
2010-08-10 21:02:30 +02:00
Benjamin Otte
14fe04ec89 API: remove GdkImage
It was unused and buggy.
2010-08-10 21:02:26 +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
Javier Jardón
d6bacafc52 [docs] Use the correct gtk-doc notation
Use 'Deprecated: 3.0:' intead 'Deprecated: 3.0.'
2010-05-27 15:37:19 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Matthias Clasen
eff1fe2500 Make the !xkb build survive a little longer
This fixes bug 619114.
2010-05-21 12:13:05 -04:00
Matthias Clasen
69aa7a6392 Make DND work better with shaped windows
If mouse clicks go through, drag-and-drop should too...
Fixes bug 608615.
2010-02-04 19:18:22 -05:00
Michael Meeks
db88f084bc fix race between fetching owner of composit selection, and
registering as a listener for changes; bug#594913
2009-09-14 15:33:59 +01:00
Matthias Clasen
8f16541d93 Fix gdk_display_beep
Since XBell() seems broken, just call XkbBell().
2009-09-13 23:16:44 -04: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
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
Alexander Larsson
26cbf87d7d New approach for grab tracking code
We try to track the exact grab state, i.e. whats valid on the client
now and whats comming soon via the xserver roundtrip (and when).
2009-04-02 10:15:30 +02:00
Alexander Larsson
016c5fd081 Track pointer grabs on Xserver time
After a successful grab/ungrab we wait for an xserver
roundtrip until we change the tracked grab in GdkDisplay.
This way that data is always up-to-date wrt events comming in.
2009-04-02 10:15:27 +02:00
Alexander Larsson
e24c9e291d Switch motion hint emulation to be serial based.
For backends not supporting serials, just have
_gdk_windowing_window_get_next_serial return zero.
2009-04-02 10:15:26 +02:00
Alexander Larsson
290de401a5 Move keyboard grab state tracking code to common code 2009-04-02 10:15:26 +02:00
Alexander Larsson
e60af9d315 Move keyboard grab info to common code
This is the first stage in tracking keyboard grabs in the common code.
This lets us handle destroying or unmapping virtual window with a
keyboard grab.
2009-04-02 10:15:26 +02:00
Alexander Larsson
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
Matthias Clasen
e86a6ddd60 Register randr events
svn path=/trunk/; revision=22328
2009-02-13 22:15:23 +00:00
Matthias Clasen
2e67143e3b Check for Xrandr 1.3
* configure.in: Check for Xrandr 1.3

        * gdk/x11/gdkdisplay-x11.[ch]: Rename have_randr12 to have_randr13
        and set if if we have randr 1.3

        * gdk/x11/gdkscreen-x11.c: Go back to using randr for monitor
        information, if we have XRRGetScreenResourcesCurrent.


svn path=/trunk/; revision=22327
2009-02-13 18:12:57 +00:00
Matthias Clasen
1cba7387ce Cache cursors to avoid libXcursor theme lookup overhead.
Patch by David Alan Gilbert.

        * gdk/gdkcursor.h: Add a GDK_BLANK_CURSOR cursor type.

        * gdk/x11/gdkcursor-x11.c: Cache font cursors and named cursors.

        * gdk/x11/gdkprivate-x11.h:
        * gdk/x11/gdkcdisplay-x11.c: Remove cached cursors when a
        display if finalized.


svn path=/trunk/; revision=22145
2009-01-20 02:15:59 +00:00
Matthias Clasen
7b30a1589d Initialize the XAtom cache earlier. Patch by Christian Persch
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Initialize the
        XAtom cache earlier. Patch by Christian Persch


svn path=/trunk/; revision=21880
2008-12-13 05:33:14 +00:00
Behdad Esfahbod
49ef054981 Bug 563547 – Update gdkx11 atom precache table
2008-12-07  Behdad Esfahbod  <behdad@gnome.org>

        Bug 563547 – Update gdkx11 atom precache table

        * gdk/x11/gdkdisplay-x11.c: Add more atoms to precache.


svn path=/trunk/; revision=21849
2008-12-08 00:01:29 +00:00
Christian Dywan
d494aa7203 Bug 559622 – GdkDevice test segfaults
2008-11-30  Christian Dywan  <christian@imendio.com>

	Bug 559622 – GdkDevice test segfaults

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose):
	* gdk/x11/gdkinput.c (gdk_device_class_init), (gdk_device_dispose):
	Free and reset device in dispose. Patch by Michael Natterer and myself.

svn path=/trunk/; revision=21834
2008-11-30 05:33:57 +00:00
Matthias Clasen
859aaf903d Bug 107000 – Add signals to GdkKeymap for monitoring caps_lock, etc.
2008-09-29  Matthias Clasen  <mclasen@redhat.com>

        Bug 107000 – Add signals to GdkKeymap for monitoring caps_lock, etc.

        * gdk/gdk.symbols:
        * gdk/gdkkeys.[ch]: Add a new GdkKeymap::state-changed signal, and
        a gdk_keymap_get_caps_lock_state function.

        * gdk/x11/gdkkeys-x11.c: Implement it here. For now, only emit
        state-changed when caps lock lockedness changes.

        * gdk/x11/gdkdisplay-x11.c: Also select for modifier lock status
        changes in the XkbSelectEventDetails call.


svn path=/trunk/; revision=21545
2008-09-29 20:40:45 +00:00
Matthias Clasen
1a962664ee Bug 552956 – Should check composite extension version
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 552956 – Should check composite extension version

        * gdk/x11/gdkdisplay-x11.c: Check that the version of the
        composite extension is at least 0.4.
        Patch by Owen Taylor


svn path=/trunk/; revision=21530
2008-09-27 03:43:50 +00:00
Matthias Clasen
abe8d89fd9 Bug 553803 – eventually call XCloseDevice on XOpenDevice results
* gdk/x11/gdkinput.c: Add a finalize function for device objects,
        and call XCloseDevice there.

        * gdk/x11/gdkinput-x11.c:
        * gdk/x11/gdkdisplay-x11.c: Move freeing of device objects to
        the finalize function.
        Patch by Caolan McNamara


svn path=/trunk/; revision=21529
2008-09-27 00:47:45 +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
Michael Natterer
8243e3d415 gdk/gdkdisplay.h gdk/gdkdrawable.h gdk/gdkevents.h gdk/gdkpango.h
2008-01-15  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkdisplay.h
	* gdk/gdkdrawable.h
	* gdk/gdkevents.h
	* gdk/gdkpango.h
	* gdk/gdkregion.h
	* gdk/gdkrgb.h
	* gdk/gdkwindow.h: made more struct pointer and array parameters
	const. GDK should now be constified as far as possible without
	breaking source compatibility. Includes some minor cleanup like
	indentation and s/nfoo/n_foo/ (bug #508544).

	* gdk/gdkdisplay.c
	* gdk/gdkdraw.c
	* gdk/gdkevents.c
	* gdk/gdkpango.c
	* gdk/gdkregion-generic.c
	* gdk/gdkrgb.c
	* gdk/directfb/gdkdisplay-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkdisplay-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkdisplay-x11.c
	* gdk/x11/gdkwindow-x11.c: changed accordingly.


svn path=/trunk/; revision=19372
2008-01-15 15:32:37 +00:00
Søren Sandmann
053cbe6daf Add RandR 1.2 support
Thu Dec 13 13:14:50 2007  Søren Sandmann  <sandmann@redhat.com>

        * Add RandR 1.2 support

        - New monitors_changed signal - New API to get width/height of
          monitors, and the name of the plug



svn path=/trunk/; revision=19173
2007-12-13 18:27:05 +00:00
Tim Janik
e7525262bd applied patch from Mark Tiefenbruck to add missing return_if_fail,
Fri Jun 22 00:34:34 2007  Tim Janik  <timj@gtk.org>

        * gdk/x11/gdkdisplay-x11.c (gdk_x11_display_get_xdisplay): applied
        patch from Mark Tiefenbruck to add missing return_if_fail, #449862.



svn path=/trunk/; revision=18215
2007-06-21 22:37:21 +00:00
Matthias Clasen
885ba04648 Add support for composited child windows. (#412882, Ryan Lortie)
2007-06-01  Matthias Clasen  <mclasen@redhat.com>

        Add support for composited child windows.  (#412882, Ryan Lortie)

        * gdk/gdk.symbols:
        * gdk/gdkdisplay.h:
        * gdk/gdkinternals.h:
        * gdk/gdkwindow.[hc]: Add gdk_display_supports_composite() and
        gdk_window_set_composited().

        * gdk/x11/gdkevents-x11.c:
        * gdk/x11/gdkdisplay-x11.[hc]:
        * gdk/x11/gdkwindow-x11.[hc]: X11 implementation.

        * gdk/win32/gdkdisplay-win32.c:
        * gdk/win32/gdkwindow-win32.c: Dummy win32 implementration.

        * gdk/quartz/gdkdisplay-quartz.c:
        * gdk/quartz/gdkwindow-quartz.c: Dummy Quartz implementation.

        * gdk/directfb/gdkdisplay-directfb.c:
        * gdk/directfb/gdkwindow-directfb.c: Dummy DirectFB implementation.

        * tests/testgtk.c: Add a "composited window" test.


svn path=/trunk/; revision=18004
2007-06-01 12:16:12 +00:00
Matthias Clasen
73456d9412 Update docs
svn path=/trunk/; revision=17942
2007-05-26 20:50:34 +00:00
Dan Winship
0d2678417c New method to marshall and send a Startup Notification message. (from
* gdk/x11/gdkdisplay-x11.c
	(gdk_x11_display_broadcast_startup_message): New method to
	marshall and send a Startup Notification message. (from #415070)
	(gdk_notify_startup_complete_with_id): Use that

svn path=/trunk/; revision=17710
2007-04-29 18:13:42 +00:00
Emmanuele Bassi
87c28d778a Apply patch by Vytautas Liuolia for changing the startup notification id
2007-03-13  Emmanuele Bassi  <ebassi@gnome.org>

	Apply patch by Vytautas Liuolia for changing the startup
	notification id on a window in the X11 backend. (#347375)

	* gdk/gdk.h:
	* gdk/gdkx.h:
	* gdk/x11/gdkdisplay-x11.c: Add gdk_notify_startup_complete_wit_id()
	and gdk_x11_display_get_startup_notification_id().

	* gdk/gdkwindow.h:
	* gdk/x11/gdkwindow-x11.c: Add gdk_window_set_startup_id().

	* gtk/gtkwindow.h:
	* gtk/gtkwindow.c: Add gtk_window_set_startup_id(), used to
	change the startup notification id.
	
	(gtk_window_class_init), (gtk_window_init),
	(gtk_window_set_property): Add write-only "startup-id" property
	to GtkWindow.

	(gtk_window_realize): Set the startup notification id
	on a GtkWindow if it's valid.

	(gtk_window_map): If we have another valid startup notification
	id then finish the notification process.

svn path=/trunk/; revision=17508
2007-03-13 17:03:54 +00:00
Matthias Clasen
1c2718400d Apply a patch by Chris Wilson to avoid spurious valgrind warnings from
2007-01-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/*.c:
        * gdk/x11/*.c: Apply a patch by Chris Wilson to
        avoid spurious valgrind warnings from XSendEvent()
        calls.  (#392532)

svn path=/trunk/; revision=17044
2007-01-04 01:28:07 +00:00
Michael Natterer
e049989bc3 free display->input_windows with g_free(), not g_object_unref() (#357566,
2006-09-25  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): free
	display->input_windows with g_free(), not g_object_unref()
	(#357566, Tommi Komulainen).
2006-09-25 09:58:20 +00:00
Matthias Clasen
03de4627d3 broken pipe 2006-06-28 12:44:30 +00:00
Matthias Clasen
02ed1e9bdb Make GTK+ work as an untrusted X client. (#136571, Ed Catmur)
2006-05-25  Matthias Clasen  <mclasen@redhat.com>

	Make GTK+ work as an untrusted X client. (#136571,
	Ed Catmur)
2006-05-25 05:30:14 +00:00
Matthias Clasen
4c01fbf79c Remove _gdk_x11_screen_request_cm_notification
2006-05-22  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkscreen-x11.c: Remove _gdk_x11_screen_request_cm_notification

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Directly call
	gdk_display_request_selection_notification.

	* gdk/x11/gdkdisplay-x11.c: Several cleanups.
2006-05-22 04:11:42 +00:00
Matthias Clasen
f22387f042 Remove extraneous ; 2006-05-14 03:58:06 +00:00
Søren Sandmann
b9d1a03440 Create 'composited' label.
Tue Apr 25 10:25:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* tests/testgtk.c (create_alpha_window): Create 'composited' label.

	* tests/testgtk.c (on_composited_changed): New function, change
	the label to say whether the screen is composited or not.

	* gtk/gtkwindow.c (gtk_window_on_composited_changed): When
	composited status change, invalidate the window and propagate the signal;.

	* gtk/gtkwindow.c (gtk_window_map): Set the appropriate type hint
	if reset_type_hint is TRUE.

	* gtk/gtkwindow.c (gtk_window_set_type_hint): If hint is one of
	the old hints, store a shadow copy in the public window->type_hint
	bitfield, otherwise set this field to normal. Set the private
	field to the type hint.

	* gtk/gtkwindow.c (gtk_window_init): Initialize priv->type_hint.

	* gtk/gtkwindow.c (struct _GtkWindowPrivate): New field
	"reset_type_hint" indicating whether the type hint needs to be
	reset. New field type_hint containing a GdkWindowTypeHint.

	* gtk/gtkwidget.c (propagate_composited_changed): New function to
	propagate changes in composited status.
	(gtk_widget_class_init): Add composited_changed signal.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): New signal composited-changed.

	* gtk/gtkwidget.c (gtk_widget_is_composited): New function.

	* gtk/gtktooltips.c (gtk_tooltips_draw_tips): Set transient for.

	* gtk/gtktooltips.c (gtk_tooltips_force_window): Set the type hint

	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Compute whether
	the item belongs to a menubar. Set the type_hint appropriately
	depending on the outcome.

	* gtk/gtkmenu.c (gtk_menu_position): Set the default type hint here.

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): connect to hierarchy
	changed on the attach widget.

	* gtk/gtkmenu.c (attach_widget_hierarchy_changed): New function to
	set the transient_for property for menus.

	* gtk/gtkdnd.c (set_icon_stock_pixbuf): Set the appropriate type hint.

	* gtk/gtkcombo.c (gtk_combo_popup_list): Make the popup window
	transient for the toplevel.

	* gtk/gtkcombobox.c (gtk_combo_box_set_popup_widget): Set
	transient-for, for the popup window.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): Support for
	new window types.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_type_hint): Add support
	for new window types.

	* gdk/x11/gdkscreen-x11.c (_gdk_x11_screen_process_owner_change):
	New function called whenever the compositing manager comes and goes.

	* gdk/x11/gdkscreen-x11.c (gdk_screen_is_composited): New function.

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_request_cm_notification, make_cm_atom,
	check_is_composited): New functions

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
	_gdk_x11_screen_process_owner_change when an
	XFixesSelectionNotifyEvent is received.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Call
	_gdk_x11_screen_request_cm_notification() on all screens.

	* gdk/quartz/gdkscreen-quartz.c (gdk_screen_is_composited): Dummy
	implementation.

	* gdk/gdkscreen.c (gdk_screen_class_init): New signal,
	'composited-changed'.

	* gdk/gdkwindow.h: Add new EWMH window types.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_is_composited)
2006-04-25 14:27:32 +00:00
Matthias Clasen
10f0736ac7 Use G_DEFINE_TYPE.
2006-04-04  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.c:
	* gdk/gdkdisplaymanager.c:
	* gdk/gdkdraw.c:
	* gdk/gdkkeys.c:
	* gdk/gdkpixmap.c:
	* gdk/gdkscreen.c:
	* gdk/gdkwindow.c:
	* gdk/x11/gdkcolor-x11.c:
	* gdk/x11/gdkdisplay-x11.c:
	* gdk/x11/gdkdnd-x11.c:
	* gdk/x11/gdkdrawable-x11.c:
	* gdk/x11/gdkgc-x11.c:
	* gdk/x11/gdkimage-x11.c:
	* gdk/x11/gdkinput.c:
	* gdk/x11/gdkpixmap-x11.c:
	* gdk/x11/gdkscreen-x11.c:
	* gdk/x11/gdkwindow-x11.c: Use G_DEFINE_TYPE.

	* gdk/x11/gdkcolor-x11.c:
	* gdk/x11/gdkdnd-x11.c:
	* gdk/x11/gdkimage-x11.c: Use instance private data.
2006-04-04 14:02:03 +00:00
Matthias Clasen
1ad93a683b Support input shapes: (#331070)
2006-02-19  Matthias Clasen  <mclasen@redhat.com>

	Support input shapes:  (#331070)

	* gdk/gdk.symbols:
	* gdk/gdkdisplay.h:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_supports_shapes)
	(gdk_display_supports_input_shapes): Functions to determine
	if a display supports shaped windows or input shapes.

	* gdk/x11/gdkwindow-x11.c (gdk_window_input_shape_combine_region):
	(gdk_window_input_shape_combine_mask):
	(gdk_window_set_child_input_shapes):
	(gdk_window_merge_child_input_shapes): Input shape versions
	of the window shape API.

	* gtk/gtk.symbols:
	* gtk/gtkwidget.h:
	* gtk/gtkwidget.c (gtk_widget_input_shape_combine_mask):
	New function to set an input shape on a widget.
2006-02-20 01:36:50 +00:00
Matthias Clasen
165b7ad3d3 Precache atoms before calling gdk_window_new().
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Precache atoms
	before calling gdk_window_new().
2005-12-27 04:38:31 +00:00
Michael Natterer
6e802acd48 new internal function which destroys the display's event source. Also
2005-11-16  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
	function which destroys the display's event source. Also removes
	the source from the global display_sources list and unrefs it.

	* gdk/x11/gdkprivate-x11.h: declare the function.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
	instead of half-destroying the source here.
2005-11-16 12:36:22 +00:00
Michael Natterer
1500848841 destroy display->xid_ht as late as possible (right before XCloseDisplay)
2005-11-15  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy
	display->xid_ht as late as possible (right before XCloseDisplay)
	because it still needs to be around when the display's screens are
	finalized. (#85715)
2005-11-15 14:42:48 +00:00
Michael Natterer
8bdc0bf97c Applied patch from maemo-gtk that addresses many issues wrt display
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-11-10 12:09:42 +00:00
Matthias Clasen
cd63ed1eb4 *** empty log message *** 2005-09-20 05:28:34 +00:00
Matthias Clasen
1f700be359 Broken pipe 2005-09-11 05:40:51 +00:00
Matthias Clasen
476e138db0 Intern type names before registering the type to avoid unnecessary copies.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_type):
	* gdk/x11/gdkscreen-x11.c (_gdk_screen_x11_get_type):
	* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_impl_x11_get_type):
	* gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_get_type):
	* gdk/x11/gdkinput.c (gdk_device_get_type):
	* gdk/x11/gdkimage-x11.c (gdk_image_get_type):
	* gdk/x11/gdkgc-x11.c (_gdk_gc_x11_get_type):
	* gdk/x11/gdkdrawable-x11.c (_gdk_drawable_impl_x11_get_type):
	* gdk/x11/gdkdnd-x11.c (gdk_drag_context_get_type):
	* gdk/x11/gdkdisplay-x11.c (_gdk_display_x11_get_type):
	* gdk/x11/gdkcolor-x11.c (gdk_colormap_get_type):
	* gdk/gdkwindow.c (gdk_window_object_get_type):
	* gdk/gdkscreen.c (gdk_screen_get_type):
	* gdk/gdkrectangle.c (gdk_rectangle_get_type):
	* gdk/gdkpixmap.c (gdk_pixmap_get_type):
	* gdk/gdkkeys.c (gdk_keymap_get_type):
	* gdk/gdkfont.c (gdk_font_get_type):
	* gdk/gdkevents.c (gdk_event_get_type):
	* gdk/gdkdraw.c (gdk_drawable_get_type):
	* gdk/gdkdisplaymanager.c (gdk_display_manager_get_type):
	* gdk/gdkdisplay.c (gdk_display_get_type):
	* gdk/gdkcursor.c (gdk_cursor_get_type):
	* gdk/gdkcolor.c (gdk_color_get_type): Intern type names before
	registering the type to avoid unnecessary copies.
2005-08-31 15:14:26 +00:00
Matthias Clasen
87cafe5b4b Handle broken grabs.
2005-06-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbutton.c (gtk_button_grab_broken): Handle broken
        grabs.

        * gtk/gtkrange.c (gtk_range_grab_broken): Handle broken
        grabs.

        * gdk/gdkevents.h: Add a boolean to specify wether the broken
        grab was implicit.

        * gdk/x11/gdkdisplay-x11.c (gdk_display_pointer_is_grabbed):
        As the documentation states, don't return TRUE for
        implicit grabs.

        * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
        a boolean field to store wether a pointer grab is implicit.

        * gdk/x11/gdkmain-x11.c (_gdk_xgrab_check_button_event):
        Track implicit grabs.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
        _gdk_xgrab_check_button_event for button events.
2005-06-30 03:35:30 +00:00
Matthias Clasen
c719b4bf3d Avoid a segfault. (#309054)
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* modules/input/gtkimcontextxim.c (gtk_im_context_xim_finalize):
	Avoid a segfault. (#309054)

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
	fields for grab timestamps.

	* gdk/x11/gdkmain-x11.c (gdk_pointer_grab, gdk_keyboard_grab):
	Store grab timestamps when grabbing.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_keyboard_ungrab)
	(gdk_display_pointer_ungrab): Don't unset the grab_window
	if the timestamps indicate that the ungrab will fails.
2005-06-27 18:37:41 +00:00
Owen Taylor
09d7eafb15 Switch set_cairo_target() virtual function to ref_cairo_surface()
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-17 01:54:40 +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
1d0c7ea1bb Fix many instances of "the the" in docs and comments. (#165815, Masao
2005-02-01  Matthias Clasen  <mclasen@redhat.com>

	* */*.c: Fix many instances of "the the" in docs and
	comments.  (#165815, Masao Mutoh)
2005-02-01 18:15:09 +00:00
Matthias Clasen
06a19ba693 Initialize user_time from DESKTOP_STARTUP_ID. (#165131, Elijah Newren)
2005-01-24  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdisplay-x11.c (_gdk_windowing_set_default_display):
	Initialize user_time from DESKTOP_STARTUP_ID.  (#165131,
	Elijah Newren)
2005-01-25 04:02:55 +00:00
Matthias Clasen
fbe8255db6 Precache the _NET_VIRTUAL_ROOTS atom.
2005-01-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdisplay-x11.c: Precache the _NET_VIRTUAL_ROOTS
	atom.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
	Support _NET_VIRTUAL_ROOTS.  (#163910, Carsten Haitzler)
2005-01-19 19:53:12 +00:00
Matthias Clasen
56e0ee04fc Add a function to obtain the last user interaction time. (#163119, Elijah
2005-01-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_get_user_time):
	Add a function to obtain the last user interaction
	time.  (#163119, Elijah Newren)
2005-01-19 14:37:56 +00:00
Matthias Clasen
014a347f00 Avoid X errors when running against servers which implement XRender < 0.4.
2005-01-18  Matthias Clasen  <mclasen@redhat.com>

	Avoid X errors when running against servers which
	implement XRender < 0.4.  (#164427, Albert Chin)

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids):
	New function to check for trapezoid support in XRender.
	(gdk_x11_draw_trapezoids, _gdk_x11_drawable_draw_xtrapezoids):
	Use it here.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a
	separate have_render_with_trapezoids field.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Initialize it.
2005-01-18 15:19:53 +00:00
Matthias Clasen
d5f92150d4 Fix many sparse warnings. 2004-10-28 15:00:05 +00:00
Matthias Clasen
4817eb2c1e Documentation fixes. 2004-10-26 17:35:41 +00:00
Anders Carlsson
06c4bb44b1 New API to handle the clipboard manager.
2004-10-25  Anders Carlsson  <andersca@imendio.com>

	* gdk/gdk.symbols:
	* gdk/gdkdisplay.h:
	* gdk/x11/gdkdisplay-x11.c:
	(gdk_display_supports_clipboard_persistence),
	(gdk_display_store_clipboard):
	New API to handle the clipboard manager.

	* gtk/gtk.symbols:
	* gtk/gtkclipboard.c: (gtk_clipboard_class_init),
	(gtk_clipboard_finalize), (selection_clear_event_cb),
	(clipboard_unset), (gtk_clipboard_set_text),
	(gtk_clipboard_request_targets), (gtk_clipboard_wait_for_targets),
	(clipboard_peek), (gtk_clipboard_owner_change),
	(gtk_clipboard_wait_is_target_available),
	(gtk_clipboard_store_timeout), (gtk_clipboard_set_can_store),
	(gtk_clipboard_selection_notify), (gtk_clipboard_store),
	(_gtk_clipboard_store_all):
	* gtk/gtkclipboard.h:
	Add API for clipboard persistence and implement it, also add
	gtk_clipboard_wait_is_target_available.

	* gtk/gtkmain.c: (gtk_main):
	Call _gtk_clipboard_store_all before exiting.
2004-10-25 18:53:30 +00:00
Matthias Clasen
1a8e3a7020 Fix #155658, Sebastian Bacher:
2004-10-18  Matthias Clasen  <mclasen@redhat.com>

	Fix #155658, Sebastian Bacher:

	* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Add a new
	is_leader flag.

	* gdk/x11/gdkwindow-x11.c (update_wm_hints): Set wm hints on
	leader windows even if they are withdrawn.
	(gdk_window_set_group): Mark the new leader window as such. We
	never remove the flag again, but that should a) be vanishingly
	rare and b) not a problem, since the flag just turns off an
	optimization.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Mark the default
	leader window as such.
2004-10-18 21:02:37 +00:00
Anders Carlsson
04d65a6d3d Make gtk argument parsing use goption. Add gtk_get_option_group and
2004-09-05  Anders Carlsson  <andersca@gnome.org>

	* gdk/gdk.c: (gdk_arg_class_cb), (gdk_arg_name_cb),
	(gdk_add_option_entries_libgtk_only), (gdk_pre_parse_libgtk_only),
	(gdk_parse_args):
	* gdk/gdk.h:
	* gdk/gdkinternals.h:
	* gdk/linux-fb/gdkmain-fb.c: (_gdk_windowing_init):
	* gdk/win32/gdkmain-win32.c: (_gdk_windowing_init):
	* gdk/x11/gdkdisplay-x11.c: (gdk_display_open):
	* gdk/x11/gdkmain-x11.c: (_gdk_windowing_init):
	* gtk/gtkmain.c: (gtk_arg_debug_cb), (gtk_arg_no_debug_cb),
	(gtk_arg_module_cb), (gtk_arg_warnings_cb),
	(do_pre_parse_initialization), (do_post_parse_initialization),
	(pre_parse_hook), (post_parse_hook), (gtk_get_option_group),
	(gtk_init_with_args), (gtk_parse_args):
	* gtk/gtkmain.h:
	Make gtk argument parsing use goption. Add gtk_get_option_group and
	gtk_init_with_args.

	* tests/testtreemodel.c: (main):
	Use gtk_init_with_args.
2004-09-05 15:09:55 +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
1a5e92dd61 Bug 143330, support update counter spec.
Sun Jul 11 15:24:03 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Bug 143330, support update counter spec.

	* configure.in: Add check for the Sync extension

	* gdk/gdkwindow.h: gdk_window_enable_synchronized_configure() and
	gdk_window_configure_finished()

	* gtk/gtkwindow.c (gtk_window_move_resize): Call gdk_window_finish_configure().
	* gtk/gtkwindow.c (gtk_window_realize): Automatically enable
	synchronized configures.

	* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Store current
	and pending counter values.

	* gdk/x11/gdkwindow-x11.c (gdk_window_configure_finished): New function.
	* gdk/x11/gdkwindow-x11.c
	(gdk_window_enable_synchronized_configure): New function.
	* gdk/x11/gdkwindow-x11.c (gdk_toplevel_x11_free_contents):
	Delete update counter.
	* gdk/x11/gdkwindow-x11.c (set_wm_protocols): Advertise
	_NET_WM_SYNC_REQUEST when Sync is available

	* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Handle
	_NET_WM_SYNC_REQUEST messages
	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Save counter
	value for use by gdk_window_configure_finished() when receiving
	ConfigureNotifies.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add use_sync flag
	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Check if the XSync
	extension is available
	* gdk/x11/gdkdisplay-x11.c: Add _NET_WM_SYNC_REQUEST and
	_NET_WM_SYNC_REQUEST_COUNTER to list of supported atoms.

	* gdk/linux-fb/gdkwindow-fb.c, gdk/win32/gdkwindow-win32.c: Add
	stubs for enable_synchronized_configure() and configure_finished()
2004-07-11 13:26:57 +00:00
Manish Singh
b22258e6a6 have a dummy case GDK_OWNER_CHANGE in switch statements to avoid gcc
Fri Jul  9 15:33:55 2004  Manish Singh  <yosh@gimp.org>

        * gdk/gdkevents.c: have a dummy case GDK_OWNER_CHANGE in switch
        statements to avoid gcc warnings about not all enum values handled.

        * gdk/x11/gdkdisplay-x11.c (gdk_display_open): ignore should live in
        #ifdef HAVE_XFIXES.
2004-07-09 22:42:19 +00:00
Matthias Clasen
7b8616bf76 Check for XFIXES extension.
2004-05-18  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Check for XFIXES extension.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
	a gboolean have_xfixes member.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Register
	XFIXES events and set have_xfixes.

	* gdk/gdkevents.h (GdkEventType): Add GDK_OWNER_CHANGE.
	(GdkEventOwnerChange): New event struct for owner change events.
	(GdkOwnerChange): New enum for the reason field of GdkEventOwnerChange.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Translate
	XFixesSelectionNotify events into GdkEventOwnerChange events.

	* gdk/gdkdisplay.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_supports_selection_notification):
	(gdk_display_request_selection_notification): New api
	to support selection ownership notification.

	* gtk/gtkclipboard.h:
	* gtk/gtkclipboard.c (_gtk_clipboard_handle_event): New private
	api to handle owner change events.
	(clipboard_peek): Refactored out the body of
	gtk_clipboard_get_for_display() for use in _gtk_clipboard_handle_event().

	* gtk/gtkmain.c (gtk_main_do_event): Handle GDK_OWNER_CHANGE events
	by calling _gtk_clipboard_handle_event().
2004-05-18 20:56:54 +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
Soeren Sandmann
730da6f84c Support for _NET_WM_USER_TIME (bug 115650). Patch by Elijah Newren.
Sun Apr 18 16:15:15 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Support for _NET_WM_USER_TIME (bug 115650). Patch by Elijah
	Newren.

	* gdk/x11/gdkwindow-x11.[ch]: Add new internal function
	_gdk_x11_set_user_time() to set the _NET_WM_USER_TIME property.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add user_time field

	* gdk/x11/gdkdisplay-x11.c: Add _NET_WM_USER_TIME to list of
	precached atoms.

	* gdk/x11/gdkinput-x11.c, gdk/x11/gdkevents-x11.c: Set the
	property on user interaction.
2004-04-18 14:33:07 +00:00
Soeren Sandmann
d9d3cf5eda Assume gravity works. (Anything else we have to take our chances with).
Mon Feb  2 19:04:17 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkwindow-x11.c: Assume gravity works. (Anything else
	we have to take our chances with).

	(Bug 97510)
2004-02-02 18:18:18 +00:00
Matthias Clasen
3f6441ea3a Improve the GDK API for dealing with group leaders (#119375):
Wed Dec 10 00:06:24 2003  Matthias Clasen  <maclas@gmx.de>

	Improve the GDK API for dealing with group leaders (#119375):

	* gdk/gdkwindow.h:
	* gdk/x11/gdkwindow-x11.c (gdk_window_get_group): New function to
	get the group leader of a toplevel window as a GdkWindow.

	* gdk/gdkdisplay.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_display_get_default_group): New
	function to get the default group leader as a GdkWindow.

	* gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a field for
	the GdkWindow of the default group leader.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Construct the GdkWindow
	for the default group leader.
2003-12-09 23:12:53 +00:00
Matthias Clasen
0df78ed774 Use g_setenv() instead of putenv(). 2003-08-02 21:35:44 +00:00
Owen Taylor
88c1c94651 Requires glib-2.3.0, pango-1.2.0.
Sat Aug  2 12:53:16 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Requires glib-2.3.0, pango-1.2.0.

        * configure.in: Require Xft version 2,
        remove code for handling older versions of pango and Xft.
        Many miscellaneous improvements to X checks

        * acinclude.m4: Add GTK_ADD_LIB() macro for adding
        a library to a variable, avoiding dups.

        * gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
        Always load "fixed"

        * gdk/x11/gdk*-x11.[ch]: Remove support for Xft1 and
        for pangox.
2003-08-02 17:50:09 +00:00
Owen Taylor
50da0ae808 gdk/x11/gdkevents-x11.c (get_real_window) gdk/x11/gdkinput-x11.c
Tue Jul  8 20:11:04 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (get_real_window)
        gdk/x11/gdkinput-x11.c (_gdk_input_common_init)
        gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init)
        gdk/x11/gdkprivate-x11.h (_gdk_windowing_image_init)
        Don't assume that all events start with XEventAny - Xkb events
        don't! (#105745). So, only do that for core events, and for
        non-core events, add a system for registering event types
        that start with XEventAny.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate):
        Check to see if the result of gdk_window_lookup_for_display()
        is actually a window.
2003-07-11 19:57:01 +00:00
Owen Taylor
e5561940f2 Move the grabs up earlier, so we don't get a big pile of uncompressed
Sat Jul  5 00:49:32 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c (gtk_drag_begin): Move the grabs up
        earlier, so we don't get a big pile of uncompressed
        motion events before the grab takes effect.

        * gtk/gtkdnd.c (gtk_drag_update_icon): Call
        gdk_window_process_all_updates() so that the area
        we are dragging over gets a change to redraw.

        * gtk/gtkdnd.c (_gtk_drag_dest_handle_event): Use
        gdk_window_get_position(), not gdk_window_get_origin().

        * gdk/x11/gdkwindow-x11.[ch] (gdk_window_have_shape_ext)
        gdkdisplay-x11.h: use XShapeQueryExtension to
        avoid duplicate XQueryExtension when we actually
        use it. Remove unnecessary caching in GdkDisplayX11.
2003-07-05 05:27:11 +00:00
Owen Taylor
9bedbf662d Use asynchronously _gdk_x11_set_input_focus_safe to avoid having to trap
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.
2003-07-05 01:54:05 +00:00
Matthias Clasen
83c626bbe0 Remove dubious bitfields of unspecified signedness. (#112919, Morten
2003-05-27  Matthias Clasen  <maclas@gmx.de>

	* io-wbmp.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)gdk-p

	* gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances
	of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)

	* gtk/gtkwindow-decorate.c:
	* gtk/gtktreeprivate.h:
	* gtk/gtkdnd.c:
	* gdk/win32/gdkwindow-win32.h:
	* gdk/linux-fb/gdkprivate-fb.h:
	* gdk/linux-fb/gdkkeyboard-fb.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)

	* gtk/queryimmodules.c (escape_string):
	* gtk/gtktextbtree.c (_gtk_text_btree_get_text):
	* gtk/gtksettings.c (_gtk_settings_parse_convert):
	* gtk/gtkrc.c (gtk_rc_parse_assignment):
	* gtk/gtkinputdialog.c (gtk_input_dialog_set_key):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all
	occurances of g_string_new ("") by g_string_new (NULL). (#106975,
	Morten Welinder)
2003-05-27 21:21:00 +00:00
Owen Taylor
ef6053684b Comprehensively zero all unused parts of client messages (Mainly Motif DND
Tue May 20 15:09:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c gdk/x11/gdkwindow-x11.c: Comprehensively
        zero all unused parts of client messages (Mainly Motif DND
        and EWMH). Also, fix a couple places where we were putting
        contents into Motif DND messages that didn't belong.
        (#113361, EWMH problem reported by Lubos Lunak)

        * gtk/gtkselection.c (_gtk_selection_request): Handle the
        case where the property type for the multiple atoms is
        ATOM_PAIR by doing the conversions ourselve. This is
        needed for Xt inter-operation.
2003-05-20 21:01:08 +00:00
Owen Taylor
dd6426b51e Calling XFlush() after ungrabbing, to avoid problems if the app
Mon Apr 21 15:07:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (gdk_display_keyboard/pointer_ungrab):
        Calling XFlush() after ungrabbing, to avoid problems if
        the app subsequently blocks on a long-running operation.
        (#106520, reported by Rajkumar Siva)
2003-04-21 19:11:45 +00:00
Owen Taylor
ac2ef34988 Check for XAddConnectionWatch()/X11R6, and if found, disable XIM and use
Fri Apr 18 16:31:49 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in gdk/x11/gdkdisplay-x11.c modules/input/Makefile.am:
        Check for XAddConnectionWatch()/X11R6, and if found, disable XIM and
        use of XAddConnectionWatch. Remove --enable-xim config option.
        Should fix building on X11R6 (#110523, Albert Chin
2003-04-18 20:53:37 +00:00