]> Pileus Git - ~andy/gtk/blobdiff - gdk/wayland/gdkeventsource.c
Change FSF Address
[~andy/gtk] / gdk / wayland / gdkeventsource.c
index 12c9118201de46027f7d6b6425f16eca2c233b8e..7a6c7048cdf7ea57452bd2c5975096f5072b3e9e 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
 
-#include "gdkeventsource.h"
 #include "gdkinternals.h"
+#include "gdkprivate-wayland.h"
 
 typedef struct _GdkWaylandEventSource {
   GSource source;
@@ -113,10 +111,10 @@ void
 _gdk_wayland_display_deliver_event (GdkDisplay *display, GdkEvent *event)
 {
   GList *node;
-  static int serial;
 
   node = _gdk_event_queue_append (display, event);
-  _gdk_windowing_got_event (display, node, event, serial++);
+  _gdk_windowing_got_event (display, node, event,
+                            _gdk_display_get_next_serial (display));
 }
 
 GSource *
@@ -150,6 +148,16 @@ _gdk_wayland_display_event_source_new (GdkDisplay *display)
   return source;
 }
 
+void
+_gdk_wayland_display_flush (GdkDisplay *display, GSource *source)
+{
+  GdkWaylandEventSource *wayland_source = (GdkWaylandEventSource *) source;
+
+  while (wayland_source->mask & WL_DISPLAY_WRITABLE)
+    wl_display_iterate(GDK_DISPLAY_WAYLAND (display)->wl_display,
+                      WL_DISPLAY_WRITABLE);
+}
+
 void
 _gdk_wayland_display_queue_events (GdkDisplay *display)
 {