Commit Graph

1897 Commits

Author SHA1 Message Date
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
Ting-Wei Lan
3e02f52031 Do not return things from a void function
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=724008
Author:    Ting-Wei Lan <lantw44@gmail.com>
2014-02-12 22:48:19 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
285d216d3e docs: use apostrophe in *'ll 2014-02-07 13:35:54 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
6abe7a7094 docs: use markdown instead of <note> 2014-02-06 08:01:49 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
William Jon McCann
2dcbe27a06 docs: don't use <option> 2014-02-04 17:48:33 -05:00
William Jon McCann
8d6717097c docs: Use markdown for ulinks 2014-02-04 16:58:53 -05:00
William Jon McCann
a479ee5de5 docs: use markdown for <envar> tags 2014-02-04 16:58:53 -05:00
Matthias Clasen
15060a8f24 Revert "gdk: enable rgba visuals by default"
This reverts commit a2ccb6601e.

This turns out to break GtkStatusIcon, and invalidates
the documentation of gdk_screen_get_system_visual().
2014-02-04 13:15:46 -05:00
Adam Jackson
cc517f116a X11: Decode extension names in the error handler
This commit uses the Xlib cache to obtain the name of the X extension
for the request that caused the error.

https://bugzilla.gnome.org/review?bug=723555
2014-02-03 20:14:13 -05:00
Jasper St. Pierre
78169aa192 gdkwindow-x11: Fix compile warning
It doesn't actually matter, since we don't pass any real attributes
anyway, but this should be the correct type...
2014-01-31 14:34:13 -05:00
Jasper St. Pierre
533a1306cf gdkwindow: Use an InputOnly window for focus_window
For XWayland, this is somewhat important to prevent a dummy XWayland surface
being made for all clients that connect...

https://bugzilla.gnome.org/show_bug.cgi?id=723390
2014-01-31 14:23:47 -05:00
William Jon McCann
0a1d276f4f docs: don't use <type> tags
Use # syntax where appropriate.
2014-01-28 00:21:26 -05:00
William Jon McCann
bf35c77f14 docs: use () instead of <function> tags 2014-01-27 23:08:08 -05:00
William Jon McCann
a2ccb6601e gdk: enable rgba visuals by default
Unless GDK_RGBA=0 is set.

https://bugzilla.gnome.org/show_bug.cgi?id=630217
2014-01-23 11:51:51 -05:00
William Jon McCann
8a0b4471b8 docs: fix typo in function name 2014-01-20 18:27:29 -05:00
William Jon McCann
64ffd759af docs: fix typo in parameter name 2014-01-20 18:27:29 -05:00
William Jon McCann
ca61e63b2c docs: fix docs for GDK_XID_TO_POINTER and GDK_POINTER_TO_XID 2014-01-20 18:27:28 -05:00
Volker Sobek
a4d69e7f14 docs/comments: Fix spelling of 'explicitly'
This replaces all occurrences of 'explicitely' with 'explicitly'. Only
code comments and gtk-doc statements are affected.

https://bugzilla.gnome.org/show_bug.cgi?id=722429
2014-01-18 03:47:46 +01:00
Matthias Clasen
3701de14a1 Add a setting for dialog headers
This setting will let us keep traditional appearance
of dialogs on platforms where this is expected.
The new setting is called gtk-dialogs-use-header, backed
by the Gtk/DialogsUseHeader xsetting.
2014-01-17 17:52:08 -05:00
Tim Lunn
17b6819991 gdk: Don't leak GValue when xsetting is unknown
https://bugzilla.gnome.org/show_bug.cgi?id=722070
2014-01-13 22:20:28 -05:00
Matthias Clasen
7125cdc5ff X11: Support keyboard-initiated move and resize operations
The EWMH defines _NET_WM_MOVERESIZE_SIZE_KEYBOARD and
_NET_WM_MOVERESIZE_MOVE_KEYBOARD for operations that are not
initiated by a button-press event. Allow using these by passing
a button of 0 to gdk_window_begin_move/resize_drag.
2014-01-12 22:25:19 -05:00
Matthias Clasen
5657b805d7 Some struct repacking
Save a few bytes here and there.
2014-01-12 22:25:19 -05:00
Rico Tzschichholz
ed5d9b3c3e x11: Add/Fix '(type *)' g-i annotations 2014-01-09 21:47:04 +01:00
Matthias Clasen
f759523a30 Deal with broken _NET_WORKAREA more gracefully
fvwm seems to have problems keeping _NET_WORKAREA in sync with
the number of desktops. Instead of reading garbage, silently use
the full screen as workarea for desktops that are not covered
by the _NET_WORKAREA property.

https://bugzilla.gnome.org/show_bug.cgi?id=698248
2014-01-04 15:15:00 -05:00
Matthias Clasen
c37e3b6316 x11: Avoid a possible memory leak in an error case
If _NET_WORKAREA is set to nonsensical values, we should still
free the memory before returning.
2014-01-04 15:13:51 -05:00
Matthias Clasen
7e1a4800fa Redo header bar decorations once more
Applications need a way to fix or adapt the decoration layout,
for situations like split header bars. Setting the layout from
the theme with a style property did not offer a good way to do
this, and the ::show-close-button property does not provide
fine-grained control.

To improve the situation, move the layout string to a property of
GtkHeaderBar which is backed by a setting. This allows platforms to
set a default button layout independent of the theme, while applications
can override the default.

The style GtkWindow style property is now deprecated and ignored.
2013-12-21 21:58:24 -05:00
Ryan Lortie
04897e5b09 gdk: add gdk_window_set_shadow_width()
And deprecate the X11-specific version of it.

We call this new API _set_shadow_width() and not _set_frame_extents()
because we already have a gdk_window_get_frame_extents() with a
different meaning and different type of value.

https://bugzilla.gnome.org/show_bug.cgi?id=720374
2013-12-12 23:53:47 -05:00
Carlos Garnacho
f6c9a33841 x11: Handle XINotifyPassiveGrab/Ungrab in focus events
The focus handling code is shared between core and XI2 implementations,
so just handle the extra XI2 types for passive grabs. Those must be dealt
with in the same way than active grabs. Focus events with this crossing
mode could happen currently through the XIGrabFocusIn passive grab.

https://bugzilla.gnome.org/show_bug.cgi?id=719762
2013-12-04 21:22:23 -05:00
Carlos Garnacho
3dbabbd2e5 x11: Handle all XI2 crossing mode values in switch
This fixes potential assertions if a GTK+ app gets to receive
a XINotifyPassiveGrab/Ungrab pointer crossing event, currently
triggerable by XIGrabEnter passive grabs.

http://bugzilla.gnome.org/show_bug.cgi?id=719762
2013-12-04 21:22:23 -05:00
Matthias Clasen
e2745794b1 Revert "gdkwindow-x11: Don't set WM_TAKE_FOCUS if accept_focus is FALSE"
This reverts commit 809aab2c8e.
2013-12-04 11:21:42 -05:00
Benjamin Otte
1d2a070254 x11: Don't crash if a window is on an unmanaged screen
_gdk_x11_display_screen_for_xrootwin() can return NULL. If so, return
NULL from gdk_x11_window_foreign_new_for_display().

https://bugzilla.gnome.org/show_bug.cgi?id=709716
2013-11-25 21:14:34 +01:00
Carlos Garnacho
d1414211bf x11: keep track of the screen pixel size by calculating the bounding box of monitors
This is so we always have the latest information given by XRandR (or other), and not
rely on Core protocol information that might not have been updated yet.

This is specially visible when a monitor is connected (less frequent) or disconnected
(much more frequent), callbacks on GdkScreen::monitors-changed that call
gdk_screen_get_width/height() could get the screen size previous to the monitor
rearrangement.

So in order to fix this, keep track of the latest monitors information, and calculate
the bounding box in order to know the screen size.

https://bugzilla.gnome.org/show_bug.cgi?id=715029
2013-11-25 17:19:46 +01:00
Carlos Garnacho
a53a931755 x11: Unset GdkX11DeviceXI2 scroll valuators on device change
Scroll valuators were being just appended again and again, leading
to 1) a growing memory issue anytime a device changed 2) the first
scroll valuators to stay permanent on the application lifetime, as
the first stored valuators would always match.

https://bugzilla.gnome.org/show_bug.cgi?id=705203
2013-11-22 12:49:32 +01:00
Carlos Garnacho
fee754e0d2 gdk: Ignore crossings generated by passive grabs when resetting scroll axes
Passive grabs may take pointer focus out of the application, even though
the pointer didn't leave the window, but those events still trigger resetting
of the scroll axes. This is most visible with compiz, and possibly other
reparenting WMs, where passive grabs happen on the WM-managed window that
is a parent of the application toplevel.

As it is not possible to have scrolling happening on the timespan a passive
grab takes action, it is entirely safe for GTK+ to assume none happened if
it gets a crossing event of that nature.

https://bugzilla.gnome.org/show_bug.cgi?id=699574#c33
2013-11-18 22:12:18 +01:00
Carlos Garnacho
962415aeb7 x11: Add extra debug spew on XI2 crossing and button events
This information will be useful in case someone stumbles on a situation
similar to https://bugzilla.gnome.org/show_bug.cgi?id=699574, so we can
figure out where do the crossing events come from or go to easily.
2013-11-17 00:42:18 +01:00
Carlos Garnacho
4168c3cab9 gdk: be more selective resetting scroll events
It's been reported in several applications that scrolling feels jerky
since commit cc7b3985b3.

Investigation reported that the combination of passive 4-7 button grabs
on the toplevel and the presence of native subwindows might trigger
too often crossing events from the child window to the toplevel and
back as scroll "buttons" trigger the passive grab. Those crossing events
would reset the scroll valuators rendering scrolling from jerky on
touchpads (where there's intermediate smooth events between the emulated
button ones) to ineffective on regular mouse wheels (where the crossing
event would reset the valuators right before the single smooth scroll
event we get is delivered)

So, only reset scroll valuators when the pointer enters the toplevel
(we only care about this when the pointer is on the window after it's
been possibly scrolling somewhere else), and it doesn't come from an
inferior.

The situations where this happened varied though, the native subwindow
could be one created explicitly by the application, or created indirectly
through gdk_window_ensure_native(). The latter was mainly the case for
evolution (through gtk_selection_set_owner()) and any GtkScrolledWindow
under the oxygen-gtk3 theme (through gdk_window_set_composited())

https://bugzilla.gnome.org/show_bug.cgi?id=699574
2013-11-17 00:42:18 +01:00
Ryan Lortie
a90bb7de0e Add a GtkSetting for 'shell-shows-desktop'
Add a GtkSetting for whether the desktop shell is showing the desktop
folder icons.

This is on by default because most desktop shells do show the icons on
the desktop.  We already have a patch in gnome-settings-daemon to bind
this to the org.gnome.desktop.background show-desktop-icons GSettings
key which is off by default on GNOME.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-14 15:03:04 -05:00
Owen W. Taylor
f50a3af1b7 Handle recursion from motion event handlers
If a motion event handler (or other handler running from the flush-events
phase of the frame clock) recursed the main loop then flushing wouldn't
complete until after the recursed main loop returned, and various aspects
of the state would get out of sync.

To fix this, change flushing of the event queue to simply mark events as
ready to flush, and let normal event delivery handle the rest.

https://bugzilla.gnome.org/show_bug.cgi?id=705176
2013-11-11 23:17:14 -05:00
Matthias Clasen
c46aca463a Respect deprecated button images setting
I have been convinced that it is a bad idea to change the behaviour
at the same time as deprecating it, so go back to respecting the
Gtk/ButtonImages xsetting in buttons created with
gtk_button_new_from_stock() when it is set.

The setting as well as the function are still deprecated, and the
default value of the setting will remain FALSE.
2013-10-24 20:35:55 -04:00
Matthias Clasen
627a03683f Respect deprecated menu images setting
I have been convinced that it is a bad idea to change the behaviour
at the same time as deprecating it, so go back to respecting the
Gtk/MenuImages xsetting in GtkImageMenuItem when it is set.

The setting as well as the widget are still deprecated, and the
default value of the setting will remain FALSE.
2013-10-24 20:03:02 -04:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Jasper St. Pierre
809aab2c8e gdkwindow-x11: Don't set WM_TAKE_FOCUS if accept_focus is FALSE
Otherwise, we'll be in the "Globally Active" mode instead of the
"No Input" mode.

https://bugzilla.gnome.org/show_bug.cgi?id=710389
2013-10-21 13:43:14 -04:00
Lionel Landwerlin
e62a6dfdbc GdkWindowX11: Prevent non renderered window to be display by the compositor
When mapping a window for the first time, make sure the compositor
won't display it until we're done painting.

https://bugzilla.gnome.org/show_bug.cgi?id=702196
2013-09-26 22:16:53 +01:00
Matthias Clasen
ca40ad1b1a Documentation fixes 2013-09-17 01:13:03 -04:00
Carlos Garcia Campos
9dbc19ea17 gdkdisplay-x11: Do not pass a NULL source device to _gdk_display_device_grab_update
Pass the master device instead if the last slave is NULL. This is
unlikely to happen in most of the cases, but can happen when running
unit tests where there's no pointer interaction to update the last
slave.

https://bugzilla.gnome.org/show_bug.cgi?id=696756
2013-09-16 12:47:38 +02:00