1
0
Fork 0
Commit graph

253 commits

Author SHA1 Message Date
Jasper St. Pierre
20a0eb9809 Require the XSync and XShape extensions at build-time
It's been long enough. We can mandate support for these, at least
at build-time. The code doesn't actually compile without either
of these, so just consider that unsupported.
2014-04-22 14:17:09 -04:00
Jasper St. Pierre
912cf8ee5f Merge branch 'wayland'
This has one regression: the basic touch support added by
Carlos Garnacho in 991c85f is now partially reverted, since
we ported to Clutter events for this. We'll need to either
port his changes to Clutter, or restructure event handling
in mutter directly.
2014-04-09 14:54:13 -07:00
Alexander Larsson
d7c4f57aae ui: Disable scaling support in Gtk+
We can't really support the Gtk+ automatic scaling, as to much
code relies on the GdkWindow and XWindow sizes, etc to match.
In order to keep working we just disable the scaling, meaning
we will pick up the larger fonts, but nothing else. Its not
ideal but it works for now.

https://bugzilla.gnome.org/show_bug.cgi?id=706388
2014-04-09 12:34:10 -07:00
Jasper St. Pierre
0466fe9301 Move meta_ui_parse_accelerator into core/
We're currently using GTK+ for this, but we'll stop doing that fairly
quickly and instead just copy the GTK+ code in-tree.
2014-04-07 10:59:46 -04:00
Jasper St. Pierre
dbf5d8f9bc ui: Kill off meta_ui_accelerator_name
It's unused.
2014-04-07 10:46:50 -04:00
Jasper St. Pierre
840378ae68 xprop: Don't use GDK for reading text properties 2014-04-07 10:37:02 -04:00
Jasper St. Pierre
4752776ebf ui: Don't add our filter function twice 2014-04-06 15:19:04 -04:00
Jasper St. Pierre
afce448281 Kill meta_ui_add_event_func / remove_event_func
The reason we don't simply use gdk_window_add_filter directly is
because of some twisted idea that any GDK symbol being used from
core/ is a layer violation. While we certainly want to keep any
serious GDK code out of ui/, event handling is quite important
to have in core/, so simply use a GDK event filter directly.
2014-03-30 22:55:01 -04:00
Carlos Garnacho
991c85f6a0 core: Add minimal handling of touch events
Currently touch events are ignored in the core event handler,
and hence dealt with within GDK. If those touch events were
emulating pointer events, GDK would attempt to convert back
those events to pointer events as the frame GdkWindow doesn't
have the GDK_TOUCH_MASK set.

This results in XI_TouchBegin events being initially processed
by GDK, converted to button events, and triggering a grab op
that subverts touch events into pointer events, so the touch
is never ever seen again by GDK. This leaves GDK in an
inconsistent internal state wrt pointer grabs, so future
pointer-emulating touches will refer to the same window forever.

Fix this by handling touch events minimally, just enough to
convert XI_TouchBegin to GDK_BUTTON_PRESS within mutter, so GDK
is bypassed for every touch event just like it is for pointer
events. This, and the XIGrabDevice() that keeps coercing pointer
events when the grab operation starts, are enough to fix window
drag and drop on touch devices.

https://bugzilla.gnome.org/show_bug.cgi?id=723552
2014-03-13 20:10:07 +01:00
Owen W. Taylor
365af53797 Fix handling of dynamic updates to colors/font/etc.
Since the introduction of frame sync in GTK+, updates to titlebar font and
colors haven't been working because GTK+ counts on the frame clock to
do style updates, and the frame clock doesn't run for an unmapped
GdkWindow. (It's possible that GtkStyleContext changes subsequent to
the introduction of the frame clock were also needed to fully break
things.)

We actually need to map the MetaFrames GdkWindow and let the
compositor code send out the frame sync messages in order to pick up
style changes.

Hopefully no bad side effects will occur from this - we make the window
override-redirect, 1x1, and outside the bounds of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=725751
2014-03-05 17:22:48 -05:00
Owen W. Taylor
4a8f7aa884 Fix handling of dynamic updates to colors/font/etc.
Since the introduction of frame sync in GTK+, updates to titlebar font and
colors haven't been working because GTK+ counts on the frame clock to
do style updates, and the frame clock doesn't run for an unmapped
GdkWindow. (It's possible that GtkStyleContext changes subsequent to
the introduction of the frame clock were also needed to fully break
things.)

We actually need to map the MetaFrames GdkWindow and let the
compositor code send out the frame sync messages in order to pick up
style changes.

Hopefully no bad side effects will occur from this - we make the window
override-redirect, 1x1, and outside the bounds of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=725751
2014-03-05 17:21:27 -05:00
Jasper St. Pierre
585fdd781c Remove tabpopup and friends
These are unused in gnome-shell, and add complexity. Remove them.
2014-02-27 15:31:55 -05:00
Jasper St. Pierre
9e51d98f4a Remove tabpopup and friends
These are unused in gnome-shell, and add complexity. Remove them.
2014-02-27 13:55:58 -05:00
Stefano Facchini
4de3f7ca29 Make tile preview a compositor plugin effect
https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-19 21:55:35 +01:00
Stefano Facchini
8c69f1b33c Make tile preview a compositor plugin effect
https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-19 21:41:29 +01:00
Giovanni Campagna
5298a834ef Fix regression in mutter translations
Switching meta/util.h to gi18n.h was wrong, mutter is a library
and needs gi18n-lib.h, but that cannot be included from a public
header (since it depends on config.h or command line options),
so split util.h into a public and a private part.

https://bugzilla.gnome.org/show_bug.cgi?id=707897

Conflicts:
	src/compositor/compositor.c
	src/meta/util.h
2014-02-17 13:46:56 -05:00
Andika Triwidada
9b21346427 Changed obsolete FSF postal address into generic URL.
Fix https://bugzilla.gnome.org/show_bug.cgi?id=721517 #2
2014-01-13 11:35:47 -05:00
Andika Triwidada
fbec4718f8 Changed obsolete FSF postal address into generic URL.
Fix https://bugzilla.gnome.org/show_bug.cgi?id=721517 #2
2014-01-12 08:42:06 +07:00
Florian Müllner
27a0b8f87a Revert "Make tile preview a compositor plugin effect"
This reverts commit 21e94ed109.
2013-12-12 09:09:44 +01:00
Stefano Facchini
21e94ed109 Make tile preview a compositor plugin effect
https://bugzilla.gnome.org/show_bug.cgi?id=665758
2013-12-12 09:08:17 +01:00
Giovanni Campagna
7b537d6b8f Fix regression in mutter-wayland translations
Switching meta/util.h to gi18n.h was wrong, mutter is a library
and needs gi18n-lib.h, but that cannot be included from a public
header (since it depends on config.h or command line options),
so split util.h into a public and a private part.

https://bugzilla.gnome.org/show_bug.cgi?id=707897
2013-09-11 16:01:07 +02:00
Jasper St. Pierre
bf78f067a2 Make sure to always call va_end 2013-09-03 16:10:10 -04:00
Jasper St. Pierre
2098ec2d16 theme-parser: Remove a duplicate paste
How did this sneak in there?
2013-09-03 16:10:10 -04:00
Jasper St. Pierre
bdbb852163 Make sure to always call va_end 2013-09-03 16:09:25 -04:00
Jasper St. Pierre
03f736607b theme-parser: Remove a duplicate paste
How did this sneak in there?
2013-09-03 16:09:24 -04:00
Alexander Larsson
6980256a42 ui: Disable scaling support in Gtk+
We can't really support the Gtk+ automatic scaling, as to much
code relies on the GdkWindow and XWindow sizes, etc to match.
In order to keep working we just disable the scaling, meaning
we will pick up the larger fonts, but nothing else. Its not
ideal but it works for now.

https://bugzilla.gnome.org/show_bug.cgi?id=706388
2013-08-20 14:27:49 +02:00
Giovanni Campagna
4fd3c63da9 ui: restrict gtk to only use the x11 backend
We use GTK as a way to get the X11 connection for our internal
use, so we need it to keep using X.

https://bugzilla.gnome.org/show_bug.cgi?id=706303
2013-08-19 15:42:37 +02:00
Jasper St. Pierre
ef480e9120 theme: Fix build breakage 2013-08-13 09:50:59 -04:00
Jasper St. Pierre
8c1c77482d Remove old, deprecated utilities that nobody has used in a million years
https://bugzilla.gnome.org/show_bug.cgi?id=704437
2013-08-13 09:39:02 -04:00
Jasper St. Pierre
e633606ca9 menu: Remove support for icon items from the window menu
We don't show these by default, and it uses deprecated API.
This also removes our only use of the stock icons, so remove
those as well.

https://bugzilla.gnome.org/show_bug.cgi?id=704437
2013-08-13 09:39:01 -04:00
Dan Winship
7a4c808e43 display: clean up focus_window vs expected_focus_window
Mutter previously defined display->focus_window as the window that the
server says is focused, but kept display->expected_focus_window to
indicate the window that we have requested to be focused. But it turns
out that "expected_focus_window" was almost always what we wanted.

Make MetaDisplay do a better job of tracking focus-related requests
and events, and change display->focus_window to be our best guess of
the "currently" focused window (ie, the window that will be focused at
the time when the server processes the next request we send it).

https://bugzilla.gnome.org/show_bug.cgi?id=647706
2013-05-22 13:46:15 -04:00
Dieter Verfaillie
f5e75de330 ui: add missing delimiter in GTK-Doc comment block
g-ir-scanner will emit more warnings regarding broken GTK-Doc
syntax in the near future, which due to --warn-error being used
would break the build:

'''
ui/theme.c:1883: Warning: Meta: missing ":" at column 20:
 * @tokens_p: (out) The resulting tokens
                   ^
g-ir-scanner: compile: gcc -Wall -Wno-deprecated-declarations ...
g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC gcc ...
libtool: link: gcc -o /home/dieterv/gnome.org/checkout/mutter/...
<unknown>:: Fatal: Meta: warnings configured as fatal
<unknown>:: Fatal: Meta: warnings configured as fatal

make[4]: *** [Meta-3.0.gir] Error 1
'''

https://bugzilla.gnome.org/show_bug.cgi?id=699636
2013-05-04 00:23:11 +02:00
Simon McVittie
c2a9ccb7e2 Let the UI layer (via the core) construct the frame mask
This essentially just moves install_corners() from the compositor, through
the core, into the UI layer where it arguably should have been anyway,
leaving behind stub functions which call through the various layers. This
removes the compositor's special knowledge of how rounded corners work,
replacing it with "ask the UI for an alpha mask".

The computation of border widths and heights changes a bit, because the
width and height used in install_corners() are the
meta_window_get_outer_rect() (which includes the visible borders but not
the invisible ones), whereas the more readily-available rectangle is the
MetaFrame.rect (which includes both). Computing the same width and height
as meta_window_get_outer_rect() involves compensating for the invisible
borders, but the UI layer is the authority on those anyway, so it seems
clearer to have it do the calculations from scratch.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697758
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2013-04-17 13:35:06 +01:00
Simon McVittie
c7c1225393 MetaFrames: factor out MetaUIFrame accessors for borders, corner radiuses
This makes it a bit simpler for other functions on a MetaUIFrame to
get this information.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697758
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-04-12 17:55:00 +01:00
Bastien Nocera
f1620abfad ui: Fix crash getting default font
A correctly constructed GtkStyleContext must have its screen
and widget paths set. Getting the frame font caused crashes
on some systems because those were not correctly initialised.

https://bugzilla.gnome.org/show_bug.cgi?id=696814
2013-03-29 14:09:54 +01:00
Tomeu Vizoso
f80a15f312 Remove theme.h and preview-widget.h from the API docs
As they are of no use to plugins and to be removed in the future

https://bugzilla.gnome.org/show_bug.cgi?id=695935
2013-03-18 23:08:24 +01:00
Tomeu Vizoso
2efed44257 Add a meaningful name and description to all sections/files in the API docs
https://bugzilla.gnome.org/show_bug.cgi?id=695641
2013-03-14 18:11:04 -04:00
Tomeu Vizoso
e0b698d365 Fix gobs of gtk-doc warnings
https://bugzilla.gnome.org/show_bug.cgi?id=676856
2013-03-14 18:02:43 -04:00
Cosimo Cecchi
94e6e55ef7 resize-popup: use a tooltip style for the resize popup window
- set GTK_STYLE_CLASS_TOOLTIP on the window, and use the same code of
  GtkTooltip to paint it
- set GDK_WINDOW_TYPE_HINT_TOOLTIP and make the window non-resizable, so
  it doesn't get an incorrect shadow from the WM

https://bugzilla.gnome.org/show_bug.cgi?id=692741
2013-02-10 14:25:27 -05:00
Cosimo Cecchi
34fc234fd7 resize-popup: set a bigger margin
Since we're going to use the tooltip's rounded corners we need a little
bit more of margin (which wasn't a bad idea even with the frame).
Also, don't use GtkMisc for this anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=692741
2013-02-10 14:25:27 -05:00
Cosimo Cecchi
c3ffd28bb6 resize-popup: don't use a GtkFrame
We want this to look like a normal tooltip - start with removing the
GtkFrame around its shape.

https://bugzilla.gnome.org/show_bug.cgi?id=692741
2013-02-10 14:25:27 -05:00
Florian Müllner
e914595062 theme-viewer: Stop using deprecated GTK+ functions
https://bugzilla.gnome.org/show_bug.cgi?id=693439
2013-02-08 19:08:55 +01:00
Adel Gadllah
b33b4a8e2c ui: Don't use gdk_device_manager_get_client_pointer
gdk_device_manager_get_client_pointer which in calls
XIGetClientPointer seems to be very slow in a XI2 world.

So use
	gdk_x11_device_manager_lookup (gmanager, META_VIRTUAL_CORE_POINTER_ID)
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=693354
2013-02-07 21:54:27 +01:00
William Jon McCann
27e0e44d8b Don't allow multiline window titles
https://bugzilla.gnome.org/show_bug.cgi?id=683056
2013-01-16 14:25:11 -05:00
Jasper St. Pierre
47be4fdf07 theme: Add the .background style class back to frames
GtkWindow added the BACKGROUND style class to all windows, which the
CSS file selects on to set a background color for all windows. Without
this, the background color becomes undefined, and thus window frames
look like they have "glitchy" graphics.

https://bugzilla.gnome.org/show_bug.cgi?id=690317
2013-01-11 12:40:07 -05:00
Jasper St. Pierre
9b34545bd5 theme: Fix a memory leak
Commit 5c33b0d tried to copy/paste the code that constructed
classes, but for some reason didn't copy the theme name.

https://bugzilla.gnome.org/show_bug.cgi?id=690317
2013-01-11 12:40:07 -05:00
Rui Matos
e5317cc7a0 theme: Remove a bunch of unused *_to_string methods
These were there just for consistency's sake.
2013-01-11 17:40:23 +01:00
Jasper St. Pierre
5c33b0d768 theme-viewer: use the same GtkStyleContext as mutter usually renders
https://bugzilla.gnome.org/show_bug.cgi?id=690317
2013-01-09 14:06:24 -05:00
Jasper St. Pierre
22a3126a2b theme: Make meta_frame_draw_theme take a GtkStyleContext instead of a widget
The style context of the widget is rarely what we want. We won't
fix this to be a MetaFrames style context yet; this just changes
the internal API.

https://bugzilla.gnome.org/show_bug.cgi?id=690317
2013-01-09 14:06:24 -05:00
Debarshi Ray
b9f775fe02 ui: Suppress warnings from -Werror=maybe-uninitialized 2013-01-03 17:30:44 +01:00