Commit Graph

215 Commits

Author SHA1 Message Date
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
Jasper St. Pierre
4e21d5d610 ui: Don't use deprecated GtkStyleContext API
Update for deprecations.

https://bugzilla.gnome.org/show_bug.cgi?id=690593
2012-12-23 03:17:26 -05:00
Rui Matos
7d7b859b40 Fix 'comparison between signed and unsigned integer' compiler errors 2012-12-17 12:30:01 +00:00
Jasper St. Pierre
c1ac9d1dff ui: Use XI2 to fake GDK events
This removes our final dependency on Core Events, meaning
we can remove support code for them soon.

This commit is a bit ugly as it requires ui having a dependency on
core, but this is already a hack, so this is thus a hack inside a
hack, and two hacks make a right or however that goes.

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 18:15:23 -05:00
Carlos Garnacho
946a42f13e core: enable XInput2 by default
Enable XI2 support in both Clutter and GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=688779
2012-12-13 14:57:31 -05:00
Florian Müllner
daac778f16 ui: Remove obsolete GTK+ version check 2012-11-12 19:27:35 +01:00
Florian Müllner
93a16f6d43 frames: Bump priority of style providers
Since GTK+ commit b1ad5c8abc2c, GtkSetting's CSS provider uses a
priority of GTK_STYLE_PROVIDER_PRIORITY_SETTINGS, which means it
will overwrite the ones we create ourselves.
Bump the priority to fix dark window decorations.

https://bugzilla.gnome.org/show_bug.cgi?id=688182
2012-11-12 19:27:34 +01:00
Jürg Billeter
1a521e10c3 display: Only manage the default X screen
https://bugzilla.gnome.org/show_bug.cgi?id=648156
2012-10-15 19:18:45 +02:00
Jasper St. Pierre
dc50ccf9b7 frames: Add a multiplier to increase the size of resize corners
Now the resize corners will extend into the actual border edges.

https://bugzilla.gnome.org/show_bug.cgi?id=677669
2012-06-08 23:09:32 -04:00
Jasper St. Pierre
b98e4e37ad theme: Make meta_frame_style_draw_with_style static
https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-21 16:12:30 -04:00
Jasper St. Pierre
8b64a951c9 theme: Make meta_frame_layout_calc_geometry static
https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-21 16:12:30 -04:00
Jasper St. Pierre
c2a0719e44 preview-widget: Remove meta_preview_get_clip_region
The concept of a clip region doesn't make sense now that we have anti-aliased
corners and a full alpha channel. Once the theme transition is complete,
creating a preview image with an alpha channel will be possible by passing
an ARGB surface to gtk_widget_draw(preview_widget, ...);

https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-21 16:12:30 -04:00
Jasper St. Pierre
6fb857cb23 frames: Remove frame border pixel caching and related optimizations
Since we now cache windows in the X server, we don't really need to cache
them here. Since we are redirecting windows in most cases, we're not gaining
anything except added memory usage. Additionally, remove the clip to screen
optimization - if a window is partially off-screen, we still need to draw
the entire thing as redirection means we won't get an expose event for it.

Additionally, when introducing invisible borders, something accidentally
slipped through: we were getting expose events on the invisible borders,
and they weren't in the cached pixels rect, so we were painting the theme
for them, even if we didn't actually paint anything with cairo. Make sure
to clip out the invisible borders instead of just the client rect so that
we don't draw if our expose event is on the invisible borders.

https://bugzilla.gnome.org/show_bug.cgi?id=675111
2012-05-21 12:51:32 -04:00
Jasper St. Pierre
fc87a635b2 frames: Remove expose_delayed
This was introduced for the effects API and wireframe mode, and was
forgotten when that went the way of the dinosaur.

https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-05-14 15:44:49 -03:00
Jasper St. Pierre
81930ca76e theme-parser: Look for themes in XDG_USER_DATA_DIR, not in ~/.themes
https://bugzilla.gnome.org/show_bug.cgi?id=675316
2012-05-14 14:25:55 -03:00
Jasper St. Pierre
da65738901 theme-parser: Don't load themes from our source tree
There aren't any mutter themes in the source tree. You're better off
using jhbuild with gnome-themes-standard.

https://bugzilla.gnome.org/show_bug.cgi?id=675316
2012-05-14 14:25:55 -03:00
Jasper St. Pierre
b0a099935b frames: Remove forgotten references to tooltips
Tooltips were removed a little while back, but two historical artifacts
were untouched. We're not in the museum business, now are we...
2012-04-30 16:36:18 -04:00
Jasper St. Pierre
b58366d3ad theme: Remove unused "widget" parameter to frame style drawing
It seems that the only usage of the "widget" parameter throughout
the entire call chain was to pass between two function calls as
mutual recursion.

https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:54:49 -04:00
Jasper St. Pierre
6900128b2f theme: Remove unused entry points
meta_draw_op_draw, meta_draw_op_list_draw, and meta_frame_style_draw were
all unused

https://bugzilla.gnome.org/show_bug.cgi?id=671104
2012-04-24 16:54:49 -04:00
Jasper St. Pierre
044d58951e Switch to gtk-doc syntax
https://bugzilla.gnome.org/show_bug.cgi?id=673752
2012-04-24 15:20:39 -04:00
Florian Müllner
8ca86fa8bf ui: Kill tooltips
After the changes in style handling in GTK+, mutter's tooltips no
longer match the tooltip style used in applications. Given that
all buttons in the default layout are well-known, killing tooltips
altogether rather than fixing the styling issues looks like a valid
approach.

https://bugzilla.gnome.org/show_bug.cgi?id=645101
2012-03-15 22:27:43 +01:00
Jasper St. Pierre
0b7f2f8cd3 theme-viewer: Fix invisible borders
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2012-03-13 00:48:29 -04:00
Florian Müllner
7253a75b18 frames: Explicitly initialize style contexts
We were relying on GTK+ emitting GtkWidget::style-updated during
widget initialization to create the GtkStyleContexts used for
window decorations. A recent GTK+ update broke this assumption,
so do the necessary initialization ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=671796
2012-03-10 22:11:22 +01:00
Florian Müllner
44f362ad87 tile-preview: Remove non-composited case
The main reason for handling the non-composited case was to keep
code differences with metacity small, but the tiling patch[0] never
got merged. In mutter itself, the compositor is not optional, so
there's no good reason for keeping those untested code chunks around.

[0] https://bugzilla.gnome.org/show_bug.cgi?id=607694

https://bugzilla.gnome.org/show_bug.cgi?id=666039
2012-01-17 12:53:33 +01:00
Owen W. Taylor
e8209e7b22 Handle rename of GTK+'s window-unfocused state to backdrop
GTK_STATE_FLAG_WINDOW_UNFOCUSED was renamed to
GTK_STATE_FLAG_BACKDROP.
2012-01-09 19:03:27 -05:00
Florian Müllner
d0910da036 Port preferences to GSettings
Move preferences to GSettings, using mainly shared schemas from
gsettings-desktop-schemas.

Unlike GConf, GSettings support is not optional, as Gio is already
a hard dependency of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=635378
2011-11-11 20:26:38 +01:00
Rico Tzschichholz
a2726f41c9 ui: Replace deprecated gtk_widget_size_request 2011-11-11 09:33:42 +01:00
Rui Matos
441287dc64 theme: handle GTK_STATE_FLAG_WINDOW_UNFOCUSED
This bumps the required GTK+ version to >= 3.3.3 .
2011-11-08 20:59:41 +00:00
Jasper St. Pierre
8087872130 theme-viewer: Fix layout
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 15:09:21 -04:00
Jasper St. Pierre
3ad25a62cd ui: Remove deprecated stuff
https://bugzilla.gnome.org/show_bug.cgi?id=662895
2011-10-28 15:09:21 -04:00
Jasper St. Pierre
ec1979f9f5 theme-viewer: Update to fix GTK+ deprecations
Replace the GtkTable with a GtkGrid, replace GtkH/VBox with GtkBox
and junk a GtkHandleBox.

https://bugzilla.gnome.org/show_bug.cgi?id=662574
2011-10-25 09:42:16 -04:00
Jasper St. Pierre
4b411ea241 tabpopup: Update to fix GTK+ deprecations
Replace the GtkTable with a GtkGrid, replace GtkH/VBox with GtkBox

https://bugzilla.gnome.org/show_bug.cgi?id=662574
2011-10-25 09:42:11 -04:00
Jasper St. Pierre
70db187c36 frames: Don't use deprecated API to grab pointer position
https://bugzilla.gnome.org/show_bug.cgi?id=662574
2011-10-25 09:42:04 -04:00
Jasper St. Pierre
d624e85bc1 frames: Disable the titlebar "inner resize"
Since invisible draggable borders have been around, there isn't really a big
need for this feature

https://bugzilla.gnome.org/show_bug.cgi?id=660129
2011-10-21 09:16:39 -04:00
Sandro Mani
28deea44d4 theme: Remove outdated assertion
The theme state used to use GtkStateType, but was ported over to GtkStateFlags,
leaving behind a broken assertion that fails when using certain Metacity
themes, for example Nodoka.

https://bugzilla.gnome.org/show_bug.cgi?id=661286
2011-10-08 17:27:12 -04:00
Jasper St. Pierre
be9f7d7729 theme: Don't add invisible borders for windows that can't be resized
Invisible borders are all about resizing -- in the case that a window
cannot be resized, it makes no sense to add them.

https://bugzilla.gnome.org/show_bug.cgi?id=659854
2011-09-29 16:19:38 -04:00
Jasper St. Pierre
00e49b330c frames: Take out accidental south resize disable of attached dialogs
https://bugzilla.gnome.org/show_bug.cgi?id=657795
2011-09-20 15:30:29 -04:00
Florian Müllner
6087a71951 theme: Don't add any bottom border to shaded windows
Shaded windows are assumed to be reduced to the titlebar: the
current code enforces a visible bottom border of 0 and only takes
the size of the title bar (+ invisible top border) into account
when resizing the frame. However, we still add an invisible border
at the bottom, which is than subtracted from the title bar, resulting
in shaded windows being cut off.
Fix by forcing both visible and invisible bottom borders to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=659266
2011-09-17 03:50:37 +02:00
Jasper St. Pierre
5f1c3de29a frames: Fall back to title bar if nothing else matched
The condition got removed in eeb2efe010 but that
had a side effect of adding a couple of rows of dead pixels so add it back.

https://bugzilla.gnome.org/show_bug.cgi?id=658069
2011-09-16 18:16:37 -04:00