1
0
Fork 0
Commit graph

19 commits

Author SHA1 Message Date
Jasper St. Pierre
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -04:00
Jasper St. Pierre
ebb6847bd1 ui: Don't use grab ops for grab negotation
Grab operations are now always taken on the backend connection, and
this breaks GTK+'s event handling.

Instead of taking a grab op, just do the handling ourselves. The
GTK+ connection will get an implicit grab, which means pointer /
keyboard events won't be sent to the rest of mutter, which is good.
2014-04-24 13:36:40 -04: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
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
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
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
d33d113746 frame: Add "get_corner_radiuses" chain
https://bugzilla.gnome.org/show_bug.cgi?id=628195
2011-08-24 09:38:23 -04:00
Jasper St. Pierre
e0fb83c691 Replace public MetaFrameGeometry with MetaFrameBorders
There were actually *two* MetaFrameGeometry structs: one in theme-private.h,
one in frame.h. The latter public struct was populated by a mix of (void*)
casting and int pointers, usually pulling directly from the data in the private
struct.

Remove the public struct, replace it with MetaFrameBorders and scrap all
the pointer hacks to populate it, instead relying on both structs being used
in common code.

This commit should be relatively straightforward, and it should not do any
tricky logic at all, just a sophisticated find and replace.

https://bugzilla.gnome.org/show_bug.cgi?id=644930
2011-08-09 17:14:50 -04:00
Jasper St. Pierre
183bcd6fc7 Stop shaping the frame window
In preparation for switching to handling the output shape purely by what we
paint, stop applying a shape to the frame of the window. Even when we restore
handling the output shape, this will change the behavior with respect to input;
transparent areas between the frame and the contents will stop clicks rather
than passing them through, but that is arguably at least as expected
considering how that we decorate shaped windows with a frame all around.

https://bugzilla.gnome.org/show_bug.cgi?id=644930
2011-08-09 17:14:50 -04:00
Florian Müllner
4affd22817 ui-frame: Add support for style variants
Rather than sharing a single style context between all frames, use
a default style and one style per encountered variant (as determined
by the _GTK_THEME_VARIANT property), so that colors from the GTK+ style
are picked from the correct theme variant.

https://bugzilla.gnome.org/show_bug.cgi?id=645355
2011-05-18 23:07:23 +02:00
Florian Müllner
eb17cd9ba9 ui: Add meta_ui_update_frame_style()
This method allows forcing a style update of a particular frame
from the core, so that it can pick up style variants.

https://bugzilla.gnome.org/show_bug.cgi?id=645355
2011-05-18 23:07:23 +02:00
Owen W. Taylor
67c3c93b8f Only shadow ARGB windows with a frame outside the frame
An ARGB window with a frame is likely something like a transparent
terminal. It looks awful (and breaks transparency) to draw a big
opaque black shadow under the window, so clip out the region under
the terminal from the shadow we draw.

Add meta_window_get_frame_bounds() to get a cairo region for the
outer bounds of the frame of a window, and modify the frame handling
code to notice changes to the frame shape and discard a cached
region. meta_frames_apply_shapes() is refactored so we can extract
meta_frames_get_frame_bounds() from it.

https://bugzilla.gnome.org/show_bug.cgi?id=635268
2011-04-26 15:10:02 -04:00
Dan Winship
c84da3ce1b Move the installed includes to a subdir
If mutter is going to be a "real" library, then it should install its
includes so that users can do

    #include <meta/display.h>

rather than

    #include <display.h>

So rename the includedir accordingly, move src/include to src/meta,
and fix up all internal references.

There were a handful of header files in src/include that were not
installed; this appears to have been part of a plan to keep core/,
ui/, and compositor/ from looking at each others' private includes,
but that wasn't really working anyway. So move all non-installed
headers back into core/ or ui/.

https://bugzilla.gnome.org/show_bug.cgi?id=643959
2011-03-07 18:19:53 -05:00
Florian Müllner
565f002bc4 ui: Port to GtkStyleContext
GtkStyle has been deprecated in favor of GtkStyleContext. A full
port would involve replacing GdkColor with GdkRGBA - leave this
out for the time being.

Bump the required version of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=637761
2011-01-13 18:55:39 +01:00
Owen W. Taylor
52bc675fcb introspection: remove --allow-unprefixed
Remove --allow-unprefixed option to the scanner, and fix resulting
problems:

 * theme.h and boxes.h are split into a main -header and a private
   header that includes stuff that is not generally useful and
   hard to introspect. Merge theme-parser.h into theme.h.

 * meta_display_get_atom() and meta_window_get_window_type_atom()
   are marked as (skip)

 * Fix annotation: (element-type Strut) => (element-type Meta.Strut)

https://bugzilla.gnome.org/show_bug.cgi?id=632494
2010-10-23 15:58:16 -04:00
Tomas Frydrych
ff9400abde Remove deprecated GTK symbols
http://bugzilla.gnome.org/show_bug.cgi?id=587991

(adapted from metacity commit 3f76affbd2,
original patch by Thomas Andersen)
2009-08-04 09:23:37 +01:00
Owen Taylor
a6c951352f GtkStyle is specific to a particular colormap. Metacity uses different
2009-01-27  Owen Taylor  <otaylor@redhat.com>

       GtkStyle is specific to a particular colormap. Metacity
       uses different colormaps for windows with different
       visuals, so it must specialize the GtkStyle.

       Closes #568365 and #513944.

       * src/ui/frames.[ch]: Keep a GtkStyle for each MetaUIFrame, which is
         obtained by calling gtk_style_attach() on the style for the
         MetaFrames. When the style of the MetaFrames changes, reattach
         everything. When we call gtk_style_set_background() pass in the
         right style.

       * src/ui/themes.[ch]: Create a _with_style() variant of functions that
         previously took the style from widget->style passed in, so we
         can draw with the right style for the colormap.


svn path=/trunk/; revision=4092
2009-01-28 01:47:18 +00:00
Havoc Pennington
72b08c82b1 sort source files into these directories according to which part of the WM
2007-12-19  Havoc Pennington  <hp@redhat.com>

	* src/ui, src/core, src/include: sort source files into these
	directories according to which part of the WM they are supposed to
	be in. In an eventual plan, we should also create
	src/compositor/render, src/compositor/fallback and move some of
	the compositor stuff into that.
	
	* autogen.sh: require a newer automake, so we don't have to use
	a recursive build

	* src/ui/tabpopup.c: put in a hack to make the build temporarily
	work, want to commit the large rearrangement before fixing this
	not to include workspace.h or frame.h

	* src/core/iconcache.c (meta_read_icons): temporarily break this
	to get the build to work, want to commit the large rearrangement
	before fixing this file not to include theme.h


svn path=/trunk/; revision=3491
2007-12-19 21:17:50 +00:00
Renamed from src/frames.h (Browse further)