Move event handling to a new file

display.c is getting a bit crowded. Move most of the handling
out to another file, events.c.

The long-term goal is to have generic event handling here, with
backend-specific handling for the types of windows and such.
This commit is contained in:
Jasper St. Pierre 2014-03-20 15:29:30 -04:00
parent 0808adefaf
commit 24b08d1a36
5 changed files with 2331 additions and 2262 deletions

View File

@ -116,6 +116,8 @@ libmutter_wayland_la_SOURCES = \
core/edge-resistance.h \ core/edge-resistance.h \
core/edid-parse.c \ core/edid-parse.c \
core/edid.h \ core/edid.h \
core/events.c \
core/events.h \
core/errors.c \ core/errors.c \
meta/errors.h \ meta/errors.h \
core/frame.c \ core/frame.c \

View File

@ -456,6 +456,7 @@ gboolean meta_grab_op_is_resizing (MetaGrabOp op);
gboolean meta_grab_op_is_mouse (MetaGrabOp op); gboolean meta_grab_op_is_mouse (MetaGrabOp op);
gboolean meta_grab_op_is_clicking (MetaGrabOp op); gboolean meta_grab_op_is_clicking (MetaGrabOp op);
gboolean meta_grab_op_is_wayland (MetaGrabOp op); gboolean meta_grab_op_is_wayland (MetaGrabOp op);
gboolean meta_grab_op_is_keyboard (MetaGrabOp op);
void meta_display_devirtualize_modifiers (MetaDisplay *display, void meta_display_devirtualize_modifiers (MetaDisplay *display,
MetaVirtualModifier modifiers, MetaVirtualModifier modifiers,
@ -489,5 +490,13 @@ void meta_display_set_input_focus_xwindow (MetaDisplay *display,
guint32 timestamp); guint32 timestamp);
void meta_display_sync_wayland_input_focus (MetaDisplay *display); void meta_display_sync_wayland_input_focus (MetaDisplay *display);
void meta_display_update_focus_window (MetaDisplay *display,
MetaWindow *window,
Window xwindow,
gulong serial,
gboolean focused_by_us);
void meta_display_sanity_check_timestamps (MetaDisplay *display,
guint32 timestamp);
#endif #endif

File diff suppressed because it is too large Load Diff

2265
src/core/events.c Normal file

File diff suppressed because it is too large Load Diff

32
src/core/events.h Normal file
View File

@ -0,0 +1,32 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2002, 2003, 2004 Red Hat, Inc.
* Copyright (C) 2003, 2004 Rob Adams
* Copyright (C) 2004-2006 Elijah Newren
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <meta/display.h>
#ifndef META_EVENTS_H
#define META_EVENTS_H
void meta_display_init_events (MetaDisplay *display);
void meta_display_free_events (MetaDisplay *display);
#endif