Compare commits
18 Commits
wip/mult-w
...
3.11.3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
addac8825d | ||
![]() |
8e74880b55 | ||
![]() |
6891ce95dc | ||
![]() |
b7e62d3ca5 | ||
![]() |
27a0b8f87a | ||
![]() |
21e94ed109 | ||
![]() |
0fe5c4f957 | ||
![]() |
75f5d59d53 | ||
![]() |
1db95bc32b | ||
![]() |
93a8933282 | ||
![]() |
5a63aaa5ac | ||
![]() |
a3eb5e562a | ||
![]() |
8a76383eca | ||
![]() |
734deeb17c | ||
![]() |
f8b4c28278 | ||
![]() |
3e179c07bc | ||
![]() |
56aae17b46 | ||
![]() |
78741846a4 |
21
NEWS
21
NEWS
@@ -1,3 +1,24 @@
|
||||
3.11.3
|
||||
======
|
||||
* xrandr: Use "hotplug_mode_update" property [Marc-André; #711216]
|
||||
* Fix position of attached dialogs for CSD windows [Giovanni, Owen; #707194]
|
||||
* Fix focus issues with external OSKs [Jasper; #715030]
|
||||
* Add a MetaCullable interface [Jasper; #714706]
|
||||
* Fix window group paint volume [Owen; #719669]
|
||||
* Fix frame extents problems [Owen; #714707]
|
||||
* Add shortcut to move windows between monitors [Florian; #671054]
|
||||
* Fix problems with focus tracking [Owen; #720558]
|
||||
* Misc. bug fixes and cleanups [Rui, Jasper, Owen; #712833, #678989, #720106,
|
||||
#720417, #720630]
|
||||
|
||||
Contributors:
|
||||
Robert Bragg, Giovanni Campagna, Marc-André Lureau, Rui Matos, Alberto Milone,
|
||||
Florian Müllner, Sindhu S, Jasper St. Pierre, Rico Tzschichholz,
|
||||
Owen W. Taylor
|
||||
|
||||
Translations:
|
||||
甘露(Gan Lu) [zh_CN], Khaled Hosny [ar]
|
||||
|
||||
3.11.2
|
||||
======
|
||||
* Fix resize operations using mouse-button-modifier [Lionel; #710251]
|
||||
|
@@ -3,7 +3,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [11])
|
||||
m4_define([mutter_micro_version], [2])
|
||||
m4_define([mutter_micro_version], [3])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
|
42
po/ar.po
42
po/ar.po
@@ -10,8 +10,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity.HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-10-07 17:09+0200\n"
|
||||
"PO-Revision-Date: 2013-10-07 17:09+0200\n"
|
||||
"POT-Creation-Date: 2013-12-11 06:55+0200\n"
|
||||
"PO-Revision-Date: 2013-12-11 06:57+0200\n"
|
||||
"Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n"
|
||||
"Language-Team: Arabic <doc@arabeyes.org>\n"
|
||||
"Language: ar\n"
|
||||
@@ -212,7 +212,7 @@ msgstr "المنظور مقسوم على اليسار"
|
||||
|
||||
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||
#. * we have no way to get it to exit
|
||||
#: ../src/compositor/compositor.c:596
|
||||
#: ../src/compositor/compositor.c:571
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Another compositing manager is already running on screen %i on display \"%s"
|
||||
@@ -255,12 +255,12 @@ msgstr "ا_نتظر"
|
||||
msgid "_Force Quit"
|
||||
msgstr "أ_جبر الإنهاء"
|
||||
|
||||
#: ../src/core/display.c:422
|
||||
#: ../src/core/display.c:415
|
||||
#, c-format
|
||||
msgid "Missing %s extension required for compositing"
|
||||
msgstr "الامتداد %s مفقود، لكنه مطلوب للتركيب"
|
||||
|
||||
#: ../src/core/display.c:514
|
||||
#: ../src/core/display.c:507
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "فشل فتح عرض نظام نوافذ إكس '%s'\n"
|
||||
@@ -314,16 +314,16 @@ msgstr "تعذّر إيجاد سِمة! تأكد من وجود %s و احتوا
|
||||
|
||||
#: ../src/core/monitor.c:696
|
||||
msgid "Built-in display"
|
||||
msgstr ""
|
||||
msgstr "شاشة مدمجة"
|
||||
|
||||
#. TRANSLATORS: this is a monitor name (in case we don't know
|
||||
#. the vendor), it's Unknown followed by a size in inches,
|
||||
#. like 'Unknown 15"'
|
||||
#.
|
||||
#: ../src/core/monitor.c:724
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "Unknown %s"
|
||||
msgstr "عنصر مجهول %s"
|
||||
msgstr "غير معروفة %s"
|
||||
|
||||
#: ../src/core/mutter.c:40
|
||||
#, c-format
|
||||
@@ -382,12 +382,12 @@ msgstr ""
|
||||
msgid "Workspace %d"
|
||||
msgstr "مساحة العمل %d"
|
||||
|
||||
#: ../src/core/screen.c:537
|
||||
#: ../src/core/screen.c:540
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "الشاشة %d على العرض '%s' غير صحيحة\n"
|
||||
|
||||
#: ../src/core/screen.c:553
|
||||
#: ../src/core/screen.c:556
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
||||
@@ -396,18 +396,18 @@ msgstr ""
|
||||
"الشاشة %d على العرض \"%s\" لها مدير نوافذ بالفعل، حاول استعمال خيار التبديل "
|
||||
"--replace لتحُلّ محلّ مدير النوافذ الحالي.\n"
|
||||
|
||||
#: ../src/core/screen.c:580
|
||||
#: ../src/core/screen.c:583
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||
msgstr "لا يمكن الحصول على اختيار مدير النوافذ على الشاشة %d العرض \"%s\"\n"
|
||||
|
||||
#: ../src/core/screen.c:658
|
||||
#: ../src/core/screen.c:661
|
||||
#, c-format
|
||||
msgid "Screen %d on display \"%s\" already has a window manager\n"
|
||||
msgstr "الشاشة %d على العرض \"%s\" لها مدير نوافذ بالفعل\n"
|
||||
|
||||
#: ../src/core/screen.c:850
|
||||
#: ../src/core/screen.c:853
|
||||
#, c-format
|
||||
msgid "Could not release screen %d on display \"%s\"\n"
|
||||
msgstr "لا يمكن ترك الشاشة %d على العرض \"%s\"\n"
|
||||
@@ -503,7 +503,7 @@ msgid "Window manager error: "
|
||||
msgstr "خطأ مدير النوافذ: "
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:7515
|
||||
#: ../src/core/window.c:7615
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@@ -519,7 +519,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:8345
|
||||
#: ../src/core/window.c:8537
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
|
||||
@@ -528,22 +528,22 @@ msgstr ""
|
||||
"ضبطت النافذة %s تلميحة MWM يدل على انه لا يمكن تحجيمها، لكنها تضبط الحجم "
|
||||
"الأدنى %d x %d و الحجم الأقصى %d x %d، هذا ليس له أي معنى.\n"
|
||||
|
||||
#: ../src/core/window-props.c:347
|
||||
#: ../src/core/window-props.c:350
|
||||
#, c-format
|
||||
msgid "Application set a bogus _NET_WM_PID %lu\n"
|
||||
msgstr "ضبط التطبيق رمز NET_WM_PID غير مفهوم %lu\n"
|
||||
|
||||
#: ../src/core/window-props.c:463
|
||||
#: ../src/core/window-props.c:466
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (على %s)"
|
||||
|
||||
#: ../src/core/window-props.c:1546
|
||||
#: ../src/core/window-props.c:1549
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "نافذة WM_TRANSIENT_FOR 0x%lx غير صحيحة ل %s.\n"
|
||||
|
||||
#: ../src/core/window-props.c:1557
|
||||
#: ../src/core/window-props.c:1560
|
||||
#, fuzzy, c-format
|
||||
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||
msgstr "نافذة WM_TRANSIENT_FOR 0x%lx غير صحيحة ل %s.\n"
|
||||
@@ -929,8 +929,8 @@ msgid ""
|
||||
"GTK custom color specification must have color name and fallback in "
|
||||
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||
msgstr ""
|
||||
"يحب أن يكون لتخصيص حالة ألوان جتك قوس غلق قائم بعد الحالة/ مثال gtk:"
|
||||
"fg[NORMAL]، NORMAL هنا هو الحالة، لا يمكن تحليل \"%s\""
|
||||
"يحب أن يكون لتخصيص حالة ألوان جتك قوس غلق قائم بعد الحالة/ مثال "
|
||||
"gtk:fg[NORMAL]، NORMAL هنا هو الحالة، لا يمكن تحليل \"%s\""
|
||||
|
||||
#: ../src/ui/theme.c:1219
|
||||
#, c-format
|
||||
|
1197
po/zh_CN.po
1197
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@@ -17,8 +17,6 @@ struct _MetaCompositor
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
Atom atom_x_root_pixmap;
|
||||
Atom atom_net_wm_window_opacity;
|
||||
guint repaint_func_id;
|
||||
|
||||
ClutterActor *shadow_src;
|
||||
|
@@ -175,31 +175,6 @@ process_damage (MetaCompositor *compositor,
|
||||
meta_window_actor_process_damage (window_actor, event);
|
||||
}
|
||||
|
||||
static void
|
||||
process_property_notify (MetaCompositor *compositor,
|
||||
XPropertyEvent *event,
|
||||
MetaWindow *window)
|
||||
{
|
||||
MetaWindowActor *window_actor;
|
||||
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||
if (window_actor == NULL)
|
||||
return;
|
||||
|
||||
/* Check for the opacity changing */
|
||||
if (event->atom == compositor->atom_net_wm_window_opacity)
|
||||
{
|
||||
meta_window_actor_update_opacity (window_actor);
|
||||
DEBUG_TRACE ("process_property_notify: net_wm_window_opacity\n");
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_TRACE ("process_property_notify: unknown\n");
|
||||
}
|
||||
|
||||
static Window
|
||||
get_output_window (MetaScreen *screen)
|
||||
{
|
||||
@@ -877,6 +852,18 @@ meta_compositor_window_shape_changed (MetaCompositor *compositor,
|
||||
meta_window_actor_update_shape (window_actor);
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_window_opacity_changed (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
MetaWindowActor *window_actor;
|
||||
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
|
||||
if (!window_actor)
|
||||
return;
|
||||
|
||||
meta_window_actor_update_opacity (window_actor);
|
||||
}
|
||||
|
||||
/* Clutter makes the assumption that there is only one X window
|
||||
* per stage, which is a valid assumption to make for a generic
|
||||
* application toolkit. As such, it will ignore any events sent
|
||||
@@ -983,28 +970,19 @@ meta_compositor_process_event (MetaCompositor *compositor,
|
||||
}
|
||||
}
|
||||
|
||||
switch (event->type)
|
||||
if (event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify)
|
||||
{
|
||||
case PropertyNotify:
|
||||
process_property_notify (compositor, (XPropertyEvent *) event, window);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify)
|
||||
/* Core code doesn't handle damage events, so we need to extract the MetaWindow
|
||||
* ourselves
|
||||
*/
|
||||
if (window == NULL)
|
||||
{
|
||||
/* Core code doesn't handle damage events, so we need to extract the MetaWindow
|
||||
* ourselves
|
||||
*/
|
||||
if (window == NULL)
|
||||
{
|
||||
Window xwin = ((XDamageNotifyEvent *) event)->drawable;
|
||||
window = meta_display_lookup_x_window (compositor->display, xwin);
|
||||
}
|
||||
|
||||
DEBUG_TRACE ("meta_compositor_process_event (process_damage)\n");
|
||||
process_damage (compositor, (XDamageNotifyEvent *) event, window);
|
||||
Window xwin = ((XDamageNotifyEvent *) event)->drawable;
|
||||
window = meta_display_lookup_x_window (compositor->display, xwin);
|
||||
}
|
||||
break;
|
||||
|
||||
DEBUG_TRACE ("meta_compositor_process_event (process_damage)\n");
|
||||
process_damage (compositor, (XDamageNotifyEvent *) event, window);
|
||||
}
|
||||
|
||||
/* Clutter needs to know about MapNotify events otherwise it will
|
||||
@@ -1508,13 +1486,7 @@ on_shadow_factory_changed (MetaShadowFactory *factory,
|
||||
MetaCompositor *
|
||||
meta_compositor_new (MetaDisplay *display)
|
||||
{
|
||||
char *atom_names[] = {
|
||||
"_XROOTPMAP_ID",
|
||||
"_NET_WM_WINDOW_OPACITY",
|
||||
};
|
||||
Atom atoms[G_N_ELEMENTS(atom_names)];
|
||||
MetaCompositor *compositor;
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
|
||||
if (!composite_at_least_version (display, 0, 3))
|
||||
return NULL;
|
||||
@@ -1526,18 +1498,11 @@ meta_compositor_new (MetaDisplay *display)
|
||||
if (g_getenv("META_DISABLE_MIPMAPS"))
|
||||
compositor->no_mipmaps = TRUE;
|
||||
|
||||
meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names));
|
||||
XInternAtoms (xdisplay, atom_names, G_N_ELEMENTS (atom_names),
|
||||
False, atoms);
|
||||
|
||||
g_signal_connect (meta_shadow_factory_get_default (),
|
||||
"changed",
|
||||
G_CALLBACK (on_shadow_factory_changed),
|
||||
compositor);
|
||||
|
||||
compositor->atom_x_root_pixmap = atoms[0];
|
||||
compositor->atom_net_wm_window_opacity = atoms[1];
|
||||
|
||||
compositor->repaint_func_id = clutter_threads_add_repaint_func (meta_repaint_func,
|
||||
compositor,
|
||||
NULL);
|
||||
|
@@ -46,7 +46,6 @@ static guint signals[LAST_SIGNAL] = {0};
|
||||
struct _MetaWindowActorPrivate
|
||||
{
|
||||
MetaWindow *window;
|
||||
Window xwindow;
|
||||
MetaScreen *screen;
|
||||
|
||||
ClutterActor *actor;
|
||||
@@ -69,8 +68,6 @@ struct _MetaWindowActorPrivate
|
||||
|
||||
Damage damage;
|
||||
|
||||
guint8 opacity;
|
||||
|
||||
/* A region that matches the shape of the window, including frame bounds */
|
||||
cairo_region_t *shape_region;
|
||||
/* If the window has an input shape, a region that matches the shape */
|
||||
@@ -155,8 +152,6 @@ struct _FrameData
|
||||
enum
|
||||
{
|
||||
PROP_META_WINDOW = 1,
|
||||
PROP_META_SCREEN,
|
||||
PROP_X_WINDOW,
|
||||
PROP_NO_SHADOW,
|
||||
PROP_SHADOW_CLASS
|
||||
};
|
||||
@@ -225,33 +220,12 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
|
||||
"MetaWindow",
|
||||
"The displayed MetaWindow",
|
||||
META_TYPE_WINDOW,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_META_WINDOW,
|
||||
pspec);
|
||||
|
||||
pspec = g_param_spec_pointer ("meta-screen",
|
||||
"MetaScreen",
|
||||
"MetaScreen",
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_META_SCREEN,
|
||||
pspec);
|
||||
|
||||
pspec = g_param_spec_ulong ("x-window",
|
||||
"Window",
|
||||
"Window",
|
||||
0,
|
||||
G_MAXULONG,
|
||||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_X_WINDOW,
|
||||
pspec);
|
||||
|
||||
pspec = g_param_spec_boolean ("no-shadow",
|
||||
"No shadow",
|
||||
"Do not add shaddow to this window",
|
||||
@@ -294,7 +268,6 @@ meta_window_actor_init (MetaWindowActor *self)
|
||||
priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||
META_TYPE_WINDOW_ACTOR,
|
||||
MetaWindowActorPrivate);
|
||||
priv->opacity = 0xff;
|
||||
priv->shadow_class = NULL;
|
||||
}
|
||||
|
||||
@@ -305,11 +278,9 @@ window_decorated_notify (MetaWindow *mw,
|
||||
{
|
||||
MetaWindowActor *self = META_WINDOW_ACTOR (data);
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
MetaFrame *frame = meta_window_get_frame (mw);
|
||||
MetaScreen *screen = priv->screen;
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
Window new_xwindow;
|
||||
|
||||
/*
|
||||
* Basically, we have to reconstruct the the internals of this object
|
||||
@@ -317,11 +288,6 @@ window_decorated_notify (MetaWindow *mw,
|
||||
*/
|
||||
priv->redecorating = TRUE;
|
||||
|
||||
if (frame)
|
||||
new_xwindow = meta_frame_get_xwindow (frame);
|
||||
else
|
||||
new_xwindow = meta_window_get_xwindow (mw);
|
||||
|
||||
meta_window_actor_detach (self);
|
||||
|
||||
/*
|
||||
@@ -336,8 +302,6 @@ window_decorated_notify (MetaWindow *mw,
|
||||
priv->damage = None;
|
||||
}
|
||||
|
||||
priv->xwindow = new_xwindow;
|
||||
|
||||
/*
|
||||
* Recreate the contents.
|
||||
*/
|
||||
@@ -352,18 +316,30 @@ window_appears_focused_notify (MetaWindow *mw,
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (data));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_non_opaque (MetaWindowActor *self)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
MetaWindow *window = priv->window;
|
||||
|
||||
return priv->argb32 || (window->opacity != 0xFF);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_actor_constructed (GObject *object)
|
||||
{
|
||||
MetaWindowActor *self = META_WINDOW_ACTOR (object);
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
MetaScreen *screen = priv->screen;
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Window xwindow = priv->xwindow;
|
||||
MetaWindow *window = priv->window;
|
||||
MetaScreen *screen = meta_window_get_screen (window);
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
XRenderPictFormat *format;
|
||||
Window xwindow;
|
||||
|
||||
xwindow = meta_window_get_toplevel_xwindow (window);
|
||||
|
||||
priv->screen = screen;
|
||||
priv->damage = XDamageCreate (xdisplay, xwindow,
|
||||
XDamageReportBoundingBox);
|
||||
|
||||
@@ -386,19 +362,6 @@ meta_window_actor_constructed (GObject *object)
|
||||
* We will release it in dispose().
|
||||
*/
|
||||
g_object_ref (priv->actor);
|
||||
|
||||
g_signal_connect_object (window, "notify::decorated",
|
||||
G_CALLBACK (window_decorated_notify), self, 0);
|
||||
g_signal_connect_object (window, "notify::appears-focused",
|
||||
G_CALLBACK (window_appears_focused_notify), self, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* This is the case where existing window is gaining/loosing frame.
|
||||
* Just ensure the actor is top most (i.e., above shadow).
|
||||
*/
|
||||
clutter_actor_set_child_above_sibling (CLUTTER_ACTOR (self), priv->actor, NULL);
|
||||
}
|
||||
|
||||
meta_window_actor_update_opacity (self);
|
||||
@@ -491,17 +454,12 @@ meta_window_actor_set_property (GObject *object,
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_META_WINDOW:
|
||||
{
|
||||
if (priv->window)
|
||||
g_object_unref (priv->window);
|
||||
priv->window = g_value_dup_object (value);
|
||||
}
|
||||
break;
|
||||
case PROP_META_SCREEN:
|
||||
priv->screen = g_value_get_pointer (value);
|
||||
break;
|
||||
case PROP_X_WINDOW:
|
||||
priv->xwindow = g_value_get_ulong (value);
|
||||
priv->window = g_value_dup_object (value);
|
||||
|
||||
g_signal_connect_object (priv->window, "notify::decorated",
|
||||
G_CALLBACK (window_decorated_notify), self, 0);
|
||||
g_signal_connect_object (priv->window, "notify::appears-focused",
|
||||
G_CALLBACK (window_appears_focused_notify), self, 0);
|
||||
break;
|
||||
case PROP_NO_SHADOW:
|
||||
{
|
||||
@@ -547,12 +505,6 @@ meta_window_actor_get_property (GObject *object,
|
||||
case PROP_META_WINDOW:
|
||||
g_value_set_object (value, priv->window);
|
||||
break;
|
||||
case PROP_META_SCREEN:
|
||||
g_value_set_pointer (value, priv->screen);
|
||||
break;
|
||||
case PROP_X_WINDOW:
|
||||
g_value_set_ulong (value, priv->xwindow);
|
||||
break;
|
||||
case PROP_NO_SHADOW:
|
||||
g_value_set_boolean (value, priv->no_shadow);
|
||||
break;
|
||||
@@ -650,7 +602,7 @@ clip_shadow_under_window (MetaWindowActor *self)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
|
||||
return (priv->argb32 || priv->opacity != 0xff) && priv->window->frame;
|
||||
return is_non_opaque (self) && priv->window->frame;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -676,6 +628,7 @@ meta_window_actor_paint (ClutterActor *actor)
|
||||
MetaShadowParams params;
|
||||
cairo_rectangle_int_t shape_bounds;
|
||||
cairo_region_t *clip = priv->shadow_clip;
|
||||
MetaWindow *window = priv->window;
|
||||
|
||||
meta_window_actor_get_shape_bounds (self, &shape_bounds);
|
||||
meta_window_actor_get_shadow_params (self, appears_focused, ¶ms);
|
||||
@@ -699,7 +652,7 @@ meta_window_actor_paint (ClutterActor *actor)
|
||||
params.y_offset + shape_bounds.y,
|
||||
shape_bounds.width,
|
||||
shape_bounds.height,
|
||||
(clutter_actor_get_paint_opacity (actor) * params.opacity * priv->opacity) / (255 * 255),
|
||||
(clutter_actor_get_paint_opacity (actor) * params.opacity * window->opacity) / (255 * 255),
|
||||
clip,
|
||||
clip_shadow_under_window (self)); /* clip_strictly - not just as an optimization */
|
||||
|
||||
@@ -742,7 +695,11 @@ meta_window_actor_get_paint_volume (ClutterActor *actor,
|
||||
}
|
||||
|
||||
if (priv->unobscured_region)
|
||||
cairo_region_intersect_rectangle (priv->unobscured_region, &bounds);
|
||||
{
|
||||
cairo_rectangle_int_t unobscured_bounds;
|
||||
cairo_region_get_extents (priv->unobscured_region, &unobscured_bounds);
|
||||
gdk_rectangle_intersect (&bounds, &unobscured_bounds, &bounds);
|
||||
}
|
||||
|
||||
origin.x = bounds.x;
|
||||
origin.y = bounds.y;
|
||||
@@ -786,10 +743,10 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
|
||||
return TRUE;
|
||||
|
||||
/*
|
||||
* Do not add shadows to ARGB windows; eventually we should generate a
|
||||
* shadow from the input shape for such windows.
|
||||
* Do not add shadows to non-opaque windows; eventually we should generate
|
||||
* a shadow from the input shape for such windows.
|
||||
*/
|
||||
if (priv->argb32 || priv->opacity != 0xff)
|
||||
if (is_non_opaque (self))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
@@ -820,20 +777,6 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_actor_get_x_window: (skip)
|
||||
* @self: a #MetaWindowActor
|
||||
*
|
||||
*/
|
||||
Window
|
||||
meta_window_actor_get_x_window (MetaWindowActor *self)
|
||||
{
|
||||
if (!self)
|
||||
return None;
|
||||
|
||||
return self->priv->xwindow;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_actor_get_meta_window:
|
||||
* @self: a #MetaWindowActor
|
||||
@@ -1338,7 +1281,7 @@ meta_window_actor_should_unredirect (MetaWindowActor *self)
|
||||
if (meta_window_requested_dont_bypass_compositor (metaWindow))
|
||||
return FALSE;
|
||||
|
||||
if (priv->opacity != 0xff)
|
||||
if (metaWindow->opacity != 0xFF)
|
||||
return FALSE;
|
||||
|
||||
if (metaWindow->shape_region != NULL)
|
||||
@@ -1369,7 +1312,7 @@ meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
|
||||
MetaDisplay *display = meta_window_get_display (metaWindow);
|
||||
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
Window xwin = meta_window_actor_get_x_window (self);
|
||||
Window xwin = meta_window_get_toplevel_xwindow (metaWindow);
|
||||
|
||||
if (state)
|
||||
{
|
||||
@@ -1623,22 +1566,10 @@ meta_window_actor_new (MetaWindow *window)
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
MetaWindowActor *self;
|
||||
MetaWindowActorPrivate *priv;
|
||||
MetaFrame *frame;
|
||||
Window top_window;
|
||||
ClutterActor *window_group;
|
||||
|
||||
frame = meta_window_get_frame (window);
|
||||
if (frame)
|
||||
top_window = meta_frame_get_xwindow (frame);
|
||||
else
|
||||
top_window = meta_window_get_xwindow (window);
|
||||
|
||||
meta_verbose ("add window: Meta %p, xwin 0x%x\n", window, (guint)top_window);
|
||||
|
||||
self = g_object_new (META_TYPE_WINDOW_ACTOR,
|
||||
"meta-window", window,
|
||||
"x-window", top_window,
|
||||
"meta-screen", screen,
|
||||
"meta-window", window,
|
||||
NULL);
|
||||
|
||||
priv = self->priv;
|
||||
@@ -1725,8 +1656,9 @@ static cairo_region_t *
|
||||
meta_window_actor_get_obscured_region (MetaWindowActor *self)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
MetaWindow *window = priv->window;
|
||||
|
||||
if (priv->back_pixmap && priv->opacity == 0xff && !priv->window->shaded)
|
||||
if (priv->back_pixmap && window->opacity != 0xFF && !priv->window->shaded)
|
||||
return priv->opaque_region;
|
||||
else
|
||||
return NULL;
|
||||
@@ -1906,8 +1838,8 @@ check_needs_pixmap (MetaWindowActor *self)
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
Window xwindow = meta_window_get_toplevel_xwindow (priv->window);
|
||||
MetaCompositor *compositor;
|
||||
Window xwindow = priv->xwindow;
|
||||
|
||||
if (!priv->needs_pixmap)
|
||||
return;
|
||||
@@ -2640,23 +2572,9 @@ void
|
||||
meta_window_actor_update_opacity (MetaWindowActor *self)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
MetaDisplay *display = meta_screen_get_display (priv->screen);
|
||||
MetaCompositor *compositor = meta_display_get_compositor (display);
|
||||
Window xwin = meta_window_get_xwindow (priv->window);
|
||||
gulong value;
|
||||
guint8 opacity;
|
||||
MetaWindow *window = priv->window;
|
||||
|
||||
if (meta_prop_get_cardinal (display, xwin,
|
||||
compositor->atom_net_wm_window_opacity,
|
||||
&value))
|
||||
{
|
||||
opacity = (guint8)((gfloat)value * 255.0 / ((gfloat)0xffffffff));
|
||||
}
|
||||
else
|
||||
opacity = 255;
|
||||
|
||||
self->priv->opacity = opacity;
|
||||
clutter_actor_set_opacity (self->priv->actor, opacity);
|
||||
clutter_actor_set_opacity (self->priv->actor, window->opacity);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -280,8 +280,7 @@ meta_core_lower_beneath_grab_window (Display *xdisplay,
|
||||
return;
|
||||
|
||||
changes.stack_mode = Below;
|
||||
changes.sibling = grab_window->frame ? grab_window->frame->xwindow
|
||||
: grab_window->xwindow;
|
||||
changes.sibling = meta_window_get_toplevel_xwindow (grab_window);
|
||||
|
||||
meta_stack_tracker_record_lower_below (screen->stack_tracker,
|
||||
xwindow,
|
||||
|
@@ -138,6 +138,14 @@ struct _MetaDisplay
|
||||
*/
|
||||
guint allow_terminal_deactivation : 1;
|
||||
|
||||
/* If true, server->focus_serial refers to us changing the focus; in
|
||||
* this case, we can ignore focus events that have exactly focus_serial,
|
||||
* since we take care to make another request immediately afterwards.
|
||||
* But if focus is being changed by another client, we have to accept
|
||||
* multiple events with the same serial.
|
||||
*/
|
||||
guint focused_by_us : 1;
|
||||
|
||||
guint static_gravity_works : 1;
|
||||
|
||||
/*< private-ish >*/
|
||||
|
@@ -1865,9 +1865,11 @@ static void
|
||||
update_focus_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
Window xwindow,
|
||||
gulong serial)
|
||||
gulong serial,
|
||||
gboolean focused_by_us)
|
||||
{
|
||||
display->focus_serial = serial;
|
||||
display->focused_by_us = focused_by_us;
|
||||
|
||||
if (display->focus_xwindow == xwindow)
|
||||
return;
|
||||
@@ -1978,7 +1980,8 @@ request_xserver_input_focus_change (MetaDisplay *display,
|
||||
update_focus_window (display,
|
||||
meta_window,
|
||||
xwindow,
|
||||
serial);
|
||||
serial,
|
||||
TRUE);
|
||||
|
||||
meta_error_trap_pop (display);
|
||||
|
||||
@@ -2092,12 +2095,20 @@ handle_window_focus_event (MetaDisplay *display,
|
||||
else
|
||||
g_return_if_reached ();
|
||||
|
||||
if (display->server_focus_serial > display->focus_serial)
|
||||
/* If display->focused_by_us, then the focus_serial will be used only
|
||||
* for a focus change we made and have already accounted for.
|
||||
* (See request_xserver_input_focus_change().) Otherwise, we can get
|
||||
* multiple focus events with the same serial.
|
||||
*/
|
||||
if (display->server_focus_serial > display->focus_serial ||
|
||||
(!display->focused_by_us &&
|
||||
display->server_focus_serial == display->focus_serial))
|
||||
{
|
||||
update_focus_window (display,
|
||||
focus_window,
|
||||
focus_window ? focus_window->xwindow : None,
|
||||
display->server_focus_serial);
|
||||
display->server_focus_serial,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2167,7 +2178,8 @@ event_callback (XEvent *event,
|
||||
display->current_time = event_get_time (display, event);
|
||||
display->monitor_cache_invalidated = TRUE;
|
||||
|
||||
if (event->xany.serial > display->focus_serial &&
|
||||
if (display->focused_by_us &&
|
||||
event->xany.serial > display->focus_serial &&
|
||||
display->focus_window &&
|
||||
!window_has_xwindow (display->focus_window, display->server_focus_window))
|
||||
{
|
||||
@@ -2176,7 +2188,8 @@ event_callback (XEvent *event,
|
||||
update_focus_window (display,
|
||||
meta_display_lookup_x_window (display, display->server_focus_window),
|
||||
display->server_focus_window,
|
||||
display->server_focus_serial);
|
||||
display->server_focus_serial,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
screen = meta_display_screen_for_root (display, event->xany.window);
|
||||
@@ -4008,7 +4021,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
* key grab on the RootWindow.
|
||||
*/
|
||||
if (grab_window)
|
||||
grab_xwindow = grab_window->frame ? grab_window->frame->xwindow : grab_window->xwindow;
|
||||
grab_xwindow = meta_window_get_toplevel_xwindow (grab_window);
|
||||
else
|
||||
grab_xwindow = screen->xroot;
|
||||
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include "ui.h"
|
||||
#include "frame.h"
|
||||
#include "place.h"
|
||||
#include "screen-private.h"
|
||||
#include <meta/prefs.h>
|
||||
#include <meta/util.h>
|
||||
|
||||
@@ -1277,7 +1278,7 @@ meta_window_grab_keys (MetaWindow *window)
|
||||
}
|
||||
|
||||
meta_window_change_keygrabs (window,
|
||||
window->frame ? window->frame->xwindow : window->xwindow,
|
||||
meta_window_get_toplevel_xwindow (window),
|
||||
TRUE);
|
||||
|
||||
window->keys_grabbed = TRUE;
|
||||
@@ -1580,7 +1581,7 @@ meta_window_grab_all_keys (MetaWindow *window,
|
||||
window->desc);
|
||||
meta_window_focus (window, timestamp);
|
||||
|
||||
grabwindow = window->frame ? window->frame->xwindow : window->xwindow;
|
||||
grabwindow = meta_window_get_toplevel_xwindow (window);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Grabbing all keys on window %s\n", window->desc);
|
||||
@@ -3973,6 +3974,26 @@ handle_move_to_workspace (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_monitor (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XIDeviceEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
gint which = binding->handler->data;
|
||||
const MetaMonitorInfo *current, *new;
|
||||
|
||||
current = meta_screen_get_monitor_for_window (screen, window);
|
||||
new = meta_screen_get_monitor_neighbor (screen, current->number, which);
|
||||
|
||||
if (new == NULL)
|
||||
return;
|
||||
|
||||
meta_window_move_to_monitor (window, new->number);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_raise_or_lower (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@@ -4629,6 +4650,34 @@ init_builtin_key_bindings (MetaDisplay *display)
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_DOWN,
|
||||
handle_move_to_workspace, META_MOTION_DOWN);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-monitor-left",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_MONITOR_LEFT,
|
||||
handle_move_to_monitor, META_SCREEN_LEFT);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-monitor-right",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_MONITOR_RIGHT,
|
||||
handle_move_to_monitor, META_SCREEN_RIGHT);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-monitor-down",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_MONITOR_DOWN,
|
||||
handle_move_to_monitor, META_SCREEN_DOWN);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-monitor-up",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_MONITOR_UP,
|
||||
handle_move_to_monitor, META_SCREEN_UP);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"raise-or-lower",
|
||||
common_keybindings,
|
||||
|
@@ -355,6 +355,9 @@ struct _MetaWindow
|
||||
/* the input shape region for picking */
|
||||
cairo_region_t *input_region;
|
||||
|
||||
/* _NET_WM_WINDOW_OPACITY */
|
||||
guint opacity;
|
||||
|
||||
/* if TRUE, the we have the new form of sync request counter which
|
||||
* also handles application frames */
|
||||
guint extended_sync_request_counter : 1;
|
||||
@@ -695,5 +698,9 @@ void meta_window_update_input_region_x11 (MetaWindow *window);
|
||||
void meta_window_set_shape_region (MetaWindow *window,
|
||||
cairo_region_t *region);
|
||||
void meta_window_update_shape_region_x11 (MetaWindow *window);
|
||||
void meta_window_set_opacity (MetaWindow *window,
|
||||
guint opacity);
|
||||
|
||||
Window meta_window_get_toplevel_xwindow (MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
@@ -1709,6 +1709,20 @@ reload_bypass_compositor (MetaWindow *window,
|
||||
window->bypass_compositor = requested_value;
|
||||
}
|
||||
|
||||
static void
|
||||
reload_window_opacity (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
|
||||
{
|
||||
int requested_value = 0xFF;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
requested_value = (int) value->v.cardinal;
|
||||
|
||||
meta_window_set_opacity (window, requested_value);
|
||||
}
|
||||
|
||||
#define RELOAD_STRING(var_name, propname) \
|
||||
static void \
|
||||
reload_ ## var_name (MetaWindow *window, \
|
||||
@@ -1811,6 +1825,7 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
|
||||
{ display->atom__NET_WM_STRUT, META_PROP_VALUE_INVALID, reload_struts, FALSE, FALSE },
|
||||
{ display->atom__NET_WM_STRUT_PARTIAL, META_PROP_VALUE_INVALID, reload_struts, FALSE, FALSE },
|
||||
{ display->atom__NET_WM_BYPASS_COMPOSITOR, META_PROP_VALUE_CARDINAL, reload_bypass_compositor, FALSE, FALSE },
|
||||
{ display->atom__NET_WM_WINDOW_OPACITY, META_PROP_VALUE_CARDINAL, reload_window_opacity, TRUE, TRUE },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
|
@@ -1201,6 +1201,8 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
||||
*/
|
||||
window->stable_sequence = ++display->window_sequence_counter;
|
||||
|
||||
window->opacity = 0xFF;
|
||||
|
||||
/* assign the window to its group, or create a new group if needed
|
||||
*/
|
||||
window->group = NULL;
|
||||
@@ -4981,6 +4983,11 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
&old_rect,
|
||||
&new_rect);
|
||||
|
||||
/* meta_window_constrain() might have maximized the window after placement,
|
||||
* changing the borders.
|
||||
*/
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
|
||||
w = new_rect.width;
|
||||
h = new_rect.height;
|
||||
root_x_nw = new_rect.x;
|
||||
@@ -11438,3 +11445,19 @@ meta_window_can_close (MetaWindow *window)
|
||||
{
|
||||
return window->has_close_func;
|
||||
}
|
||||
|
||||
Window
|
||||
meta_window_get_toplevel_xwindow (MetaWindow *window)
|
||||
{
|
||||
return window->frame ? window->frame->xwindow : window->xwindow;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_set_opacity (MetaWindow *window,
|
||||
guint opacity)
|
||||
{
|
||||
window->opacity = opacity;
|
||||
|
||||
if (window->display->compositor)
|
||||
meta_compositor_window_opacity_changed (window->display->compositor, window);
|
||||
}
|
||||
|
@@ -179,6 +179,7 @@ item(_NET_WM_BYPASS_COMPOSITOR)
|
||||
item(_NET_WM_OPAQUE_REGION)
|
||||
item(_NET_WM_FRAME_DRAWN)
|
||||
item(_NET_WM_FRAME_TIMINGS)
|
||||
item(_NET_WM_WINDOW_OPACITY)
|
||||
|
||||
#if 0
|
||||
/* We apparently never use: */
|
||||
|
@@ -66,6 +66,8 @@ void meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
|
||||
void meta_compositor_window_shape_changed (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_window_opacity_changed (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
|
||||
gboolean meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
|
@@ -243,6 +243,10 @@ void meta_prefs_set_ignore_request_hide_titlebar (gboolean whether);
|
||||
* @META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_RIGHT: FILLME
|
||||
* @META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_UP: FILLME
|
||||
* @META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_DOWN: FILLME
|
||||
* @META_KEYBINDING_ACTION_MOVE_TO_MONITOR_LEFT: FILLME
|
||||
* @META_KEYBINDING_ACTION_MOVE_TO_MONITOR_RIGHT: FILLME
|
||||
* @META_KEYBINDING_ACTION_MOVE_TO_MONITOR_UP: FILLME
|
||||
* @META_KEYBINDING_ACTION_MOVE_TO_MONITOR_DOWN: FILLME
|
||||
* @META_KEYBINDING_ACTION_RAISE_OR_LOWER: FILLME
|
||||
* @META_KEYBINDING_ACTION_RAISE: FILLME
|
||||
* @META_KEYBINDING_ACTION_LOWER: FILLME
|
||||
@@ -336,6 +340,10 @@ typedef enum _MetaKeyBindingAction
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_RIGHT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_UP,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_DOWN,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_MONITOR_LEFT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_MONITOR_RIGHT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_MONITOR_UP,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_MONITOR_DOWN,
|
||||
META_KEYBINDING_ACTION_RAISE_OR_LOWER,
|
||||
META_KEYBINDING_ACTION_RAISE,
|
||||
META_KEYBINDING_ACTION_LOWER,
|
||||
|
Reference in New Issue
Block a user