Adapt to the new Mtk library
As we plan to slowly phase out Cairo where possible in libmutter https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3128 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2873>
This commit is contained in:
parent
533f3fe69d
commit
80237b1082
@ -2,7 +2,7 @@
|
||||
|
||||
import Clutter from 'gi://Clutter';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import Mtk from 'gi://Mtk';
|
||||
import St from 'gi://St';
|
||||
|
||||
import * as Main from './main.js';
|
||||
@ -25,7 +25,7 @@ export const EdgeDragAction = GObject.registerClass({
|
||||
}
|
||||
|
||||
_getMonitorRect(x, y) {
|
||||
let rect = new Meta.Rectangle({x: x - 1, y: y - 1, width: 1, height: 1});
|
||||
const rect = new Mtk.Rectangle({x: x - 1, y: y - 1, width: 1, height: 1});
|
||||
let monitorIndex = global.display.get_monitor_index_for_rect(rect);
|
||||
|
||||
return global.display.get_monitor_geometry(monitorIndex);
|
||||
|
@ -5,6 +5,7 @@ import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import Mtk from 'gi://Mtk';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
import * as Signals from '../misc/signals.js';
|
||||
@ -985,7 +986,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
findIndexForActor(actor) {
|
||||
let [x, y] = actor.get_transformed_position();
|
||||
let [w, h] = actor.get_transformed_size();
|
||||
let rect = new Meta.Rectangle({x, y, width: w, height: h});
|
||||
const rect = new Mtk.Rectangle({x, y, width: w, height: h});
|
||||
return global.display.get_monitor_index_for_rect(rect);
|
||||
}
|
||||
|
||||
@ -1049,7 +1050,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
h = Math.round(h);
|
||||
|
||||
if (actorData.affectsInputRegion && wantsInputRegion && actorData.actor.get_paint_visibility())
|
||||
rects.push(new Meta.Rectangle({x, y, width: w, height: h}));
|
||||
rects.push(new Mtk.Rectangle({x, y, width: w, height: h}));
|
||||
|
||||
let monitor = null;
|
||||
if (actorData.affectsStruts)
|
||||
@ -1099,7 +1100,7 @@ export const LayoutManager = GObject.registerClass({
|
||||
continue;
|
||||
}
|
||||
|
||||
let strutRect = new Meta.Rectangle({x: x1, y: y1, width: x2 - x1, height: y2 - y1});
|
||||
const strutRect = new Mtk.Rectangle({x: x1, y: y1, width: x2 - x1, height: y2 - y1});
|
||||
let strut = new Meta.Strut({rect: strutRect, side});
|
||||
struts.push(strut);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import GObject from 'gi://GObject';
|
||||
import GLib from 'gi://GLib';
|
||||
import Graphene from 'gi://Graphene';
|
||||
import Meta from 'gi://Meta';
|
||||
import Mtk from 'gi://Mtk';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
|
||||
@ -2655,7 +2656,7 @@ class SelectArea extends St.Widget {
|
||||
}
|
||||
|
||||
_getGeometry() {
|
||||
return new Meta.Rectangle({
|
||||
return new Mtk.Rectangle({
|
||||
x: Math.min(this._startX, this._lastX),
|
||||
y: Math.min(this._startY, this._lastY),
|
||||
width: Math.abs(this._startX - this._lastX) + 1,
|
||||
|
@ -3,7 +3,7 @@
|
||||
import Clutter from 'gi://Clutter';
|
||||
import Gio from 'gi://Gio';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import Mtk from 'gi://Mtk';
|
||||
|
||||
import * as Main from './main.js';
|
||||
import * as Params from '../misc/params.js';
|
||||
@ -595,7 +595,7 @@ export const SwipeTracker = GObject.registerClass({
|
||||
|
||||
this._history.append(time, 0);
|
||||
|
||||
let rect = new Meta.Rectangle({x, y, width: 1, height: 1});
|
||||
const rect = new Mtk.Rectangle({x, y, width: 1, height: 1});
|
||||
let monitor = global.display.get_monitor_index_for_rect(rect);
|
||||
|
||||
this.emit('begin', monitor);
|
||||
|
@ -5,6 +5,7 @@ import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import Mtk from 'gi://Mtk';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
|
||||
@ -417,7 +418,7 @@ class TilePreview extends St.Widget {
|
||||
this._updateStyle(monitor);
|
||||
|
||||
if (!this._showing || changeMonitor) {
|
||||
const monitorRect = new Meta.Rectangle({
|
||||
const monitorRect = new Mtk.Rectangle({
|
||||
x: monitor.x,
|
||||
y: monitor.y,
|
||||
width: monitor.width,
|
||||
|
@ -4,6 +4,7 @@ import Clutter from 'gi://Clutter';
|
||||
import Gio from 'gi://Gio';
|
||||
import GObject from 'gi://GObject';
|
||||
import Meta from 'gi://Meta';
|
||||
import Mtk from 'gi://Mtk';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
|
||||
@ -1052,7 +1053,7 @@ class WorkspacesDisplay extends St.Widget {
|
||||
|
||||
_getMonitorIndexForEvent(event) {
|
||||
let [x, y] = event.get_coords();
|
||||
let rect = new Meta.Rectangle({x, y, width: 1, height: 1});
|
||||
const rect = new Mtk.Rectangle({x, y, width: 1, height: 1});
|
||||
return global.display.get_monitor_index_for_rect(rect);
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ mutter_api_version = '13'
|
||||
clutter_pc = 'mutter-clutter-' + mutter_api_version
|
||||
cogl_pc = 'mutter-cogl-' + mutter_api_version
|
||||
cogl_pango_pc = 'mutter-cogl-pango-' + mutter_api_version
|
||||
mtk_pc = 'mutter-mtk-' + mutter_api_version
|
||||
libmutter_pc = 'libmutter-' + mutter_api_version
|
||||
libmutter_test_pc = 'libmutter-test-' + mutter_api_version
|
||||
|
||||
@ -83,6 +84,7 @@ gjs_dep = dependency('gjs-1.0', version: gjs_req)
|
||||
gtk_dep = dependency('gtk4', version: gtk_req)
|
||||
libxml_dep = dependency('libxml-2.0')
|
||||
clutter_dep = dependency(clutter_pc, version: mutter_req)
|
||||
mtk_dep = dependency(mtk_pc, version: mutter_req)
|
||||
cogl_dep = dependency(cogl_pc, version: mutter_req)
|
||||
cogl_pango_dep = dependency(cogl_pango_pc, version: mutter_req)
|
||||
mutter_dep = dependency(libmutter_pc, version: mutter_req)
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <meta/meta-plugin.h>
|
||||
#include <meta/meta-x11-display.h>
|
||||
#include <meta/util.h>
|
||||
#include <mtk/mtk.h>
|
||||
|
||||
#include "shell-global-private.h"
|
||||
#include "shell-perf-log.h"
|
||||
@ -165,8 +166,8 @@ static void
|
||||
gnome_shell_plugin_size_change (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect)
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect)
|
||||
{
|
||||
_shell_wm_size_change (get_shell_wm (), actor, which_change, old_frame_rect, old_buffer_rect);
|
||||
}
|
||||
@ -212,7 +213,7 @@ gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin)
|
||||
static void
|
||||
gnome_shell_plugin_show_tile_preview (MetaPlugin *plugin,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor)
|
||||
{
|
||||
_shell_wm_show_tile_preview (get_shell_wm (), window, tile_rect, tile_monitor);
|
||||
@ -238,7 +239,7 @@ static void
|
||||
gnome_shell_plugin_show_window_menu_for_rect (MetaPlugin *plugin,
|
||||
MetaWindow *window,
|
||||
MetaWindowMenuType menu,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
_shell_wm_show_window_menu_for_rect (get_shell_wm (), window, menu, rect);
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ gnome_shell_deps = [
|
||||
atk_bridge_dep,
|
||||
gdk_pixbuf_dep,
|
||||
gjs_dep,
|
||||
mtk_dep,
|
||||
clutter_dep,
|
||||
cogl_pango_dep,
|
||||
startup_dep,
|
||||
@ -83,7 +84,7 @@ libshell_menu_sources = [
|
||||
|
||||
libshell_menu = library('gnome-shell-menu',
|
||||
sources: libshell_menu_sources,
|
||||
dependencies: [gio_dep, clutter_dep],
|
||||
dependencies: [gio_dep, clutter_dep, mtk_dep],
|
||||
include_directories: conf_inc,
|
||||
build_rpath: mutter_typelibdir,
|
||||
install_rpath: mutter_typelibdir,
|
||||
@ -271,7 +272,7 @@ executable('gnome-shell-perf-helper', 'shell-perf-helper.c', js_resources,
|
||||
)
|
||||
|
||||
executable('run-js-test', 'run-js-test.c',
|
||||
dependencies: [mutter_dep, gdk_pixbuf_dep, gio_dep, gi_dep, gjs_dep],
|
||||
dependencies: [mutter_dep, mtk_dep, gdk_pixbuf_dep, gio_dep, gi_dep, gjs_dep],
|
||||
include_directories: [conf_inc],
|
||||
link_with: libshell,
|
||||
build_rpath: mutter_typelibdir,
|
||||
|
@ -18,6 +18,8 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#include <mtk/mtk.h>
|
||||
|
||||
#include "shell-blur-effect.h"
|
||||
|
||||
#include "shell-enum-types.h"
|
||||
@ -342,7 +344,7 @@ update_actor_box (ShellBlurEffect *self,
|
||||
|
||||
if (stage_view)
|
||||
{
|
||||
cairo_rectangle_int_t stage_view_layout;
|
||||
MtkRectangle stage_view_layout;
|
||||
|
||||
box_scale_factor = clutter_stage_view_get_scale (stage_view);
|
||||
clutter_stage_view_get_layout (stage_view, &stage_view_layout);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <meta/meta-settings.h>
|
||||
#include <meta/meta-workspace-manager.h>
|
||||
#include <meta/meta-x11-display.h>
|
||||
#include <mtk/mtk.h>
|
||||
|
||||
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
||||
#include <libgnome-desktop/gnome-systemd.h>
|
||||
@ -844,7 +845,7 @@ sync_input_region (ShellGlobal *global)
|
||||
/**
|
||||
* shell_global_set_stage_input_region:
|
||||
* @global: the #ShellGlobal
|
||||
* @rectangles: (element-type Meta.Rectangle): a list of #MetaRectangle
|
||||
* @rectangles: (element-type Mtk.Rectangle): a list of #MtkRectangle
|
||||
* describing the input region.
|
||||
*
|
||||
* Sets the area of the stage that is responsive to mouse clicks when
|
||||
@ -854,7 +855,7 @@ void
|
||||
shell_global_set_stage_input_region (ShellGlobal *global,
|
||||
GSList *rectangles)
|
||||
{
|
||||
MetaRectangle *rect;
|
||||
MtkRectangle *rect;
|
||||
XRectangle *rects;
|
||||
int nrects, i;
|
||||
GSList *r;
|
||||
@ -868,7 +869,7 @@ shell_global_set_stage_input_region (ShellGlobal *global,
|
||||
rects = g_new (XRectangle, nrects);
|
||||
for (r = rectangles, i = 0; r; r = r->next, i++)
|
||||
{
|
||||
rect = (MetaRectangle *)r->data;
|
||||
rect = (MtkRectangle *)r->data;
|
||||
rects[i].x = rect->x;
|
||||
rects[i].y = rect->y;
|
||||
rects[i].width = rect->width;
|
||||
|
@ -54,7 +54,7 @@ struct _ShellScreenshotPrivate
|
||||
GDateTime *datetime;
|
||||
|
||||
cairo_surface_t *image;
|
||||
cairo_rectangle_int_t screenshot_area;
|
||||
MtkRectangle screenshot_area;
|
||||
|
||||
gboolean include_frame;
|
||||
|
||||
@ -77,7 +77,7 @@ shell_screenshot_class_init (ShellScreenshotClass *screenshot_class)
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
META_TYPE_RECTANGLE);
|
||||
MTK_TYPE_RECTANGLE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -329,7 +329,7 @@ do_grab_screenshot (ShellScreenshot *screenshot,
|
||||
{
|
||||
ShellScreenshotPrivate *priv = screenshot->priv;
|
||||
ClutterStage *stage = shell_global_get_stage (priv->global);
|
||||
cairo_rectangle_int_t screenshot_rect = { x, y, width, height };
|
||||
MtkRectangle screenshot_rect = { x, y, width, height };
|
||||
int image_width;
|
||||
int image_height;
|
||||
float scale;
|
||||
@ -367,7 +367,7 @@ do_grab_screenshot (ShellScreenshot *screenshot,
|
||||
|
||||
static void
|
||||
draw_cursor_image (cairo_surface_t *surface,
|
||||
cairo_rectangle_int_t area)
|
||||
MtkRectangle area)
|
||||
{
|
||||
CoglTexture *texture;
|
||||
int width, height;
|
||||
@ -420,7 +420,7 @@ draw_cursor_image (cairo_surface_t *surface,
|
||||
{
|
||||
int monitor;
|
||||
float monitor_scale;
|
||||
MetaRectangle cursor_rect = {
|
||||
MtkRectangle cursor_rect = {
|
||||
.x = x, .y = y, .width = width, .height = height
|
||||
};
|
||||
|
||||
@ -477,7 +477,7 @@ grab_screenshot_content (ShellScreenshot *screenshot,
|
||||
ShellScreenshotPrivate *priv = screenshot->priv;
|
||||
MetaDisplay *display;
|
||||
int width, height;
|
||||
cairo_rectangle_int_t screenshot_rect;
|
||||
MtkRectangle screenshot_rect;
|
||||
ClutterStage *stage;
|
||||
int image_width;
|
||||
int image_height;
|
||||
@ -491,7 +491,7 @@ grab_screenshot_content (ShellScreenshot *screenshot,
|
||||
|
||||
display = shell_global_get_display (priv->global);
|
||||
meta_display_get_size (display, &width, &height);
|
||||
screenshot_rect = (cairo_rectangle_int_t) {
|
||||
screenshot_rect = (MtkRectangle) {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = width,
|
||||
@ -571,7 +571,7 @@ grab_screenshot_content (ShellScreenshot *screenshot,
|
||||
// MetaCursorRenderer.
|
||||
if (view)
|
||||
{
|
||||
cairo_rectangle_int_t view_layout;
|
||||
MtkRectangle view_layout;
|
||||
float view_scale;
|
||||
|
||||
clutter_stage_view_get_layout (view, &view_layout);
|
||||
@ -604,7 +604,7 @@ grab_window_screenshot (ShellScreenshot *screenshot,
|
||||
MetaWindow *window = meta_display_get_focus_window (display);
|
||||
ClutterActor *window_actor;
|
||||
gfloat actor_x, actor_y;
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
window_actor = CLUTTER_ACTOR (meta_window_get_compositor_private (window));
|
||||
clutter_actor_get_position (window_actor, &actor_x, &actor_y);
|
||||
@ -652,7 +652,7 @@ grab_window_screenshot (ShellScreenshot *screenshot,
|
||||
static gboolean
|
||||
finish_screenshot (ShellScreenshot *screenshot,
|
||||
GAsyncResult *result,
|
||||
cairo_rectangle_int_t **area,
|
||||
MtkRectangle **area,
|
||||
GError **error)
|
||||
{
|
||||
ShellScreenshotPrivate *priv = screenshot->priv;
|
||||
@ -697,7 +697,7 @@ on_after_paint (ClutterStage *stage,
|
||||
}
|
||||
|
||||
g_signal_emit (screenshot, signals[SCREENSHOT_TAKEN], 0,
|
||||
(cairo_rectangle_int_t *) &priv->screenshot_area);
|
||||
(MtkRectangle *) &priv->screenshot_area);
|
||||
|
||||
meta_enable_unredirect_for_display (display);
|
||||
}
|
||||
@ -759,7 +759,7 @@ shell_screenshot_screenshot (ShellScreenshot *screenshot,
|
||||
grab_screenshot (screenshot, flags, result);
|
||||
|
||||
g_signal_emit (screenshot, signals[SCREENSHOT_TAKEN], 0,
|
||||
(cairo_rectangle_int_t *) &priv->screenshot_area);
|
||||
(MtkRectangle *) &priv->screenshot_area);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -791,7 +791,7 @@ shell_screenshot_screenshot (ShellScreenshot *screenshot,
|
||||
gboolean
|
||||
shell_screenshot_screenshot_finish (ShellScreenshot *screenshot,
|
||||
GAsyncResult *result,
|
||||
cairo_rectangle_int_t **area,
|
||||
MtkRectangle **area,
|
||||
GError **error)
|
||||
{
|
||||
g_return_val_if_fail (SHELL_IS_SCREENSHOT (screenshot), FALSE);
|
||||
@ -989,7 +989,7 @@ shell_screenshot_screenshot_area (ShellScreenshot *screenshot,
|
||||
SHELL_SCREENSHOT_FLAG_NONE);
|
||||
|
||||
g_signal_emit (screenshot, signals[SCREENSHOT_TAKEN], 0,
|
||||
(cairo_rectangle_int_t *) &priv->screenshot_area);
|
||||
(MtkRectangle *) &priv->screenshot_area);
|
||||
|
||||
task = g_task_new (screenshot, NULL, on_screenshot_written, result);
|
||||
g_task_run_in_thread (task, write_screenshot_thread);
|
||||
@ -1024,7 +1024,7 @@ shell_screenshot_screenshot_area (ShellScreenshot *screenshot,
|
||||
gboolean
|
||||
shell_screenshot_screenshot_area_finish (ShellScreenshot *screenshot,
|
||||
GAsyncResult *result,
|
||||
cairo_rectangle_int_t **area,
|
||||
MtkRectangle **area,
|
||||
GError **error)
|
||||
{
|
||||
g_return_val_if_fail (SHELL_IS_SCREENSHOT (screenshot), FALSE);
|
||||
@ -1107,7 +1107,7 @@ shell_screenshot_screenshot_window (ShellScreenshot *screenshot,
|
||||
gboolean
|
||||
shell_screenshot_screenshot_window_finish (ShellScreenshot *screenshot,
|
||||
GAsyncResult *result,
|
||||
cairo_rectangle_int_t **area,
|
||||
MtkRectangle **area,
|
||||
GError **error)
|
||||
{
|
||||
g_return_val_if_fail (SHELL_IS_SCREENSHOT (screenshot), FALSE);
|
||||
|
@ -2,6 +2,8 @@
|
||||
#ifndef __SHELL_SCREENSHOT_H__
|
||||
#define __SHELL_SCREENSHOT_H__
|
||||
|
||||
#include <mtk/mtk.h>
|
||||
|
||||
/**
|
||||
* SECTION:shell-screenshot
|
||||
* @short_description: Grabs screenshots of areas and/or windows
|
||||
@ -26,7 +28,7 @@ void shell_screenshot_screenshot_area (ShellScreenshot *screenshot,
|
||||
gpointer user_data);
|
||||
gboolean shell_screenshot_screenshot_area_finish (ShellScreenshot *screenshot,
|
||||
GAsyncResult *result,
|
||||
cairo_rectangle_int_t **area,
|
||||
MtkRectangle **area,
|
||||
GError **error);
|
||||
|
||||
void shell_screenshot_screenshot_window (ShellScreenshot *screenshot,
|
||||
@ -37,7 +39,7 @@ void shell_screenshot_screenshot_window (ShellScreenshot *screenshot,
|
||||
gpointer user_data);
|
||||
gboolean shell_screenshot_screenshot_window_finish (ShellScreenshot *screenshot,
|
||||
GAsyncResult *result,
|
||||
cairo_rectangle_int_t **area,
|
||||
MtkRectangle **area,
|
||||
GError **error);
|
||||
|
||||
void shell_screenshot_screenshot (ShellScreenshot *screenshot,
|
||||
@ -47,7 +49,7 @@ void shell_screenshot_screenshot (ShellScreenshot *screenshot,
|
||||
gpointer user_data);
|
||||
gboolean shell_screenshot_screenshot_finish (ShellScreenshot *screenshot,
|
||||
GAsyncResult *result,
|
||||
cairo_rectangle_int_t **area,
|
||||
MtkRectangle **area,
|
||||
GError **error);
|
||||
|
||||
void shell_screenshot_screenshot_stage_to_content (ShellScreenshot *screenshot,
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <meta/window.h>
|
||||
#include <mtk/mtk.h>
|
||||
|
||||
#include "shell-window-preview-layout.h"
|
||||
|
||||
typedef struct _ShellWindowPreviewLayoutPrivate ShellWindowPreviewLayoutPrivate;
|
||||
@ -155,7 +157,7 @@ shell_window_preview_layout_allocate (ClutterLayoutManager *layout,
|
||||
|
||||
if (window_info)
|
||||
{
|
||||
MetaRectangle buffer_rect;
|
||||
MtkRectangle buffer_rect;
|
||||
float child_nat_width, child_nat_height;
|
||||
|
||||
meta_window_get_buffer_rect (window_info->window, &buffer_rect);
|
||||
@ -193,7 +195,7 @@ on_layout_changed (ShellWindowPreviewLayout *self)
|
||||
GHashTableIter iter;
|
||||
gpointer value;
|
||||
gboolean first_rect = TRUE;
|
||||
MetaRectangle bounding_rect = { 0, };
|
||||
MtkRectangle bounding_rect = { 0, };
|
||||
ClutterActorBox old_bounding_box;
|
||||
|
||||
priv = shell_window_preview_layout_get_instance_private (self);
|
||||
@ -208,7 +210,7 @@ on_layout_changed (ShellWindowPreviewLayout *self)
|
||||
while (g_hash_table_iter_next (&iter, NULL, &value))
|
||||
{
|
||||
WindowInfo *window_info = value;
|
||||
MetaRectangle frame_rect;
|
||||
MtkRectangle frame_rect;
|
||||
|
||||
meta_window_get_frame_rect (window_info->window, &frame_rect);
|
||||
|
||||
@ -219,7 +221,7 @@ on_layout_changed (ShellWindowPreviewLayout *self)
|
||||
continue;
|
||||
}
|
||||
|
||||
meta_rectangle_union (&frame_rect, &bounding_rect, &bounding_rect);
|
||||
mtk_rectangle_union (&frame_rect, &bounding_rect, &bounding_rect);
|
||||
}
|
||||
|
||||
clutter_actor_box_set_origin (&priv->bounding_box,
|
||||
|
@ -3,6 +3,7 @@
|
||||
#define __SHELL_WM_PRIVATE_H__
|
||||
|
||||
#include "shell-wm.h"
|
||||
#include <mtk/mtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -17,8 +18,8 @@ void _shell_wm_size_changed(ShellWM *wm,
|
||||
void _shell_wm_size_change(ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect);
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect);
|
||||
void _shell_wm_map (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_destroy (ShellWM *wm,
|
||||
@ -34,7 +35,7 @@ void _shell_wm_kill_switch_workspace (ShellWM *wm);
|
||||
|
||||
void _shell_wm_show_tile_preview (ShellWM *wm,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor);
|
||||
void _shell_wm_hide_tile_preview (ShellWM *wm);
|
||||
void _shell_wm_show_window_menu (ShellWM *wm,
|
||||
@ -45,7 +46,7 @@ void _shell_wm_show_window_menu (ShellWM *wm,
|
||||
void _shell_wm_show_window_menu_for_rect (ShellWM *wm,
|
||||
MetaWindow *window,
|
||||
MetaWindowMenuType menu,
|
||||
MetaRectangle *rect);
|
||||
MtkRectangle *rect);
|
||||
|
||||
gboolean _shell_wm_filter_keybinding (ShellWM *wm,
|
||||
MetaKeyBinding *binding);
|
||||
|
@ -92,7 +92,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 4,
|
||||
META_TYPE_WINDOW_ACTOR, META_TYPE_SIZE_CHANGE, META_TYPE_RECTANGLE, META_TYPE_RECTANGLE);
|
||||
META_TYPE_WINDOW_ACTOR, META_TYPE_SIZE_CHANGE, MTK_TYPE_RECTANGLE, MTK_TYPE_RECTANGLE);
|
||||
shell_wm_signals[MAP] =
|
||||
g_signal_new ("map",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -139,7 +139,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
META_TYPE_WINDOW,
|
||||
META_TYPE_RECTANGLE,
|
||||
MTK_TYPE_RECTANGLE,
|
||||
G_TYPE_INT);
|
||||
shell_wm_signals[HIDE_TILE_PREVIEW] =
|
||||
g_signal_new ("hide-tile-preview",
|
||||
@ -154,7 +154,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
META_TYPE_WINDOW, G_TYPE_INT, META_TYPE_RECTANGLE);
|
||||
META_TYPE_WINDOW, G_TYPE_INT, MTK_TYPE_RECTANGLE);
|
||||
shell_wm_signals[FILTER_KEYBINDING] =
|
||||
g_signal_new ("filter-keybinding",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -320,7 +320,7 @@ _shell_wm_kill_window_effects (ShellWM *wm,
|
||||
void
|
||||
_shell_wm_show_tile_preview (ShellWM *wm,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *tile_rect,
|
||||
MtkRectangle *tile_rect,
|
||||
int tile_monitor)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[SHOW_TILE_PREVIEW], 0,
|
||||
@ -340,7 +340,7 @@ _shell_wm_show_window_menu (ShellWM *wm,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
MtkRectangle rect;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
@ -353,7 +353,7 @@ void
|
||||
_shell_wm_show_window_menu_for_rect (ShellWM *wm,
|
||||
MetaWindow *window,
|
||||
MetaWindowMenuType menu,
|
||||
MetaRectangle *rect)
|
||||
MtkRectangle *rect)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[SHOW_WINDOW_MENU], 0, window, menu, rect);
|
||||
}
|
||||
@ -383,8 +383,8 @@ void
|
||||
_shell_wm_size_change (ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
MetaSizeChange which_change,
|
||||
MetaRectangle *old_frame_rect,
|
||||
MetaRectangle *old_buffer_rect)
|
||||
MtkRectangle *old_frame_rect,
|
||||
MtkRectangle *old_buffer_rect)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[SIZE_CHANGE], 0, actor, which_change, old_frame_rect, old_buffer_rect);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "shell-global.h"
|
||||
#include <meta/meta-workspace-manager.h>
|
||||
#include <mtk/mtk.h>
|
||||
|
||||
#define BACKGROUND_MARGIN 12
|
||||
|
||||
@ -27,8 +28,8 @@ struct _ShellWorkspaceBackground
|
||||
int monitor_index;
|
||||
double state_adjustment_value;
|
||||
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle monitor_geometry;
|
||||
MtkRectangle work_area;
|
||||
MtkRectangle monitor_geometry;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (ShellWorkspaceBackground, shell_workspace_background, ST_TYPE_WIDGET);
|
||||
|
@ -183,7 +183,7 @@ st_cflags = [
|
||||
libst = shared_library('st-' + mutter_api_version,
|
||||
sources: st_gir_sources + st_nogir_sources + croco_sources,
|
||||
c_args: st_cflags,
|
||||
dependencies: [clutter_dep, mutter_dep, libxml_dep, gdk_pixbuf_dep, m_dep, schemas_dep],
|
||||
dependencies: [mtk_dep, clutter_dep, mutter_dep, libxml_dep, gdk_pixbuf_dep, m_dep, schemas_dep],
|
||||
build_rpath: mutter_typelibdir,
|
||||
install_rpath: mutter_typelibdir,
|
||||
install_dir: pkglibdir,
|
||||
@ -199,7 +199,7 @@ if get_option('tests')
|
||||
test_theme = executable('test-theme',
|
||||
sources: 'test-theme.c',
|
||||
c_args: st_cflags,
|
||||
dependencies: [mutter_test_dep, libxml_dep],
|
||||
dependencies: [mutter_test_dep, mtk_dep, libxml_dep],
|
||||
build_rpath: mutter_typelibdir,
|
||||
link_with: libst
|
||||
)
|
||||
|
@ -9,6 +9,6 @@ tray_sources = [
|
||||
|
||||
libtray = static_library('tray', tray_sources,
|
||||
c_args: ['-DG_LOG_DOMAIN="notification_area"'],
|
||||
dependencies: [mutter_dep],
|
||||
dependencies: [mutter_dep, mtk_dep],
|
||||
include_directories: conf_inc
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user