2009-06-25 18:56:15 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
#ifndef META_COMPOSITOR_PRIVATE_H
|
|
|
|
#define META_COMPOSITOR_PRIVATE_H
|
|
|
|
|
2009-06-26 15:33:20 -04:00
|
|
|
#include <X11/extensions/Xfixes.h>
|
|
|
|
|
2018-07-10 10:36:24 +02:00
|
|
|
#include "clutter/clutter.h"
|
|
|
|
#include "compositor/meta-plugin-manager.h"
|
|
|
|
#include "compositor/meta-window-actor-private.h"
|
|
|
|
#include "meta/compositor.h"
|
|
|
|
#include "meta/display.h"
|
2009-06-25 18:56:15 -04:00
|
|
|
|
2019-08-14 19:04:41 +02:00
|
|
|
/* Wait 2ms after vblank before starting to draw next frame */
|
|
|
|
#define META_SYNC_DELAY 2
|
2014-05-12 15:11:53 +02:00
|
|
|
|
2020-03-03 09:32:33 +01:00
|
|
|
typedef struct _MetaLaters MetaLaters;
|
|
|
|
|
2019-08-14 19:04:41 +02:00
|
|
|
struct _MetaCompositorClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2019-08-14 23:25:54 +02:00
|
|
|
|
2020-03-03 09:27:33 +01:00
|
|
|
gboolean (* manage) (MetaCompositor *compositor,
|
|
|
|
GError **error);
|
2019-08-14 23:25:54 +02:00
|
|
|
void (* unmanage) (MetaCompositor *compositor);
|
clutter: Paint views with individual frame clocks
Replace the default master clock with multiple frame clocks, each
driving its own stage view. As each stage view represents one CRTC, this
means we draw each CRTC with its own designated frame clock,
disconnected from all the others.
For example this means we when using the native backend will never need
to wait for one monitor to vsync before painting another, so e.g. having
a 144 Hz monitor next to a 60 Hz monitor, things including both Wayland
and X11 applications and shell UI will be able to render at the
corresponding monitor refresh rate.
This also changes a warning about missed frames when sending
_NETWM_FRAME_TIMINGS messages to a debug log entry, as it's expected
that we'll start missing frames e.g. when a X11 window (via Xwayland) is
exclusively within a stage view that was not painted, while another one
was, still increasing the global frame clock.
Addititonally, this also requires the X11 window actor to schedule
timeouts for _NET_WM_FRAME_DRAWN/_NET_WM_FRAME_TIMINGS event emitting,
if the actor wasn't on any stage views, as now we'll only get the frame
callbacks on actors when they actually were painted, while in the past,
we'd invoke that vfunc when anything was painted.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/903
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
2020-05-30 00:27:56 +02:00
|
|
|
void (* before_paint) (MetaCompositor *compositor,
|
|
|
|
ClutterStageView *stage_view);
|
|
|
|
void (* after_paint) (MetaCompositor *compositor,
|
|
|
|
ClutterStageView *stage_view);
|
2019-08-14 23:25:54 +02:00
|
|
|
void (* remove_window) (MetaCompositor *compositor,
|
|
|
|
MetaWindow *window);
|
2009-06-26 15:33:20 -04:00
|
|
|
};
|
|
|
|
|
2020-03-03 09:27:33 +01:00
|
|
|
gboolean meta_compositor_do_manage (MetaCompositor *compositor,
|
|
|
|
GError **error);
|
|
|
|
|
2019-08-14 19:04:41 +02:00
|
|
|
void meta_compositor_remove_window_actor (MetaCompositor *compositor,
|
|
|
|
MetaWindowActor *window_actor);
|
2012-11-12 14:11:08 -05:00
|
|
|
|
2014-03-18 17:31:22 -04:00
|
|
|
void meta_switch_workspace_completed (MetaCompositor *compositor);
|
2010-10-18 13:27:14 -04:00
|
|
|
|
2014-03-18 17:31:22 -04:00
|
|
|
gboolean meta_begin_modal_for_plugin (MetaCompositor *compositor,
|
2010-10-18 13:27:14 -04:00
|
|
|
MetaPlugin *plugin,
|
|
|
|
MetaModalOptions options,
|
|
|
|
guint32 timestamp);
|
2014-03-18 17:31:22 -04:00
|
|
|
void meta_end_modal_for_plugin (MetaCompositor *compositor,
|
2010-10-18 13:27:14 -04:00
|
|
|
MetaPlugin *plugin,
|
|
|
|
guint32 timestamp);
|
|
|
|
|
2019-08-14 19:04:41 +02:00
|
|
|
MetaPluginManager * meta_compositor_get_plugin_manager (MetaCompositor *compositor);
|
|
|
|
|
2012-11-12 14:09:38 -05:00
|
|
|
gint64 meta_compositor_monotonic_time_to_server_time (MetaDisplay *display,
|
|
|
|
gint64 monotonic_time);
|
|
|
|
|
2016-03-08 12:10:21 +08:00
|
|
|
void meta_compositor_flash_window (MetaCompositor *compositor,
|
|
|
|
MetaWindow *window);
|
|
|
|
|
2017-01-26 19:48:52 +01:00
|
|
|
MetaCloseDialog * meta_compositor_create_close_dialog (MetaCompositor *compositor,
|
|
|
|
MetaWindow *window);
|
|
|
|
|
2017-06-14 11:20:54 +02:00
|
|
|
MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor,
|
|
|
|
MetaWindow *window);
|
|
|
|
|
2019-02-20 11:07:22 +01:00
|
|
|
void meta_compositor_locate_pointer (MetaCompositor *compositor);
|
|
|
|
|
2019-05-24 21:04:56 +02:00
|
|
|
void meta_compositor_redirect_x11_windows (MetaCompositor *compositor);
|
|
|
|
|
2019-08-14 23:25:54 +02:00
|
|
|
gboolean meta_compositor_is_unredirect_inhibited (MetaCompositor *compositor);
|
|
|
|
|
2019-08-14 19:04:41 +02:00
|
|
|
MetaDisplay * meta_compositor_get_display (MetaCompositor *compositor);
|
|
|
|
|
2019-08-14 23:25:54 +02:00
|
|
|
MetaWindowActor * meta_compositor_get_top_window_actor (MetaCompositor *compositor);
|
2019-08-14 19:04:41 +02:00
|
|
|
|
|
|
|
ClutterStage * meta_compositor_get_stage (MetaCompositor *compositor);
|
|
|
|
|
|
|
|
gboolean meta_compositor_is_switching_workspace (MetaCompositor *compositor);
|
|
|
|
|
2020-03-03 09:32:33 +01:00
|
|
|
MetaLaters * meta_compositor_get_laters (MetaCompositor *compositor);
|
|
|
|
|
2009-06-25 18:56:15 -04:00
|
|
|
#endif /* META_COMPOSITOR_PRIVATE_H */
|