Commit Graph

856 Commits

Author SHA1 Message Date
Benjamin Otte
8b15cd33ee window: Subtract shadow from passed in width for height
... and height for width in size requests. Fixes mislayout in
control-center universal access panel.
2014-04-29 19:36:26 +02:00
Matthias Clasen
063bd57873 GtkWindow: Avoid a critical in F10 handling
The focus widget might be NULL, and we were forgetting to take
that possibility into account in one place.
2014-04-25 22:12:05 -04:00
Matthias Clasen
2d7b9273cf window: Be more careful when propagating key events
We are keeping references on the widget we are handling as we
are iterating up, but that doesn't protect us against the entire
tree being axed from inside gtk_widget_handle_event.
https://bugzilla.gnome.org/show_bug.cgi?id=727644
2014-04-11 22:00:01 -07:00
Руслан Ижбулатов
fee41fb616 Revert "W32: Implement composition check for GDK"
This reverts commit 7ae5a56948.

Pushed by accident.
2014-04-10 17:58:58 +00:00
Руслан Ижбулатов
7ae5a56948 W32: Implement composition check for GDK
Also move DWM function grabbing and make those functions available to all of GDK-Win32.

https://bugzilla.gnome.org/show_bug.cgi?id=727316
2014-04-10 17:49:20 +00:00
Matthias Clasen
fb9a6bb6d8 csd: Drop the GTK_FRAME_EXTENTS requirement
We are getting bug reports from people who are irritated that
dialogs now have 'double headers' under any wm but gnome-shell.

As an example, xfwm4 seems to do ok with csd windows, and
on balance it seems better to have some invisible border issues
than to have double headers.

https://bugzilla.gnome.org/show_bug.cgi?id=727414
2014-04-04 01:28:09 -04:00
Sébastien Wilmet
1bf2e0600f doc: fix gtk_window_destroy() -> gtk_widget_destroy()
Reviewed-by: Emmanuele Bassi
2014-04-03 18:28:10 +02:00
Bastien Nocera
f71f7215ab all: Name more idles and timeouts
Following up from 438cd857c4,
name more timeouts and idles.

The original grep was missing checking for gdk_threads_add_*()
functions (at least for some of the files).

https://bugzilla.gnome.org/show_bug.cgi?id=726870
2014-03-26 20:09:30 -04:00
Johannes Wellhöfer
46cfebfe97 Also revert enable-mnemonics code in gtkwindow, which was forgotten in commit 34cf40e95c.
https://bugzilla.gnome.org/show_bug.cgi?id=708346
2014-03-24 20:17:20 -04:00
Matthias Clasen
9ed2c8a719 Fix undecorated windows
Setting windows undecorated was broken by some of the recent
shadow width changes. We need to ensure that shadow width is
zero for undecorated windows, then things work again.
2014-03-21 15:39:46 -04:00
Carlos Garnacho
9adfc8e2c4 window: Unset source ID before possibly destroying the widget
If the delete event ends up destroying the widget, unsetting
priv->delete_event_handler will happen on invalid memory, so
unset it before the widget is possibly destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=726825
2014-03-21 15:41:10 +01:00
Matthias Clasen
6fbe287622 csd: Fix the northeast resize handle position 2014-03-12 00:28:26 -04:00
Matthias Clasen
5b341e8e6e csd: Fix invisible border/shadow confusion
We did not set an input shape on the window, so the region outside
the invisible border where we draw the outer edges of the shadow
were still part of the window, as far as clicks and cursors were
concerned. Fix this by setting an input shape that makes all clicks
outside of the resize borders go through to the underlying window.

https://bugzilla.gnome.org/show_bug.cgi?id=726125
2014-03-12 00:18:04 -04:00
Carlos Garnacho
168e4faf50 window: Emit a11y signals directly on popover added/removed
As those are internal children, there's no signal that GtkWindowAccessible
could catch when those are added or removed, so make GtkWindow use the private
GtkContainerAccessible methods to add/remove the child accessible when that
happens.

https://bugzilla.gnome.org/show_bug.cgi?id=725864
2014-03-10 23:02:06 +01:00
Phillip Wood
beaba95f39 Window: Focus custom titlebar with F10
As discussed on desktop-devel-list [1], "There should be an intuitive,
consistent, immediate way to jump to the widgets that live in the
header bar." F10 has been suggested for this as it is already used to
active menubars.

F10 will focus the custom titlebar widget if the window has one and it
isn't already focused. If the titlebar widget doesn't exist or is
already focused then F10 focuses the menubar if there is one.

[1] https://mail.gnome.org/archives/desktop-devel-list/2014-February/msg00176.html

https://bugzilla.gnome.org/show_bug.cgi?id=725141
2014-03-09 20:26:54 -04:00
Carlos Garnacho
59a928f7c8 window: Turn popovers into internal children
It turns out popovers are already smart enough to cope with this
situation, so let popovers be internal children so things that rely
on gtk_container_forall(), like DnD, work without modifications.

https://bugzilla.gnome.org/show_bug.cgi?id=725727
2014-03-06 23:21:43 -05:00
Matthias Clasen
db9a6f8caf Some more doc rewording 2014-03-03 18:13:24 -05:00
Phillip Wood
857e774a34 Fix typo in gtk_window_set_default() documentation
The documentation should link to gtk_widget_grab_default() rather than
gtk_widget_grab_focus().

https://bugzilla.gnome.org/show_bug.cgi?id=725559
2014-03-03 18:12:25 -05:00
Matthias Clasen
d64ae72c29 Take shadow size into account when positioning popovers
Without this, popovers have a tendency to protrude into the
invisible border of windows, which looks less than optimal.
2014-02-22 14:07:48 -05:00
Matthias Clasen
b01229db4b Fix popover life-cycle handling
c287845240 was trying to fix
the memory leak caused by popovers begin destroyed in
gtk_window_destroy before chaining up to gtk_widget_destroy,
which unrealizes the window, and would clean up the popover
windows if the popovers were still around.

Fix this in a better way by moving the popover destruction
after the chaining up, so we unrealize first, and then
destroy the popovers.

Also, make _gtk_window_remove_popover unrealize the popover,
for symmetry with _gtk_window_add_popover.

This should fix
https://bugzilla.gnome.org/show_bug.cgi?id=724921
2014-02-21 22:08:00 -05:00
William Jon McCann
c287845240 Unregister the popover before destroying it
Fixes a leak of the registered_windows list in GtkWidget.

https://bugzilla.gnome.org/show_bug.cgi?id=554618
2014-02-21 14:51:25 -05:00
William Jon McCann
0997303378 Don't leak list items of popovers 2014-02-20 16:41:15 -05:00
Jasper St. Pierre
ad0c4c3e83 window: Fix configure request debug code in move_resize
Make it compile in GTK+3 and switch pos_changed / size_changed
to be the right way around.
2014-02-20 13:55:23 -05:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
8bd94a9515 Fix a problem with window dragging
Dragging windows was not working on widgets in the titlebar
region unless they had the window-dragging style property
set. Fix this by looking at the region for motion notify
events as well as for buton press events.
2014-02-15 20:41:58 -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
William Jon McCann
37a8ee6e95 docs: fully break lines in examples
Try to do a better job of keeping example content
from being too wide. It is often rendered as <pre>
text so the only time we can wrap it is in the source.

It is best to full break lines at all punctuation and
to try to keep the width under 70 chars or so.
2014-02-12 18:42:50 -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
326da2da58 docs: don't use <anchor> 2014-02-07 15:40:52 -05:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
William Jon McCann
cb6483d382 docs: use apostrophe in *'d 2014-02-07 13:39:53 -05:00
William Jon McCann
a4b5929e81 docs: use apostrophe in *'re 2014-02-07 13:37:09 -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
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
Claudio Saavedra
b91859a19a gtkwindow: remove delete-event idle function on finalize
Heavy duty can prevent this idle function from being called before
the window is destroyed, so make sure that the source is removed
when the window is finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=723771
2014-02-06 18:18:23 +02:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
William Jon McCann
5dd751f006 docs: don't use ulink. use markdown instead 2014-02-04 18:53:51 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
William Jon McCann
6ba5e6bb1a docs: don't use <tag> docbook elements 2014-02-04 17:38:09 -05:00
Matthias Clasen
8ca2376495 Ignore hide-titlebar-when-maximized for custom titlebars
Try this again, this time being a bit more careful about size
allocation of titlebars.
2014-02-04 08:07:26 -05:00
Matthias Clasen
9177b3c0d2 Revert "Ignore hide-titlebar-when-maximized for CSD"
This reverts commit 54ec157599.
2014-02-04 08:07:26 -05:00
Matthias Clasen
0c483e1423 Make gtk_window_set_titlebar work on realized windows
Since realize does a lot of the heavy lifting of setting up
csd, we have to re-realize the window if we go from no-custom
titlebar to a custom titlebar or vice versa.

https://bugzilla.gnome.org/show_bug.cgi?id=722919
2014-02-03 22:38:06 -05:00
Matthias Clasen
365902cd58 Re-realize the window if needed
When gtk_window_set_titlebar is called, we need to set up
client-side decorations properly, and the easiest way to do
so is to realize the window again. Really, you should call
set_titlebar before the window is realized.

https://bugzilla.gnome.org/show_bug.cgi?id=722919
2014-02-03 22:22:27 -05:00
Matthias Clasen
09d1b28249 docs: Convert to markdown
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
Matthias Clasen
54ec157599 Ignore hide-titlebar-when-maximized for CSD
This setting really only makes sense for wm titlebars,
client-side titlebars are under application control
anyway.
2014-01-31 08:45:23 -05:00
William Jon McCann
e31ebda1d7 docs: don't escape entities in example code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00