Compare commits
11 Commits
3.32.0
...
wip/fmuell
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7bd33e7b00 | ||
![]() |
f8d62da2dc | ||
![]() |
303e02bdac | ||
![]() |
e2525f286d | ||
![]() |
9b8510ac56 | ||
![]() |
8a87e87a05 | ||
![]() |
9aca31c814 | ||
![]() |
a555a2c8eb | ||
![]() |
32504ae917 | ||
![]() |
80ceeb2848 | ||
![]() |
1574099449 |
@@ -78,7 +78,7 @@ typedef struct _CoglTexture2DSliced CoglTexture2DSliced;
|
||||
GType cogl_texture_2d_sliced_get_gtype (void);
|
||||
|
||||
/**
|
||||
* cogl_texture_2d_sliced_new_with_size:
|
||||
* cogl_texture_2d_sliced_new_with_size: (skip)
|
||||
* @ctx: A #CoglContext
|
||||
* @width: The virtual width of your sliced texture.
|
||||
* @height: The virtual height of your sliced texture.
|
||||
@@ -125,7 +125,7 @@ cogl_texture_2d_sliced_new_with_size (CoglContext *ctx,
|
||||
int max_waste);
|
||||
|
||||
/**
|
||||
* cogl_texture_2d_sliced_new_from_file:
|
||||
* cogl_texture_2d_sliced_new_from_file: (skip)
|
||||
* @ctx: A #CoglContext
|
||||
* @filename: the file to load
|
||||
* @max_waste: The threshold of how wide a strip of wasted texels
|
||||
@@ -173,7 +173,7 @@ cogl_texture_2d_sliced_new_from_file (CoglContext *ctx,
|
||||
CoglError **error);
|
||||
|
||||
/**
|
||||
* cogl_texture_2d_sliced_new_from_data:
|
||||
* cogl_texture_2d_sliced_new_from_data: (skip)
|
||||
* @ctx: A #CoglContext
|
||||
* @width: width of texture in pixels
|
||||
* @height: height of texture in pixels
|
||||
|
@@ -86,7 +86,7 @@ gboolean
|
||||
cogl_is_texture_2d (void *object);
|
||||
|
||||
/**
|
||||
* cogl_texture_2d_new_with_size:
|
||||
* cogl_texture_2d_new_with_size: (skip)
|
||||
* @ctx: A #CoglContext
|
||||
* @width: Width of the texture to allocate
|
||||
* @height: Height of the texture to allocate
|
||||
@@ -120,7 +120,7 @@ cogl_texture_2d_new_with_size (CoglContext *ctx,
|
||||
int height);
|
||||
|
||||
/**
|
||||
* cogl_texture_2d_new_from_file:
|
||||
* cogl_texture_2d_new_from_file: (skip)
|
||||
* @ctx: A #CoglContext
|
||||
* @filename: the file to load
|
||||
* @error: A #CoglError to catch exceptional errors or %NULL
|
||||
@@ -154,7 +154,7 @@ cogl_texture_2d_new_from_file (CoglContext *ctx,
|
||||
CoglError **error);
|
||||
|
||||
/**
|
||||
* cogl_texture_2d_new_from_data:
|
||||
* cogl_texture_2d_new_from_data: (skip)
|
||||
* @ctx: A #CoglContext
|
||||
* @width: width of texture in pixels
|
||||
* @height: height of texture in pixels
|
||||
@@ -231,6 +231,9 @@ cogl_texture_2d_new_from_data (CoglContext *ctx,
|
||||
CoglTexture2D *
|
||||
cogl_texture_2d_new_from_bitmap (CoglBitmap *bitmap);
|
||||
|
||||
/**
|
||||
* cogl_egl_texture_2d_new_from_image: (skip)
|
||||
*/
|
||||
#if defined (COGL_HAS_EGL_SUPPORT) && defined (EGL_KHR_image_base)
|
||||
/* NB: The reason we require the width, height and format to be passed
|
||||
* even though they may seem redundant is because GLES 1/2 don't
|
||||
@@ -247,6 +250,9 @@ typedef gboolean (*CoglTexture2DEGLImageExternalAlloc) (CoglTexture2D *tex_2d,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
/**
|
||||
* cogl_texture_2d_new_from_egl_image_external: (skip)
|
||||
*/
|
||||
CoglTexture2D *
|
||||
cogl_texture_2d_new_from_egl_image_external (CoglContext *ctx,
|
||||
int width,
|
||||
|
@@ -171,15 +171,6 @@ struct _CoglTextureDriver
|
||||
int height,
|
||||
int depth);
|
||||
|
||||
/*
|
||||
* This driver abstraction is needed because GLES doesn't support setting
|
||||
* a texture border color.
|
||||
*/
|
||||
void
|
||||
(* try_setting_gl_border_color) (CoglContext *ctx,
|
||||
GLuint gl_target,
|
||||
const GLfloat *transparent_color);
|
||||
|
||||
/*
|
||||
* It may depend on the driver as to what texture targets may be used when
|
||||
* creating a foreign texture. E.g. OpenGL supports ARB_texture_rectangle
|
||||
|
@@ -485,19 +485,6 @@ _cogl_texture_driver_size_supported (CoglContext *ctx,
|
||||
return new_width != 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_cogl_texture_driver_try_setting_gl_border_color
|
||||
(CoglContext *ctx,
|
||||
GLuint gl_target,
|
||||
const GLfloat *transparent_color)
|
||||
{
|
||||
/* Use a transparent border color so that we can leave the
|
||||
color buffer alone when using texture co-ordinates
|
||||
outside of the texture */
|
||||
GE( ctx, glTexParameterfv (gl_target, GL_TEXTURE_BORDER_COLOR,
|
||||
transparent_color) );
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cogl_texture_driver_allows_foreign_gl_target (CoglContext *ctx,
|
||||
GLenum gl_target)
|
||||
@@ -541,7 +528,6 @@ _cogl_texture_driver_gl =
|
||||
_cogl_texture_driver_gl_get_tex_image,
|
||||
_cogl_texture_driver_size_supported,
|
||||
_cogl_texture_driver_size_supported_3d,
|
||||
_cogl_texture_driver_try_setting_gl_border_color,
|
||||
_cogl_texture_driver_allows_foreign_gl_target,
|
||||
_cogl_texture_driver_find_best_gl_get_data_format
|
||||
};
|
||||
|
@@ -590,15 +590,6 @@ _cogl_texture_driver_size_supported (CoglContext *ctx,
|
||||
return width <= max_size && height <= max_size;
|
||||
}
|
||||
|
||||
static void
|
||||
_cogl_texture_driver_try_setting_gl_border_color
|
||||
(CoglContext *ctx,
|
||||
GLuint gl_target,
|
||||
const GLfloat *transparent_color)
|
||||
{
|
||||
/* FAIL! */
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_cogl_texture_driver_allows_foreign_gl_target (CoglContext *ctx,
|
||||
GLenum gl_target)
|
||||
@@ -636,7 +627,6 @@ _cogl_texture_driver_gles =
|
||||
_cogl_texture_driver_gl_get_tex_image,
|
||||
_cogl_texture_driver_size_supported,
|
||||
_cogl_texture_driver_size_supported_3d,
|
||||
_cogl_texture_driver_try_setting_gl_border_color,
|
||||
_cogl_texture_driver_allows_foreign_gl_target,
|
||||
_cogl_texture_driver_find_best_gl_get_data_format
|
||||
};
|
||||
|
@@ -89,6 +89,8 @@ cogl_headers = [
|
||||
'cogl-pipeline-layer-state.h',
|
||||
'cogl-primitives.h',
|
||||
'cogl-texture.h',
|
||||
'cogl-texture-2d.h',
|
||||
'cogl-texture-2d-sliced.h',
|
||||
'cogl-types.h',
|
||||
'cogl.h',
|
||||
]
|
||||
@@ -117,10 +119,8 @@ cogl_nonintrospected_headers = [
|
||||
'cogl-matrix-stack.h',
|
||||
'cogl-poll.h',
|
||||
'cogl-texture-3d.h',
|
||||
'cogl-texture-2d.h',
|
||||
'cogl-texture-2d-gl.h',
|
||||
'cogl-texture-rectangle.h',
|
||||
'cogl-texture-2d-sliced.h',
|
||||
'cogl-sub-texture.h',
|
||||
'cogl-atlas-texture.h',
|
||||
'cogl-meta-texture.h',
|
||||
|
@@ -694,11 +694,11 @@ meta_monitor_manager_dummy_calculate_monitor_mode_scale (MetaMonitorManager *man
|
||||
}
|
||||
|
||||
static float *
|
||||
meta_monitor_manager_dummy_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
meta_monitor_manager_dummy_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
{
|
||||
MetaMonitorScalesConstraint constraints =
|
||||
META_MONITOR_SCALES_CONSTRAINT_NONE;
|
||||
|
@@ -400,11 +400,11 @@ meta_monitor_manager_calculate_monitor_mode_scale (MetaMonitorManager *manager,
|
||||
}
|
||||
|
||||
float *
|
||||
meta_monitor_manager_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
meta_monitor_manager_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
{
|
||||
MetaMonitorManagerClass *manager_class =
|
||||
META_MONITOR_MANAGER_GET_CLASS (manager);
|
||||
|
@@ -615,12 +615,12 @@ meta_monitor_normal_get_suggested_position (MetaMonitor *monitor,
|
||||
}
|
||||
|
||||
static void
|
||||
meta_monitor_normal_calculate_crtc_pos (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y)
|
||||
meta_monitor_normal_calculate_crtc_pos (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y)
|
||||
{
|
||||
*out_x = 0;
|
||||
*out_y = 0;
|
||||
@@ -1267,12 +1267,12 @@ meta_monitor_tiled_get_suggested_position (MetaMonitor *monitor,
|
||||
}
|
||||
|
||||
static void
|
||||
meta_monitor_tiled_calculate_crtc_pos (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y)
|
||||
meta_monitor_tiled_calculate_crtc_pos (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y)
|
||||
{
|
||||
MetaMonitorModeTiled *mode_tiled = (MetaMonitorModeTiled *) monitor_mode;
|
||||
|
||||
@@ -1461,12 +1461,12 @@ meta_monitor_get_modes (MetaMonitor *monitor)
|
||||
}
|
||||
|
||||
void
|
||||
meta_monitor_calculate_crtc_pos (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y)
|
||||
meta_monitor_calculate_crtc_pos (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y)
|
||||
{
|
||||
META_MONITOR_GET_CLASS (monitor)->calculate_crtc_pos (monitor,
|
||||
monitor_mode,
|
||||
@@ -1587,7 +1587,6 @@ get_closest_scale_factor_for_resolution (float width,
|
||||
float scaled_w;
|
||||
float best_scale;
|
||||
int base_scaled_w;
|
||||
gboolean limit_exceeded;
|
||||
gboolean found_one;
|
||||
|
||||
best_scale = 0;
|
||||
@@ -1604,7 +1603,6 @@ get_closest_scale_factor_for_resolution (float width,
|
||||
|
||||
i = 0;
|
||||
found_one = FALSE;
|
||||
limit_exceeded = FALSE;
|
||||
base_scaled_w = floorf (scaled_w);
|
||||
|
||||
do
|
||||
@@ -1637,17 +1635,17 @@ get_closest_scale_factor_for_resolution (float width,
|
||||
|
||||
i++;
|
||||
}
|
||||
while (!found_one && !limit_exceeded);
|
||||
while (!found_one);
|
||||
|
||||
out:
|
||||
return best_scale;
|
||||
}
|
||||
|
||||
float *
|
||||
meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaMonitorScalesConstraint constraints,
|
||||
int *n_supported_scales)
|
||||
meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaMonitorScalesConstraint constraints,
|
||||
int *n_supported_scales)
|
||||
{
|
||||
unsigned int i, j;
|
||||
int width, height;
|
||||
@@ -1727,11 +1725,11 @@ meta_monitor_mode_get_flags (MetaMonitorMode *monitor_mode)
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
|
||||
MetaMonitorMode *mode,
|
||||
MetaMonitorModeFunc func,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
|
||||
MetaMonitorMode *mode,
|
||||
MetaMonitorModeFunc func,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
MetaMonitorPrivate *monitor_priv =
|
||||
meta_monitor_get_instance_private (monitor);
|
||||
@@ -1753,11 +1751,11 @@ meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_monitor_mode_foreach_output (MetaMonitor *monitor,
|
||||
MetaMonitorMode *mode,
|
||||
MetaMonitorModeFunc func,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
meta_monitor_mode_foreach_output (MetaMonitor *monitor,
|
||||
MetaMonitorMode *mode,
|
||||
MetaMonitorModeFunc func,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
MetaMonitorPrivate *monitor_priv =
|
||||
meta_monitor_get_instance_private (monitor);
|
||||
|
@@ -74,12 +74,12 @@ struct _MetaMonitorClass
|
||||
MetaOutput * (* get_main_output) (MetaMonitor *monitor);
|
||||
void (* derive_layout) (MetaMonitor *monitor,
|
||||
MetaRectangle *layout);
|
||||
void (* calculate_crtc_pos) (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y);
|
||||
void (* calculate_crtc_pos) (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y);
|
||||
gboolean (* get_suggested_position) (MetaMonitor *monitor,
|
||||
int *width,
|
||||
int *height);
|
||||
@@ -214,22 +214,22 @@ META_EXPORT_TEST
|
||||
GList * meta_monitor_get_modes (MetaMonitor *monitor);
|
||||
|
||||
META_EXPORT_TEST
|
||||
void meta_monitor_calculate_crtc_pos (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y);
|
||||
void meta_monitor_calculate_crtc_pos (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaOutput *output,
|
||||
MetaMonitorTransform crtc_transform,
|
||||
int *out_x,
|
||||
int *out_y);
|
||||
|
||||
META_EXPORT_TEST
|
||||
float meta_monitor_calculate_mode_scale (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode);
|
||||
|
||||
META_EXPORT_TEST
|
||||
float * meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaMonitorScalesConstraint constraints,
|
||||
int *n_supported_scales);
|
||||
float * meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
MetaMonitorScalesConstraint constraints,
|
||||
int *n_supported_scales);
|
||||
|
||||
META_EXPORT_TEST
|
||||
const char * meta_monitor_mode_get_id (MetaMonitorMode *monitor_mode);
|
||||
@@ -249,18 +249,18 @@ META_EXPORT_TEST
|
||||
MetaCrtcModeFlag meta_monitor_mode_get_flags (MetaMonitorMode *monitor_mode);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
|
||||
MetaMonitorMode *mode,
|
||||
MetaMonitorModeFunc func,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
gboolean meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
|
||||
MetaMonitorMode *mode,
|
||||
MetaMonitorModeFunc func,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_monitor_mode_foreach_output (MetaMonitor *monitor,
|
||||
MetaMonitorMode *mode,
|
||||
MetaMonitorModeFunc func,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
gboolean meta_monitor_mode_foreach_output (MetaMonitor *monitor,
|
||||
MetaMonitorMode *mode,
|
||||
MetaMonitorModeFunc func,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_monitor_mode_should_be_advertised (MetaMonitorMode *monitor_mode);
|
||||
|
@@ -512,11 +512,11 @@ meta_monitor_manager_kms_calculate_monitor_mode_scale (MetaMonitorManager *manag
|
||||
}
|
||||
|
||||
static float *
|
||||
meta_monitor_manager_kms_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
meta_monitor_manager_kms_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
{
|
||||
MetaMonitorScalesConstraint constraints =
|
||||
META_MONITOR_SCALES_CONSTRAINT_NONE;
|
||||
|
@@ -929,11 +929,11 @@ ensure_supported_monitor_scales (MetaMonitorManager *manager)
|
||||
}
|
||||
|
||||
static float *
|
||||
meta_monitor_manager_xrandr_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
meta_monitor_manager_xrandr_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
{
|
||||
MetaMonitorManagerXrandr *manager_xrandr =
|
||||
META_MONITOR_MANAGER_XRANDR (manager);
|
||||
|
@@ -128,7 +128,7 @@ MetaShadowClassInfo default_shadow_classes[] = {
|
||||
{ "popup-menu", { 1, -1, 0, 0, 128 }, { 1, -1, 0, 0, 128 } },
|
||||
{ "dropdown-menu", { 1, -1, 0, 0, 128 }, { 1, -1, 0, 0, 128 } },
|
||||
|
||||
{ "attached", { 0, -1, 0, 0, 0 }, { 0, -1, 0, 0, 0 } }
|
||||
{ "attached", { 10, -1, 0, 3, 128 }, { 8, -1, 0, 2, 64 } }
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (MetaShadowFactory, meta_shadow_factory, G_TYPE_OBJECT);
|
||||
|
@@ -34,10 +34,8 @@
|
||||
* function then checks what kind of visual flash you like, and calls either
|
||||
* bell_flash_fullscreen()-- which calls bell_flash_screen() to do
|
||||
* its work-- or bell_flash_frame(), which flashes the focussed window
|
||||
* using bell_flash_window_frame(), unless there is no such window, in
|
||||
* which case it flashes the screen instead. bell_flash_window_frame()
|
||||
* flashes the frame and calls bell_unflash_frame() as a timeout to
|
||||
* remove the flash.
|
||||
* using bell_flash_window(), unless there is no such window, in
|
||||
* which case it flashes the screen instead.
|
||||
*
|
||||
* The visual bell was the result of a discussion in Bugzilla here:
|
||||
* <http://bugzilla.gnome.org/show_bug.cgi?id=99886>.
|
||||
@@ -135,62 +133,6 @@ bell_flash_fullscreen (MetaDisplay *display)
|
||||
meta_compositor_flash_display (display->compositor, display);
|
||||
}
|
||||
|
||||
/**
|
||||
* bell_unflash_frame:
|
||||
* @data: The frame to unflash, cast to a gpointer so it can go into
|
||||
* a callback function.
|
||||
*
|
||||
* Makes a frame be not flashed; this is the timeout half of
|
||||
* bell_flash_window_frame(). This is done simply by clearing the
|
||||
* flash flag and queuing a redraw of the frame.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* Returns: Always FALSE, so we don't get called again.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Bug: This is the parallel to bell_flash_window_frame(), so it should
|
||||
* really be called meta_bell_unflash_window_frame().
|
||||
*/
|
||||
static gboolean
|
||||
bell_unflash_frame (gpointer data)
|
||||
{
|
||||
MetaFrame *frame = (MetaFrame *) data;
|
||||
frame->is_flashing = 0;
|
||||
meta_frame_queue_draw (frame);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* bell_flash_window_frame:
|
||||
* @window: The window to flash
|
||||
*
|
||||
* Makes a frame flash and then return to normal shortly afterwards.
|
||||
* This is done by setting a flag so that the theme
|
||||
* code will temporarily draw the frame as focussed if it's unfocussed and
|
||||
* vice versa, and then queueing a redraw. Lastly, we create a timeout so
|
||||
* that the flag can be unset and the frame re-redrawn.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*/
|
||||
static void
|
||||
bell_flash_window_frame (MetaWindow *window)
|
||||
{
|
||||
guint id;
|
||||
g_assert (window->frame != NULL);
|
||||
window->frame->is_flashing = 1;
|
||||
meta_frame_queue_draw (window->frame);
|
||||
/* Since this idle is added after the Clutter clock source, with
|
||||
* the same priority, it will be executed after it as well, so
|
||||
* we are guaranteed to get at least one frame drawn in the
|
||||
* flashed state, no matter how loaded we are.
|
||||
*/
|
||||
id = g_timeout_add_full (META_PRIORITY_REDRAW, 100,
|
||||
bell_unflash_frame, window->frame, NULL);
|
||||
g_source_set_name_by_id (id, "[mutter] bell_unflash_frame");
|
||||
}
|
||||
|
||||
static void
|
||||
bell_flash_window (MetaWindow *window)
|
||||
{
|
||||
@@ -209,9 +151,7 @@ static void
|
||||
bell_flash_frame (MetaDisplay *display,
|
||||
MetaWindow *window)
|
||||
{
|
||||
if (window && window->frame)
|
||||
bell_flash_window_frame (window);
|
||||
else if (window)
|
||||
if (window)
|
||||
bell_flash_window (window);
|
||||
else
|
||||
bell_flash_fullscreen (display);
|
||||
@@ -267,19 +207,3 @@ meta_bell_notify (MetaDisplay *display,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_bell_notify_frame_destroy:
|
||||
* @frame: The frame which is being destroyed
|
||||
*
|
||||
* Deals with a frame being destroyed. This is important because if we're
|
||||
* using a visual bell, we might be flashing the edges of the frame, and
|
||||
* so we'd have a timeout function waiting ready to un-flash them. If the
|
||||
* frame's going away, we can tell the timeout not to bother.
|
||||
*/
|
||||
void
|
||||
meta_bell_notify_frame_destroy (MetaFrame *frame)
|
||||
{
|
||||
if (frame->is_flashing)
|
||||
g_source_remove_by_funcs_user_data (&g_timeout_funcs, frame);
|
||||
}
|
||||
|
@@ -41,14 +41,3 @@ MetaBell * meta_bell_new (MetaDisplay *display);
|
||||
*/
|
||||
gboolean meta_bell_notify (MetaDisplay *display,
|
||||
MetaWindow *window);
|
||||
|
||||
/**
|
||||
* meta_bell_notify_frame_destroy:
|
||||
* @frame: The frame which is being destroyed
|
||||
*
|
||||
* Deals with a frame being destroyed. This is important because if we're
|
||||
* using a visual bell, we might be flashing the edges of the frame, and
|
||||
* so we'd have a timeout function waiting ready to un-flash them. If the
|
||||
* frame's going away, we can tell the timeout not to bother.
|
||||
*/
|
||||
void meta_bell_notify_frame_destroy (MetaFrame *frame);
|
||||
|
@@ -60,7 +60,6 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
frame->right_width = 0;
|
||||
frame->current_cursor = 0;
|
||||
|
||||
frame->is_flashing = FALSE;
|
||||
frame->borders_cached = FALSE;
|
||||
|
||||
meta_verbose ("Frame geometry %d,%d %dx%d\n",
|
||||
@@ -177,8 +176,6 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
|
||||
meta_frame_calc_borders (frame, &borders);
|
||||
|
||||
meta_bell_notify_frame_destroy (frame);
|
||||
|
||||
/* Unparent the client window; it may be destroyed,
|
||||
* thus the error trap.
|
||||
*/
|
||||
@@ -298,9 +295,6 @@ meta_frame_get_flags (MetaFrame *frame)
|
||||
if (frame->window->fullscreen)
|
||||
flags |= META_FRAME_FULLSCREEN;
|
||||
|
||||
if (frame->is_flashing)
|
||||
flags |= META_FRAME_IS_FLASHING;
|
||||
|
||||
if (frame->window->wm_state_above)
|
||||
flags |= META_FRAME_ABOVE;
|
||||
|
||||
|
@@ -49,7 +49,6 @@ struct _MetaFrame
|
||||
int bottom_height;
|
||||
|
||||
guint need_reapply_frame_shape : 1;
|
||||
guint is_flashing : 1; /* used by the visual bell flash */
|
||||
guint borders_cached : 1;
|
||||
|
||||
MetaUIFrame *ui_frame;
|
||||
|
@@ -1654,7 +1654,7 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
|
||||
MetaKeyBindingManager *keys = &display->key_binding_manager;
|
||||
MetaKeyBinding *binding;
|
||||
MetaKeyGrab *grab;
|
||||
char *key;
|
||||
g_autofree char *key = NULL;
|
||||
MetaResolvedKeyCombo resolved_combo = { NULL, 0 };
|
||||
|
||||
g_return_val_if_fail (action != META_KEYBINDING_ACTION_NONE, FALSE);
|
||||
@@ -1683,7 +1683,6 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
|
||||
}
|
||||
|
||||
g_hash_table_remove (external_grabs, key);
|
||||
g_free (key);
|
||||
resolved_key_combo_reset (&resolved_combo);
|
||||
|
||||
return TRUE;
|
||||
|
@@ -111,7 +111,7 @@ static gboolean resize_with_right_button = FALSE;
|
||||
static gboolean edge_tiling = FALSE;
|
||||
static gboolean force_fullscreen = TRUE;
|
||||
static gboolean auto_maximize = TRUE;
|
||||
static gboolean show_fallback_app_menu = FALSE;
|
||||
static gboolean show_fallback_app_menu = TRUE;
|
||||
|
||||
static GDesktopVisualBellType visual_bell_type = G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH;
|
||||
static MetaButtonLayout button_layout;
|
||||
|
@@ -63,7 +63,6 @@
|
||||
* @META_FRAME_ALLOWS_SHADE: frame allows shade
|
||||
* @META_FRAME_ALLOWS_MOVE: frame allows move
|
||||
* @META_FRAME_FULLSCREEN: frame allows fullscreen
|
||||
* @META_FRAME_IS_FLASHING: frame is flashing
|
||||
* @META_FRAME_ABOVE: frame is above
|
||||
* @META_FRAME_TILED_LEFT: frame is tiled to the left
|
||||
* @META_FRAME_TILED_RIGHT: frame is tiled to the right
|
||||
@@ -83,10 +82,9 @@ typedef enum
|
||||
META_FRAME_ALLOWS_SHADE = 1 << 10,
|
||||
META_FRAME_ALLOWS_MOVE = 1 << 11,
|
||||
META_FRAME_FULLSCREEN = 1 << 12,
|
||||
META_FRAME_IS_FLASHING = 1 << 13,
|
||||
META_FRAME_ABOVE = 1 << 14,
|
||||
META_FRAME_TILED_LEFT = 1 << 15,
|
||||
META_FRAME_TILED_RIGHT = 1 << 16
|
||||
META_FRAME_ABOVE = 1 << 13,
|
||||
META_FRAME_TILED_LEFT = 1 << 14,
|
||||
META_FRAME_TILED_RIGHT = 1 << 15
|
||||
} MetaFrameFlags;
|
||||
|
||||
/**
|
||||
|
@@ -373,11 +373,11 @@ meta_monitor_manager_test_calculate_monitor_mode_scale (MetaMonitorManager *mana
|
||||
}
|
||||
|
||||
static float *
|
||||
meta_monitor_manager_test_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
meta_monitor_manager_test_calculate_supported_scales (MetaMonitorManager *manager,
|
||||
MetaLogicalMonitorLayoutMode layout_mode,
|
||||
MetaMonitor *monitor,
|
||||
MetaMonitorMode *monitor_mode,
|
||||
int *n_supported_scales)
|
||||
{
|
||||
MetaMonitorScalesConstraint constraints =
|
||||
META_MONITOR_SCALES_CONSTRAINT_NONE;
|
||||
|
@@ -1186,8 +1186,6 @@ meta_style_info_set_flags (MetaStyleInfo *style_info,
|
||||
int i;
|
||||
|
||||
backdrop = !(flags & META_FRAME_HAS_FOCUS);
|
||||
if (flags & META_FRAME_IS_FLASHING)
|
||||
backdrop = !backdrop;
|
||||
|
||||
if (flags & META_FRAME_MAXIMIZED)
|
||||
class_name = "maximized";
|
||||
|
Reference in New Issue
Block a user