Use any_output_pending() instead.

Signed-off-by: Jeremy Huddleston Sequoia <jerem...@apple.com>
CC: Keith Packard <kei...@keithp.com>
---
 os/WaitFor.c    | 2 +-
 os/connection.c | 2 --
 os/io.c         | 5 +----
 os/osdep.h      | 2 --
 4 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/os/WaitFor.c b/os/WaitFor.c
index 024df35..cde2c8c 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -213,7 +213,7 @@ WaitForSomething(Bool are_ready)
             timeout = check_timers();
 
         BlockHandler(&timeout);
-        if (NewOutputPending)
+        if (any_output_pending())
             FlushAllOutput();
         /* keep this check close to select() call to minimize race */
         if (dispatchException)
diff --git a/os/connection.c b/os/connection.c
index 4630438..dd0a25a 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -123,7 +123,6 @@ SOFTWARE.
 struct ospoll   *server_poll;
 
 int MaxClients = 0;
-Bool NewOutputPending;          /* not yet attempted to write some new output 
*/
 Bool NoListenAll;               /* Don't establish any listening sockets */
 
 static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
@@ -714,7 +713,6 @@ ClientReady(int fd, int xevents, void *data)
         mark_client_ready(client);
     if (xevents & X_NOTIFY_WRITE) {
         ospoll_mute(server_poll, fd, X_NOTIFY_WRITE);
-        NewOutputPending = TRUE;
     }
 }
 
diff --git a/os/io.c b/os/io.c
index ff0ec3d..0ebff08 100644
--- a/os/io.c
+++ b/os/io.c
@@ -596,7 +596,7 @@ FlushAllOutput(void)
 {
     OsCommPtr oc;
     register ClientPtr client, tmp;
-    Bool newoutput = NewOutputPending;
+    Bool newoutput = any_output_pending();
 
     if (!newoutput)
         return;
@@ -607,7 +607,6 @@ FlushAllOutput(void)
      * simply wait for the select to tell us when he's ready to receive.
      */
     CriticalOutputPending = FALSE;
-    NewOutputPending = FALSE;
 
     xorg_list_for_each_entry_safe(client, tmp, &output_pending_clients, 
output_pending) {
         if (client->clientGone)
@@ -761,13 +760,11 @@ WriteToClient(ClientPtr who, int count, const void *__buf)
         output_pending_clear(who);
         if (!any_output_pending()) {
             CriticalOutputPending = FALSE;
-            NewOutputPending = FALSE;
         }
 
         return FlushClient(who, oc, buf, count);
     }
 
-    NewOutputPending = TRUE;
     output_pending_mark(who);
     memmove((char *) oco->buf + oco->count, buf, count);
     oco->count += count;
diff --git a/os/osdep.h b/os/osdep.h
index 90a247f..9c8bd48 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -165,8 +165,6 @@ extern void SetConnectionTranslation(int conn, int client);
 extern void ClearConnectionTranslation(void);
 #endif
 
-extern Bool NewOutputPending;
-
 extern WorkQueuePtr workQueue;
 
 /* in WaitFor.c */
-- 
2.10.0 (Apple Git-99)

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to