Merge pull request #1187 from ammen99/master

move wlr_drm_connector_add_mode to wlr/backend/drm.h
This commit is contained in:
emersion 2018-08-13 14:43:57 +01:00 committed by GitHub
commit 1a73baac94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -143,9 +143,5 @@ void restore_drm_outputs(struct wlr_drm_backend *drm);
void scan_drm_connectors(struct wlr_drm_backend *state); void scan_drm_connectors(struct wlr_drm_backend *state);
int handle_drm_event(int fd, uint32_t mask, void *data); int handle_drm_event(int fd, uint32_t mask, void *data);
void enable_drm_connector(struct wlr_output *output, bool enable); void enable_drm_connector(struct wlr_output *output, bool enable);
/**
* Add mode to the list of available modes
*/
bool wlr_drm_connector_add_mode(struct wlr_output *output, const drmModeModeInfo *mode);
#endif #endif

View File

@ -28,6 +28,12 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
bool wlr_backend_is_drm(struct wlr_backend *backend); bool wlr_backend_is_drm(struct wlr_backend *backend);
bool wlr_output_is_drm(struct wlr_output *output); bool wlr_output_is_drm(struct wlr_output *output);
/**
* Add mode to the list of available modes
*/
typedef struct _drmModeModeInfo drmModeModeInfo;
bool wlr_drm_connector_add_mode(struct wlr_output *output, const drmModeModeInfo *mode);
struct wlr_session *wlr_drm_backend_get_session(struct wlr_backend *backend); struct wlr_session *wlr_drm_backend_get_session(struct wlr_backend *backend);
#endif #endif

View File

@ -3,6 +3,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#include <wlr/backend/drm.h>
#include <wlr/config.h> #include <wlr/config.h>
#include <wlr/types/wlr_matrix.h> #include <wlr/types/wlr_matrix.h>
#include <wlr/types/wlr_compositor.h> #include <wlr/types/wlr_compositor.h>
@ -16,7 +17,6 @@
#include "rootston/layers.h" #include "rootston/layers.h"
#include "rootston/output.h" #include "rootston/output.h"
#include "rootston/server.h" #include "rootston/server.h"
#include "backend/drm/drm.h"
/** /**
* Rotate a child's position relative to a parent. The parent size is (pw, ph), * Rotate a child's position relative to a parent. The parent size is (pw, ph),