* 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;
_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 *
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)
{