[X2Go-Commits] [x2gokdrive] 08/12: x2gokdrive*.c: Comment out defined, but unused code. Fixes several compiler warnings.
git-admin at x2go.org
git-admin at x2go.org
Tue Jul 16 17:09:20 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gokdrive.
commit cc647f865e8d01ab99b753aad867d84ad1282143
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Tue Jul 16 16:39:59 2019 +0200
x2gokdrive*.c: Comment out defined, but unused code. Fixes several compiler warnings.
---
x2gokdrive.c | 388 ++++++++++++++++++++++++++---------------------------
x2gokdrivecursor.c | 38 +++---
2 files changed, 213 insertions(+), 213 deletions(-)
diff --git a/x2gokdrive.c b/x2gokdrive.c
index 02290be..4de4779 100644
--- a/x2gokdrive.c
+++ b/x2gokdrive.c
@@ -1095,60 +1095,60 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs = {
ephyrWarpCursor,
};
-static KdScreenInfo *
-screen_from_window(Window w)
-{
- int i = 0;
-
- for (i = 0; i < screenInfo.numScreens; i++) {
- ScreenPtr pScreen = screenInfo.screens[i];
- KdPrivScreenPtr kdscrpriv = KdGetScreenPriv(pScreen);
- KdScreenInfo *screen = kdscrpriv->screen;
- EphyrScrPriv *scrpriv = screen->driver;
-
- }
-
- return NULL;
-}
-
-static void
-ephyrProcessErrorEvent(xcb_generic_event_t *xev)
-{
- xcb_generic_error_t *e = (xcb_generic_error_t *)xev;
-
- FatalError("X11 error\n"
- "Error code: %hhu\n"
- "Sequence number: %hu\n"
- "Major code: %hhu\tMinor code: %hu\n"
- "Error value: %u\n",
- e->error_code,
- e->sequence,
- e->major_code, e->minor_code,
- e->resource_id);
-}
-
-static void
-ephyrProcessExpose(xcb_generic_event_t *xev)
-{
- xcb_expose_event_t *expose = (xcb_expose_event_t *)xev;
- KdScreenInfo *screen = screen_from_window(expose->window);
- EphyrScrPriv *scrpriv = screen->driver;
-
- /* Wait for the last expose event in a series of cliprects
- * to actually paint our screen.
- */
- if (expose->count != 0)
- return;
-
+//static KdScreenInfo *
+//screen_from_window(Window w)
+//{
+// int i = 0;
+//
+// for (i = 0; i < screenInfo.numScreens; i++) {
+// ScreenPtr pScreen = screenInfo.screens[i];
+// KdPrivScreenPtr kdscrpriv = KdGetScreenPriv(pScreen);
+// KdScreenInfo *screen = kdscrpriv->screen;
+// EphyrScrPriv *scrpriv = screen->driver;
+//
+// }
+//
+// return NULL;
+//}
- if (scrpriv) {
- remote_paint_rect(scrpriv->screen, 0, 0, 0, 0,
- scrpriv->win_width,
- scrpriv->win_height);
- } else {
- EPHYR_LOG_ERROR("failed to get host screen\n");
- }
-}
+//static void
+//ephyrProcessErrorEvent(xcb_generic_event_t *xev)
+//{
+// xcb_generic_error_t *e = (xcb_generic_error_t *)xev;
+//
+// FatalError("X11 error\n"
+// "Error code: %hhu\n"
+// "Sequence number: %hu\n"
+// "Major code: %hhu\tMinor code: %hu\n"
+// "Error value: %u\n",
+// e->error_code,
+// e->sequence,
+// e->major_code, e->minor_code,
+// e->resource_id);
+//}
+
+//static void
+//ephyrProcessExpose(xcb_generic_event_t *xev)
+//{
+// xcb_expose_event_t *expose = (xcb_expose_event_t *)xev;
+// KdScreenInfo *screen = screen_from_window(expose->window);
+// EphyrScrPriv *scrpriv = screen->driver;
+//
+// /* Wait for the last expose event in a series of cliprects
+// * to actually paint our screen.
+// */
+// if (expose->count != 0)
+// return;
+//
+//
+// if (scrpriv) {
+// remote_paint_rect(scrpriv->screen, 0, 0, 0, 0,
+// scrpriv->win_width,
+// scrpriv->win_height);
+// } else {
+// EPHYR_LOG_ERROR("failed to get host screen\n");
+// }
+//}
void
@@ -1179,149 +1179,149 @@ ephyrClientButton(int event_type, int state, int button)
KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
}
-static void
-ephyrProcessMouseMotion(xcb_generic_event_t *xev)
-{
- xcb_motion_notify_event_t *motion = (xcb_motion_notify_event_t *)xev;
- KdScreenInfo *screen = screen_from_window(motion->event);
-
- if (!ephyrMouse ||
- !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
- EPHYR_LOG("skipping mouse motion:%d\n", screen->pScreen->myNum);
- return;
- }
-
- if (ephyrCursorScreen != screen->pScreen) {
- EPHYR_LOG("warping mouse cursor. "
- "cur_screen:%d, motion_screen:%d\n",
- ephyrCursorScreen->myNum, screen->pScreen->myNum);
- ephyrWarpCursor(inputInfo.pointer, screen->pScreen,
- motion->event_x, motion->event_y);
- }
- else {
- int x = 0, y = 0;
-
- EPHYR_LOG("enqueuing mouse motion:%d\n", screen->pScreen->myNum);
- x = motion->event_x;
- y = motion->event_y;
- EPHYR_LOG("initial (x,y):(%d,%d)\n", x, y);
- EPHYR_DBG("initial (x,y):(%d,%d)\n", x, y);
-
- /* convert coords into desktop-wide coordinates.
- * fill_pointer_events will convert that back to
- * per-screen coordinates where needed */
- x += screen->pScreen->x;
- y += screen->pScreen->y;
-
- KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_POINTER_DESKTOP, x, y, 0);
- }
-}
-
-static void
-ephyrProcessButtonPress(xcb_generic_event_t *xev)
-{
- xcb_button_press_event_t *button = (xcb_button_press_event_t *)xev;
-
- if (!ephyrMouse ||
- !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
- EPHYR_LOG("skipping mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum);
- return;
- }
-
- ephyrUpdateModifierState(button->state);
- /* This is a bit hacky. will break for button 5 ( defined as 0x10 )
- * Check KD_BUTTON defines in kdrive.h
- */
- mouseState |= 1 << (button->detail - 1);
-
- EPHYR_LOG("enqueuing mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum);
- KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
-}
-
-static void
-ephyrProcessButtonRelease(xcb_generic_event_t *xev)
-{
- xcb_button_press_event_t *button = (xcb_button_press_event_t *)xev;
-
- if (!ephyrMouse ||
- !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
- return;
- }
-
- ephyrUpdateModifierState(button->state);
- mouseState &= ~(1 << (button->detail - 1));
-
- EPHYR_LOG("enqueuing mouse release:%d\n", screen_from_window(button->event)->pScreen->myNum);
- KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
-}
-
-/* Xephyr wants ctrl+shift to grab the window, but that conflicts with
- ctrl+alt+shift key combos. Remember the modifier state on key presses and
- releases, if mod1 is pressed, we need ctrl, shift and mod1 released
- before we allow a shift-ctrl grab activation.
-
- note: a key event contains the mask _before_ the current key takes
- effect, so mod1_was_down will be reset on the first key press after all
- three were released, not on the last release. That'd require some more
- effort.
- */
-static int
-ephyrUpdateGrabModifierState(int state)
-{
- static int mod1_was_down = 0;
-
- if ((state & (XCB_MOD_MASK_CONTROL|XCB_MOD_MASK_SHIFT|XCB_MOD_MASK_1)) == 0)
- mod1_was_down = 0;
- else if (state & XCB_MOD_MASK_1)
- mod1_was_down = 1;
-
- return mod1_was_down;
-}
-
-static void
-ephyrProcessKeyPress(xcb_generic_event_t *xev)
-{
- xcb_key_press_event_t *key = (xcb_key_press_event_t *)xev;
-
- if (!ephyrKbd ||
- !((EphyrKbdPrivate *) ephyrKbd->driverPrivate)->enabled) {
- return;
- }
-
- ephyrUpdateGrabModifierState(key->state);
- ephyrUpdateModifierState(key->state);
- KdEnqueueKeyboardEvent(ephyrKbd, key->detail, FALSE);
-}
-
-static void
-ephyrProcessKeyRelease(xcb_generic_event_t *xev)
-{
-}
-
-static void
-ephyrProcessConfigureNotify(xcb_generic_event_t *xev)
-{
- xcb_configure_notify_event_t *configure =
- (xcb_configure_notify_event_t *)xev;
- KdScreenInfo *screen = screen_from_window(configure->window);
- EphyrScrPriv *scrpriv = screen->driver;
-
-
-#ifdef RANDR
- ephyrResizeScreen(screen->pScreen, configure->width, configure->height, NULL);
-#endif /* RANDR */
-}
+//static void
+//ephyrProcessMouseMotion(xcb_generic_event_t *xev)
+//{
+// xcb_motion_notify_event_t *motion = (xcb_motion_notify_event_t *)xev;
+// KdScreenInfo *screen = screen_from_window(motion->event);
+//
+// if (!ephyrMouse ||
+// !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
+// EPHYR_LOG("skipping mouse motion:%d\n", screen->pScreen->myNum);
+// return;
+// }
+//
+// if (ephyrCursorScreen != screen->pScreen) {
+// EPHYR_LOG("warping mouse cursor. "
+// "cur_screen:%d, motion_screen:%d\n",
+// ephyrCursorScreen->myNum, screen->pScreen->myNum);
+// ephyrWarpCursor(inputInfo.pointer, screen->pScreen,
+// motion->event_x, motion->event_y);
+// }
+// else {
+// int x = 0, y = 0;
+//
+// EPHYR_LOG("enqueuing mouse motion:%d\n", screen->pScreen->myNum);
+// x = motion->event_x;
+// y = motion->event_y;
+// EPHYR_LOG("initial (x,y):(%d,%d)\n", x, y);
+// EPHYR_DBG("initial (x,y):(%d,%d)\n", x, y);
+//
+// /* convert coords into desktop-wide coordinates.
+// * fill_pointer_events will convert that back to
+// * per-screen coordinates where needed */
+// x += screen->pScreen->x;
+// y += screen->pScreen->y;
+//
+// KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_POINTER_DESKTOP, x, y, 0);
+// }
+//}
-static void
-ephyrXcbProcessEvents(Bool queued_only)
-{
-}
+//static void
+//ephyrProcessButtonPress(xcb_generic_event_t *xev)
+//{
+// xcb_button_press_event_t *button = (xcb_button_press_event_t *)xev;
+//
+// if (!ephyrMouse ||
+// !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
+// EPHYR_LOG("skipping mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum);
+// return;
+// }
+//
+// ephyrUpdateModifierState(button->state);
+// /* This is a bit hacky. will break for button 5 ( defined as 0x10 )
+// * Check KD_BUTTON defines in kdrive.h
+// */
+// mouseState |= 1 << (button->detail - 1);
+//
+// EPHYR_LOG("enqueuing mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum);
+// KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
+//}
+
+//static void
+//ephyrProcessButtonRelease(xcb_generic_event_t *xev)
+//{
+// xcb_button_press_event_t *button = (xcb_button_press_event_t *)xev;
+//
+// if (!ephyrMouse ||
+// !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
+// return;
+// }
+//
+// ephyrUpdateModifierState(button->state);
+// mouseState &= ~(1 << (button->detail - 1));
+//
+// EPHYR_LOG("enqueuing mouse release:%d\n", screen_from_window(button->event)->pScreen->myNum);
+// KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
+//}
+
+///* Xephyr wants ctrl+shift to grab the window, but that conflicts with
+// ctrl+alt+shift key combos. Remember the modifier state on key presses and
+// releases, if mod1 is pressed, we need ctrl, shift and mod1 released
+// before we allow a shift-ctrl grab activation.
+//
+// note: a key event contains the mask _before_ the current key takes
+// effect, so mod1_was_down will be reset on the first key press after all
+// three were released, not on the last release. That'd require some more
+// effort.
+// */
+//static int
+//ephyrUpdateGrabModifierState(int state)
+//{
+// static int mod1_was_down = 0;
+//
+// if ((state & (XCB_MOD_MASK_CONTROL|XCB_MOD_MASK_SHIFT|XCB_MOD_MASK_1)) == 0)
+// mod1_was_down = 0;
+// else if (state & XCB_MOD_MASK_1)
+// mod1_was_down = 1;
+//
+// return mod1_was_down;
+//}
-static void
-ephyrXcbNotify(int fd, int ready, void *data)
-{
- ephyrXcbProcessEvents(FALSE);
-}
+//static void
+//ephyrProcessKeyPress(xcb_generic_event_t *xev)
+//{
+// xcb_key_press_event_t *key = (xcb_key_press_event_t *)xev;
+//
+// if (!ephyrKbd ||
+// !((EphyrKbdPrivate *) ephyrKbd->driverPrivate)->enabled) {
+// return;
+// }
+//
+// ephyrUpdateGrabModifierState(key->state);
+// ephyrUpdateModifierState(key->state);
+// KdEnqueueKeyboardEvent(ephyrKbd, key->detail, FALSE);
+//}
+
+//static void
+//ephyrProcessKeyRelease(xcb_generic_event_t *xev)
+//{
+//}
+
+//static void
+//ephyrProcessConfigureNotify(xcb_generic_event_t *xev)
+//{
+// xcb_configure_notify_event_t *configure =
+// (xcb_configure_notify_event_t *)xev;
+// KdScreenInfo *screen = screen_from_window(configure->window);
+// EphyrScrPriv *scrpriv = screen->driver;
+//
+////
+//#ifdef RANDR
+// ephyrResizeScreen(screen->pScreen, configure->width, configure->height, NULL);
+//#endif /* RANDR */
+//}
+
+//static void
+//ephyrXcbProcessEvents(Bool queued_only)
+//{
+//}
+
+//static void
+//ephyrXcbNotify(int fd, int ready, void *data)
+//{
+// ephyrXcbProcessEvents(FALSE);
+//}
void
ephyrCardFini(KdCardInfo * card)
diff --git a/x2gokdrivecursor.c b/x2gokdrivecursor.c
index 37abc0a..b8c2d5b 100644
--- a/x2gokdrivecursor.c
+++ b/x2gokdrivecursor.c
@@ -53,21 +53,21 @@ ephyrGetCursor(CursorPtr cursor)
}
-static void
-ephyrRealizeCoreCursor(EphyrScrPriv *scr, CursorPtr cursor)
-{
-}
-
-static void
-ephyrRealizeARGBCursor(EphyrScrPriv *scr, CursorPtr cursor)
-{
-}
-
-static Bool
-can_argb_cursor(void)
-{
- return TRUE;
-}
+//static void
+//ephyrRealizeCoreCursor(EphyrScrPriv *scr, CursorPtr cursor)
+//{
+//}
+
+//static void
+//ephyrRealizeARGBCursor(EphyrScrPriv *scr, CursorPtr cursor)
+//{
+//}
+
+//static Bool
+//can_argb_cursor(void)
+//{
+// return TRUE;
+//}
static Bool
ephyrRealizeCursor(DeviceIntPtr dev, ScreenPtr screen, CursorPtr cursor)
@@ -95,10 +95,10 @@ static void
ephyrSetCursor(DeviceIntPtr dev, ScreenPtr screen, CursorPtr cursor, int x,
int y)
{
- KdScreenPriv(screen);
- KdScreenInfo *kscr = pScreenPriv->screen;
- EphyrScrPriv *scr = kscr->driver;
- uint32_t attr = None;
+// KdScreenPriv(screen);
+// KdScreenInfo *kscr = pScreenPriv->screen;
+// EphyrScrPriv *scr = kscr->driver;
+// uint32_t attr = None;
if(cursor)
remote_sendCursor(cursor);
}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git
More information about the x2go-commits
mailing list