aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/present
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/present')
-rw-r--r--xorg-server/present/makefile10
-rw-r--r--xorg-server/present/present.c4
-rw-r--r--xorg-server/present/present_event.c83
-rw-r--r--xorg-server/present/present_fake.c4
-rw-r--r--xorg-server/present/present_fence.c4
-rw-r--r--xorg-server/present/present_notify.c4
-rw-r--r--xorg-server/present/present_request.c30
-rw-r--r--xorg-server/present/present_screen.c4
8 files changed, 75 insertions, 68 deletions
diff --git a/xorg-server/present/makefile b/xorg-server/present/makefile
new file mode 100644
index 000000000..b56430a65
--- /dev/null
+++ b/xorg-server/present/makefile
@@ -0,0 +1,10 @@
+CSRCS = \
+ present.c \
+ present_event.c \
+ present_fake.c \
+ present_fence.c \
+ present_notify.c \
+ present_request.c \
+ present_screen.c
+
+LIBRARY=libpresent
diff --git a/xorg-server/present/present.c b/xorg-server/present/present.c
index 3aea0d7c6..6528bd231 100644
--- a/xorg-server/present/present.c
+++ b/xorg-server/present/present.c
@@ -20,8 +20,8 @@
* OF THIS SOFTWARE.
*/
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
#endif
#include "present_priv.h"
diff --git a/xorg-server/present/present_event.c b/xorg-server/present/present_event.c
index ff57eba41..5582e51a6 100644
--- a/xorg-server/present/present_event.c
+++ b/xorg-server/present/present_event.c
@@ -20,8 +20,8 @@
* OF THIS SOFTWARE.
*/
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
#endif
#include "present_priv.h"
@@ -109,24 +109,23 @@ present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw,
present_window_priv_ptr window_priv = present_window_priv(window);
if (window_priv) {
- xPresentConfigureNotify cn = {
- .type = GenericEvent,
- .extension = present_request,
- .length = (sizeof(xPresentConfigureNotify) - 32) >> 2,
- .evtype = PresentConfigureNotify,
- .eid = 0,
- .window = window->drawable.id,
- .x = x,
- .y = y,
- .width = w,
- .height = h,
- .off_x = 0,
- .off_y = 0,
- .pixmap_width = w,
- .pixmap_height = h,
- .pixmap_flags = 0
- };
present_event_ptr event;
+ xPresentConfigureNotify cn;
+ cn.type = GenericEvent;
+ cn.extension = present_request;
+ cn.length = (sizeof(xPresentConfigureNotify) - 32) >> 2;
+ cn.evtype = PresentConfigureNotify;
+ cn.eid = 0;
+ cn.window = window->drawable.id;
+ cn.x = x;
+ cn.y = y;
+ cn.width = w;
+ cn.height = h;
+ cn.off_x = 0;
+ cn.off_y = 0;
+ cn.pixmap_width = w;
+ cn.pixmap_height = h;
+ cn.pixmap_flags = 0;
for (event = window_priv->events; event; event = event->next) {
if (event->mask & (1 << PresentConfigureNotify)) {
@@ -151,20 +150,19 @@ present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 se
present_window_priv_ptr window_priv = present_window_priv(window);
if (window_priv) {
- xPresentCompleteNotify cn = {
- .type = GenericEvent,
- .extension = present_request,
- .length = (sizeof(xPresentCompleteNotify) - 32) >> 2,
- .evtype = PresentCompleteNotify,
- .kind = kind,
- .mode = mode,
- .eid = 0,
- .window = window->drawable.id,
- .serial = serial,
- .ust = ust,
- .msc = msc,
- };
present_event_ptr event;
+ xPresentCompleteNotify cn;
+ cn.type = GenericEvent;
+ cn.extension = present_request;
+ cn.length = (sizeof(xPresentCompleteNotify) - 32) >> 2;
+ cn.evtype = PresentCompleteNotify;
+ cn.kind = kind;
+ cn.mode = mode;
+ cn.eid = 0;
+ cn.window = window->drawable.id;
+ cn.serial = serial;
+ cn.ust = ust;
+ cn.msc = msc;
for (event = window_priv->events; event; event = event->next) {
if (event->mask & PresentCompleteNotifyMask) {
@@ -183,18 +181,17 @@ present_send_idle_notify(WindowPtr window, CARD32 serial, PixmapPtr pixmap, stru
present_window_priv_ptr window_priv = present_window_priv(window);
if (window_priv) {
- xPresentIdleNotify in = {
- .type = GenericEvent,
- .extension = present_request,
- .length = (sizeof(xPresentIdleNotify) - 32) >> 2,
- .evtype = PresentIdleNotify,
- .eid = 0,
- .window = window->drawable.id,
- .serial = serial,
- .pixmap = pixmap->drawable.id,
- .idle_fence = present_fence_id(idle_fence)
- };
present_event_ptr event;
+ xPresentIdleNotify in;
+ in.type = GenericEvent;
+ in.extension = present_request;
+ in.length = (sizeof(xPresentIdleNotify) - 32) >> 2;
+ in.evtype = PresentIdleNotify;
+ in.eid = 0;
+ in.window = window->drawable.id;
+ in.serial = serial;
+ in.pixmap = pixmap->drawable.id;
+ in.idle_fence = present_fence_id(idle_fence);
for (event = window_priv->events; event; event = event->next) {
if (event->mask & PresentIdleNotifyMask) {
diff --git a/xorg-server/present/present_fake.c b/xorg-server/present/present_fake.c
index 4985c81e3..1c80f5986 100644
--- a/xorg-server/present/present_fake.c
+++ b/xorg-server/present/present_fake.c
@@ -20,8 +20,8 @@
* OF THIS SOFTWARE.
*/
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
#endif
#include "present_priv.h"
diff --git a/xorg-server/present/present_fence.c b/xorg-server/present/present_fence.c
index e09657d31..8be32e1a7 100644
--- a/xorg-server/present/present_fence.c
+++ b/xorg-server/present/present_fence.c
@@ -20,8 +20,8 @@
* OF THIS SOFTWARE.
*/
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
#endif
#include "present_priv.h"
diff --git a/xorg-server/present/present_notify.c b/xorg-server/present/present_notify.c
index e272e08dc..fe8a57117 100644
--- a/xorg-server/present/present_notify.c
+++ b/xorg-server/present/present_notify.c
@@ -20,8 +20,8 @@
* OF THIS SOFTWARE.
*/
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
#endif
#include "present_priv.h"
diff --git a/xorg-server/present/present_request.c b/xorg-server/present/present_request.c
index 835890d28..c69e68309 100644
--- a/xorg-server/present/present_request.c
+++ b/xorg-server/present/present_request.c
@@ -20,8 +20,8 @@
* OF THIS SOFTWARE.
*/
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
#endif
#include "present_priv.h"
@@ -31,14 +31,15 @@
static int
proc_present_query_version(ClientPtr client)
{
+ xPresentQueryVersionReply rep;
REQUEST(xPresentQueryVersionReq);
- xPresentQueryVersionReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .majorVersion = SERVER_PRESENT_MAJOR_VERSION,
- .minorVersion = SERVER_PRESENT_MINOR_VERSION
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.majorVersion = SERVER_PRESENT_MAJOR_VERSION;
+ rep.minorVersion = SERVER_PRESENT_MINOR_VERSION;
+
REQUEST_SIZE_MATCH(xPresentQueryVersionReq);
(void) stuff;
@@ -200,15 +201,14 @@ proc_present_select_input (ClientPtr client)
static int
proc_present_query_capabilities (ClientPtr client)
{
- REQUEST(xPresentQueryCapabilitiesReq);
- xPresentQueryCapabilitiesReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- };
WindowPtr window;
RRCrtcPtr crtc = NULL;
int r;
+ xPresentQueryCapabilitiesReply rep;
+ REQUEST(xPresentQueryCapabilitiesReq);
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
r = dixLookupWindow(&window, stuff->target, client, DixGetAttrAccess);
switch (r) {
diff --git a/xorg-server/present/present_screen.c b/xorg-server/present/present_screen.c
index 25ef6818d..1e4f55d37 100644
--- a/xorg-server/present/present_screen.c
+++ b/xorg-server/present/present_screen.c
@@ -20,8 +20,8 @@
* OF THIS SOFTWARE.
*/
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
#endif
#include "present_priv.h"