forked from AuroraMiddleware/gtk
Trivial formatting fixes
This commit is contained in:
parent
54773ba45b
commit
67f05b995f
@ -158,7 +158,9 @@ struct _GdkWindowImplWaylandClass
|
||||
};
|
||||
|
||||
static void gdk_wayland_window_configure (GdkWindow *window,
|
||||
int width, int height, int edges);
|
||||
int width,
|
||||
int height,
|
||||
int edges);
|
||||
|
||||
G_DEFINE_TYPE (GdkWindowImplWayland, _gdk_window_impl_wayland, GDK_TYPE_WINDOW_IMPL)
|
||||
|
||||
@ -188,16 +190,18 @@ _gdk_wayland_window_remove_focus (GdkWindow *window)
|
||||
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* gdk_wayland_window_update_size:
|
||||
* @drawable: a #GdkDrawableImplWayland.
|
||||
*
|
||||
* Updates the state of the drawable (in particular the drawable's
|
||||
* cairo surface) when its size has changed.
|
||||
**/
|
||||
*/
|
||||
static void
|
||||
gdk_wayland_window_update_size (GdkWindow *window,
|
||||
int32_t width, int32_t height, uint32_t edges)
|
||||
int32_t width,
|
||||
int32_t height,
|
||||
uint32_t edges)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
GdkRectangle area;
|
||||
@ -225,7 +229,8 @@ gdk_wayland_window_update_size (GdkWindow *window,
|
||||
|
||||
GdkWindow *
|
||||
_gdk_wayland_screen_create_root_window (GdkScreen *screen,
|
||||
int width, int height)
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkWindowImplWayland *impl;
|
||||
@ -299,7 +304,7 @@ fill_presentation_time_from_frame_time (GdkFrameTimings *timings,
|
||||
* notification. If we detect this, and make the assumption that the
|
||||
* compositor will finish drawing before the next vblank, we can
|
||||
* then determine the presentation time as the frame time we
|
||||
* recieved plus one refresh interval.
|
||||
* received plus one refresh interval.
|
||||
*
|
||||
* If a backend is using clock_gettime(CLOCK_MONOTONIC), but not
|
||||
* picking values right at the vblank, then the presentation times
|
||||
@ -487,8 +492,7 @@ on_monitors_changed (GdkScreen *screen,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gdk_wayland_window_create_surface (GdkWindow *window);
|
||||
static void gdk_wayland_window_create_surface (GdkWindow *window);
|
||||
|
||||
void
|
||||
_gdk_wayland_display_create_window_impl (GdkDisplay *display,
|
||||
@ -646,14 +650,17 @@ _create_shm_pool (struct wl_shm *shm,
|
||||
void *data;
|
||||
|
||||
fd = mkstemp (filename);
|
||||
if (fd < 0) {
|
||||
if (fd < 0)
|
||||
{
|
||||
g_critical (G_STRLOC ": Unable to create temporary file (%s): %s",
|
||||
filename, g_strerror (errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
stride = width * 4;
|
||||
size = stride * height;
|
||||
if (ftruncate (fd, size) < 0) {
|
||||
if (ftruncate (fd, size) < 0)
|
||||
{
|
||||
g_critical (G_STRLOC ": Truncating temporary file failed: %s",
|
||||
g_strerror (errno));
|
||||
close (fd);
|
||||
@ -663,7 +670,8 @@ _create_shm_pool (struct wl_shm *shm,
|
||||
data = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
unlink (filename);
|
||||
|
||||
if (data == MAP_FAILED) {
|
||||
if (data == MAP_FAILED)
|
||||
{
|
||||
g_critical (G_STRLOC ": mmap'ping temporary file failed: %s",
|
||||
g_strerror (errno));
|
||||
close (fd);
|
||||
@ -682,7 +690,8 @@ _create_shm_pool (struct wl_shm *shm,
|
||||
|
||||
|
||||
static void
|
||||
buffer_release_callback (void *_data, struct wl_buffer *wl_buffer)
|
||||
buffer_release_callback (void *_data,
|
||||
struct wl_buffer *wl_buffer)
|
||||
{
|
||||
GdkWaylandCairoSurfaceData *data = _data;
|
||||
|
||||
@ -695,7 +704,9 @@ static const struct wl_buffer_listener buffer_listener = {
|
||||
|
||||
static cairo_surface_t *
|
||||
gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
|
||||
int width, int height, guint scale)
|
||||
int width,
|
||||
int height,
|
||||
guint scale)
|
||||
{
|
||||
GdkWaylandCairoSurfaceData *data;
|
||||
cairo_surface_t *surface = NULL;
|
||||
@ -822,7 +833,9 @@ gdk_window_impl_wayland_finalize (GObject *object)
|
||||
|
||||
static void
|
||||
gdk_wayland_window_configure (GdkWindow *window,
|
||||
int width, int height, int edges)
|
||||
int width,
|
||||
int height,
|
||||
int edges)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkEvent *event;
|
||||
@ -847,7 +860,8 @@ gdk_wayland_window_configure (GdkWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_window_set_user_time (GdkWindow *window, guint32 user_time)
|
||||
gdk_wayland_window_set_user_time (GdkWindow *window,
|
||||
guint32 user_time)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1038,7 +1052,8 @@ gdk_wayland_window_create_surface (GdkWindow *window)
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_window_show (GdkWindow *window, gboolean already_mapped)
|
||||
gdk_wayland_window_show (GdkWindow *window,
|
||||
gboolean already_mapped)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
@ -1363,7 +1378,8 @@ gdk_wayland_window_destroy (GdkWindow *window,
|
||||
/* We don't have nested windows */
|
||||
g_return_if_fail (!recursing);
|
||||
/* Wayland windows can't be externally destroyed; we may possibly
|
||||
* eventually want to use this path at display close-down */
|
||||
* eventually want to use this path at display close-down
|
||||
*/
|
||||
g_return_if_fail (!foreign_destroy);
|
||||
|
||||
gdk_wayland_window_hide_surface (window, TRUE);
|
||||
@ -1623,15 +1639,11 @@ gdk_wayland_window_deiconify (GdkWindow *window)
|
||||
return;
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (window))
|
||||
{
|
||||
gdk_window_show (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Flip our client side flag, the real work happens on map. */
|
||||
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_ICONIFIED, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_window_stick (GdkWindow *window)
|
||||
@ -1694,9 +1706,7 @@ gdk_wayland_window_unmaximize (GdkWindow *window)
|
||||
wl_shell_surface_set_toplevel (impl->shell_surface);
|
||||
}
|
||||
|
||||
gdk_synthesize_window_state (window,
|
||||
GDK_WINDOW_STATE_MAXIMIZED,
|
||||
0);
|
||||
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_MAXIMIZED, 0);
|
||||
|
||||
gdk_wayland_window_configure (window,
|
||||
impl->saved_maximized.width,
|
||||
@ -1867,8 +1877,7 @@ gdk_wayland_window_begin_resize_drag (GdkWindow *window,
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("gdk_window_begin_resize_drag: bad resize edge %d!",
|
||||
edge);
|
||||
g_warning ("gdk_window_begin_resize_drag: bad resize edge %d!", edge);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1990,7 +1999,7 @@ static gboolean
|
||||
gdk_wayland_window_simulate_button (GdkWindow *window,
|
||||
gint x,
|
||||
gint y,
|
||||
guint button, /*1..3*/
|
||||
guint button,
|
||||
GdkModifierType modifiers,
|
||||
GdkEventType button_pressrelease)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user