Skip to content

Commit

Permalink
Wayland: Split long lines for function declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
linkmauve committed Sep 29, 2018
1 parent 15cad02 commit 4d3f0fb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/wl_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ static inline int min(int n1, int n2)
return n1 < n2 ? n1 : n2;
}

static _GLFWwindow* findWindowFromDecorationSurface(struct wl_surface* surface, int* which)
static _GLFWwindow* findWindowFromDecorationSurface(struct wl_surface* surface,
int* which)
{
int focus;
_GLFWwindow* window = _glfw.windowListHead;
Expand Down
3 changes: 2 additions & 1 deletion src/wl_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
"Wayland: Gamma ramp getting not supported yet");
}

void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor,
const GLFWgammaramp* ramp)
{
// TODO
_glfwInputError(GLFW_PLATFORM_ERROR,
Expand Down
25 changes: 12 additions & 13 deletions src/wl_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ static const struct wl_shell_surface_listener shellSurfaceListener = {
handlePopupDone
};

static int
createTmpfileCloexec(char* tmpname)
static int createTmpfileCloexec(char* tmpname)
{
int fd;

Expand Down Expand Up @@ -137,8 +136,7 @@ createTmpfileCloexec(char* tmpname)
* is set to ENOSPC. If posix_fallocate() is not supported, program may
* receive SIGBUS on accessing mmap()'ed file contents instead.
*/
static int
createAnonymousFile(off_t size)
static int createAnonymousFile(off_t size)
{
static const char template[] = "/glfw-shared-XXXXXX";
const char* path;
Expand Down Expand Up @@ -485,7 +483,8 @@ static GLFWbool createSurface(_GLFWwindow* window,
return GLFW_TRUE;
}

static void setFullscreen(_GLFWwindow* window, _GLFWmonitor* monitor, int refreshRate)
static void setFullscreen(_GLFWwindow* window, _GLFWmonitor* monitor,
int refreshRate)
{
if (window->wl.xdg.toplevel)
{
Expand Down Expand Up @@ -690,8 +689,8 @@ static GLFWbool createXdgSurface(_GLFWwindow* window)
return GLFW_TRUE;
}

static void
setCursorImage(_GLFWwindow* window, _GLFWcursorWayland* cursorWayland)
static void setCursorImage(_GLFWwindow* window,
_GLFWcursorWayland* cursorWayland)
{
struct itimerspec timer = {};
struct wl_cursor* wlCursor = cursorWayland->cursor;
Expand Down Expand Up @@ -736,8 +735,7 @@ setCursorImage(_GLFWwindow* window, _GLFWcursorWayland* cursorWayland)
wl_surface_commit(surface);
}

static void
incrementCursorImage(_GLFWwindow* window)
static void incrementCursorImage(_GLFWwindow* window)
{
_GLFWcursor* cursor;

Expand All @@ -753,8 +751,7 @@ incrementCursorImage(_GLFWwindow* window)
}
}

static void
handleEvents(int timeout)
static void handleEvents(int timeout)
{
struct wl_display* display = _glfw.wl.display;
struct pollfd fds[] = {
Expand Down Expand Up @@ -1029,13 +1026,15 @@ void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
}
}

void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window,
int numer, int denom)
{
// TODO: find out how to trigger a resize.
// The actual limits are checked in the wl_shell_surface::configure handler.
}

void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
void _glfwPlatformGetFramebufferSize(_GLFWwindow* window,
int* width, int* height)
{
_glfwPlatformGetWindowSize(window, width, height);
*width *= window->wl.scale;
Expand Down

0 comments on commit 4d3f0fb

Please sign in to comment.