Commit Graph

933 Commits

Author SHA1 Message Date
Michael Natterer
d953ce8775 Make gtk_widget_set_extension_events() work on already realized widgets
2007-03-14  Michael Natterer  <mitch@imendio.com>

	Make gtk_widget_set_extension_events() work on already realized
	widgets (bug #379550, Tommi Komulainen)

	* gdk/x11/gdkinput.c (gdk_input_set_extension_events): allow to be
	called multiple times without leaking and work correctly when
	already realized (don't rely on a configure event following).

	* gtk/gtkwidget.c (gtk_widget_set_extension_events_internal): new
	internal function which walks the GdkWindow tree and sets the
	extension events on all windows that belong to the widget.

	(gtk_widget_realize)
	(gtk_widget_set_extension_events): use the new function.


svn path=/trunk/; revision=17515
2007-03-14 13:55:12 +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
abaed38888 Doc improvements
svn path=/trunk/; revision=17496
2007-03-12 06:26:34 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Matthias Clasen
3eb22a1ff8 Defer the callbacks to an idle to avoid deadlock with xcb-ified libX11.
2007-03-08  Matthias Clasen <mclasen@redhat.com>

        * gdk/x11/gdkasync.c (send_event_handler): Defer the callbacks
        to an idle to avoid deadlock with xcb-ified libX11.  (#413032,
        Sebastian Dröge)



svn path=/trunk/; revision=17436
2007-03-09 05:28:00 +00:00
Matthias Clasen
e4b166722c Be more careful when checking for ButtonRelease events that end implicit
2007-02-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdmain-x11.c (_gdk_xgrab_check_button_event): Be more
        careful when checking for ButtonRelease events that end implicit
        grabs.  (#386618, Christof Krüger)



svn path=/trunk/; revision=17304
2007-02-16 04:01:50 +00:00
Matthias Clasen
1a2274e7be Be more careful about toplevel possibly being NULL. (#402453, Sebastian
2007-01-30  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
        (gdk_x11_window_set_user_time): Be more careful about toplevel
        possibly being NULL.  (#402453, Sebastian Bacher)



svn path=/trunk/; revision=17236
2007-01-30 18:36:44 +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
Matthias Clasen
129ad4b48d Try to fix #315732, reported by Luke Hutchinson:
2007-01-02  Matthias Clasen  <mclasen@redhat.com>

        Try to fix #315732, reported by Luke Hutchinson:

        * gdk/x11/xsettings-client.[hc]:
        * gdk/x11/gdkdevents-x11.c: Don't assume that ref'ing a GdkWindow
        will guarantee that it can be looked up in the xid hash later.
        Also, use the nesting server grab function during the xsettings
        client initialization. Finally, make xsettings client not
        eat DestroyNotifys so that GDK can do its regular cleanup.



svn path=/trunk/; revision=17022
2007-01-02 19:07:03 +00:00
Matthias Clasen
34dc82c312 Generate double-click events. (#380421, Tommi Komulainen)
* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event):
        Generate double-click events.  (#380421, Tommi Komulainen)
2006-12-21 16:33:29 +00:00
Matthias Clasen
168659a3b7 Correct return_if_fail checks. (#379803, Tommi Komulainen)
* gdk/x1/gdkinput-xfree.c (_gdk_input_configure_event):
        (_gdk_input_enter_event): Correct return_if_fail checks.
        (#379803, Tommi Komulainen)
2006-12-21 16:28:28 +00:00
Matthias Clasen
392492c0f8 Check for crt_extern.h and _NSGetEnviron. Fix compilation on Darwin where
2006-12-10  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Check for crt_extern.h and _NSGetEnviron.
        * gdk/x11/gdkspawn-x11.c: Fix compilation on Darwin where
        environ is not available.  (#384168, Min Sik Kim)
2006-12-10 06:31:53 +00:00
Matthias Clasen
40e359d893 Update the docs to state which out parameters may be NULL. (#360870,
2006-10-09  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Update the docs to state which out parameters may be NULL.
        (#360870, Attilio Fiandrotti)
2006-10-09 14:36:16 +00:00
Matthias Clasen
241ff0b6bd Cleanups 2006-10-08 05:32:07 +00:00
Behdad Esfahbod
b6a5bbb514 Move all includes before including gdkalias.h.
2006-10-02  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/x11/gdkevents-x11.c: Move all includes before including
        gdkalias.h.
2006-10-02 17:34:17 +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
Behnam Esfahbod
a0c6753511 just check the first shift-level of keyboard layout for RTL and LTR
2006-09-20  Behnam Esfahbod <behnam@zwnj.org>
	* gdk/x11/gdkkeys-x11.c:
	  (get_direction): just check the first shift-level of keyboard
	  layout for RTL and LTR keysyms() (compliment to #116626)
2006-09-20 17:47:28 +00:00
Matthias Clasen
f45a35921a Commit a patch by Behdad to fix typos, omissions and other errors in the
2006-09-10  Matthias Clasen  <mclasen@redhat.com>

        * Commit a patch by Behdad to fix typos, omissions and other
        errors in the symbol aliasing, and add checks for local PLT
        entries.  (#354687, Behdad Esfahbod)
2006-09-10 06:39:16 +00:00
Matthias Clasen
c9c586dd3a Fix small theoretical memory leaks. (#353916, Chris Wilson)
2006-09-09  Matthias Clasen <mclasen@redhat.com>

        * gdk/x11/gdkfonts-x11.c: Fix small theoretical memory leaks.
        (#353916, Chris Wilson)
2006-09-09 05:31:07 +00:00
Michael Natterer
06e446c60d Fix build.
2006-08-31  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Fix build.
2006-08-31 08:41:32 +00:00
Matthias Clasen
e28876d95e Fix gdk_window_beep 2006-08-30 16:02:41 +00:00
Matthias Clasen
6760faeb4b Add a function to beep on a window. For X11, implement this with XkbBell.
2006-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkwindow.h:
	* gdk/gdk.symbols:
	* gdk/directfb/gdkwindow-directfb.c (gdk_window_beep):
	* gdk/win32/gdkwindow-win32.c (gdk_window_beep):
	* gdk/quartz/gdkwindow-quartz.c (gdk_window_beep):
	* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Add a function
	to beep on a window. For X11, implement this with
	XkbBell.  (#353455, Mariano Suárez-Alvarez)
2006-08-30 03:30:43 +00:00
Tor Lillqvist
1c816b805c Add Win32 detail to doc comments.
2006-08-23  Tor Lillqvist  <tml@novell.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
	(gdk_window_input_shape_combine_mask)
	gdk_window_shape_combine_region)
	(gdk_window_input_shape_combine_region): Add Win32 detail to doc
	comments.
2006-08-23 00:25:10 +00:00
Matthias Clasen
c74f0bbf65 Don't leak ShmPixmapInfo. (#349858, Chris Wilson)
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdrawable-x11.c (get_shm_pixmap_for_image): Don't
	leak ShmPixmapInfo.  (#349858, Chris Wilson)
2006-08-15 17:05:00 +00:00
Matthias Clasen
da54d67905 Use XAllocSizeHints to allocate the XSizeHints struct. (#249285, David
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_geometry_hints):
        Use XAllocSizeHints to allocate the XSizeHints struct.
        (#249285, David Baron)
2006-08-15 05:53:58 +00:00
Matthias Clasen
bb279057f3 Zero out some stack-allocated X structures, to avoid valgrind warnings
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_decorations):
        (gdk_window_set_functions): Zero out some stack-allocated
        X structures, to avoid valgrind warnings about uninitialized
        memory.  (#349382, David Baron)
2006-08-15 05:46:08 +00:00
Matthias Clasen
c6985e1394 Free all XKB data. (#349997, Chris Wilson)
2006-08-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkkeys-x11.c (gdk_keymap_x11_finalize): Free
	all XKB data. (#349997, Chris Wilson)
2006-08-06 06:01:18 +00:00
Michael Natterer
8022523767 cast the return value of XGetWindowProperty() correctly so we don't return
2006-07-27  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_type_hint): cast the
	return value of XGetWindowProperty() correctly so we don't return
	garbage type hints. Pointed out by Tommi Komulainen, patch taken
	from https://maemo.org/bugzilla/show_bug.cgi?id=724
2006-07-27 15:22:13 +00:00
Matthias Clasen
b1d1801875 When looking up a font XID, add the XID_FONT_BIT. (#348001)
2006-07-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkx.h (gdk_font_lookup_for_display): When looking
	up a font XID, add the XID_FONT_BIT.  (#348001)
2006-07-19 13:36:52 +00:00
Matthias Clasen
862e96f9bf Fix root window size changes 2006-06-29 15:13:56 +00:00
Matthias Clasen
03de4627d3 broken pipe 2006-06-28 12:44:30 +00:00
Matthias Clasen
72c77cf67c Update the docs. (#345194, Yevgen Muntyan)
2006-06-20  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_functions): Update
	the docs. (#345194, Yevgen Muntyan)
2006-06-20 04:30:11 +00:00
Matthias Clasen
150b52e207 Remove the right XID from the xid table. (#34327, Sampo Savolainen, Tim
2006-06-04  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkfont-x11.c (_gdk_font_destroy): Remove the right
        XID from the xid table.  (#34327, Sampo Savolainen, Tim Janik)
2006-06-05 01:14:57 +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
0b98adf31a Always set protocol. (#342003, Tommi Komulainen)
2006-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display):
	Always set protocol.  (#342003, Tommi Komulainen)
2006-05-18 18:13:27 +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
f22387f042 Remove extraneous ; 2006-05-14 03:58:06 +00:00
Matthias Clasen
89b5cb6480 Make symbol list mstch reality.
2006-05-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkfilesystem.c:
	* gtk/gtkfilesystemunix.c:
	* gtk/gtkprintbackend.h:
	* gtk/gtkrecentchooserdefault.c:
	* gtk/gtkrecentchooserdefault.h:
	* gtk/paper_names_offsets.c: Make symbol list mstch reality.

	* gtk/Makefile.am: Fix a typo.

	* gdk/x11/Makefile.am (EXTRA_DIST): Add gdksettings.c
2006-05-04 13:36:30 +00:00
Matthias Clasen
059292a765 fix build without xfixes 2006-04-27 05:04:49 +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
dfc29f83ae Avoid a possible array overrun. (Coverity)
2006-04-16  Matthias Clasen <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_initial_hints ): Avoid a
        possible array overrun.  (Coverity)
2006-04-16 05:05:49 +00:00
Matthias Clasen
10e0b3c8e1 Fix another Coverity bug 2006-04-12 20:43:52 +00:00
Matthias Clasen
93c2bc828e Make this work for list == NULL. (Coverity)
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkselection-x11.c (make_list): Make this work
	for list == NULL.  (Coverity)
2006-04-12 18:38:40 +00:00
Matthias Clasen
6d66ce2fc3 Rearrange the code a bit.
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkkeys-x11.c (gdk_keymap_get_entries_for_keycode):
	Rearrange the code a bit.
2006-04-12 17:57:30 +00:00
Matthias Clasen
4906bd0fad Fix another Coverity bug 2006-04-12 04:20:28 +00:00
Søren Sandmann
3797d5a34e Add "_private" to make it build.
Tue Apr  4 12:25:36 2006  Søren Sandmann  <sandmann@redhat.com>

        * gdk/x11/gdkimage-x11.c (gdk_image_class_init): Add "_private" to
        make it build.
2006-04-04 17:51:15 +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
aff3329de1 Make _gdk_windowing_args const.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkinternals.h:
	* gdk/x11/gdkmain-x11.c:
	* gdk/win32/gdkmain-win32.c:
	* gdk/directfb/gdkdisplay-directfb.c:
	* gdk/quartz/gdkmain-quartz.c: Make _gdk_windowing_args const.
2006-04-03 20:36:52 +00:00
Matthias Clasen
88fe228053 Make it compile 2006-03-30 04:58:15 +00:00