mirror of https://github.com/FreeRDP/FreeRDP
xfreerdp-server: add missing FindXfixes.cmake
This commit is contained in:
parent
3a8c439837
commit
9ef0995fda
|
@ -0,0 +1,49 @@
|
|||
# - Find XFIXES
|
||||
# Find the XFIXES libraries
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# XFIXES_FOUND - true if XFIXES_INCLUDE_DIR & XFIXES_LIBRARY are found
|
||||
# XFIXES_LIBRARIES - Set when XFIXES_LIBRARY is found
|
||||
# XFIXES_INCLUDE_DIRS - Set when XFIXES_INCLUDE_DIR is found
|
||||
#
|
||||
# XFIXES_INCLUDE_DIR - where to find Xfixes.h, etc.
|
||||
# XFIXES_LIBRARY - the XFIXES library
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 O.S. Systems Software Ltda.
|
||||
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
|
||||
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#=============================================================================
|
||||
|
||||
find_path(XFIXES_INCLUDE_DIR NAMES Xfixes.h
|
||||
PATH_SUFFIXES X11/extensions
|
||||
DOC "The Xfixes include directory"
|
||||
)
|
||||
|
||||
find_library(XFIXES_LIBRARY NAMES Xfixes
|
||||
DOC "The Xfixes library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XFIXES DEFAULT_MSG XFIXES_LIBRARY XFIXES_INCLUDE_DIR)
|
||||
|
||||
if(XFIXES_FOUND)
|
||||
set( XFIXES_LIBRARIES ${XFIXES_LIBRARY} )
|
||||
set( XFIXES_INCLUDE_DIRS ${XFIXES_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(XFIXES_INCLUDE_DIR XFIXES_LIBRARY)
|
||||
|
|
@ -214,6 +214,28 @@ STREAM* xf_peer_stream_init(xfPeerContext* context)
|
|||
return context->s;
|
||||
}
|
||||
|
||||
boolean xf_peer_event_process(xfPeerContext* xfp, XEvent* event)
|
||||
{
|
||||
xfInfo* xfi = xfp->info;
|
||||
|
||||
if (event->type == xfi->xdamage_notify_event)
|
||||
{
|
||||
int x, y, width, height;
|
||||
XDamageNotifyEvent* notify;
|
||||
|
||||
notify = (XDamageNotifyEvent*) event;
|
||||
|
||||
x = notify->area.x;
|
||||
y = notify->area.y;
|
||||
width = notify->area.width;
|
||||
height = notify->area.height;
|
||||
|
||||
printf("XDamageNotify: x:%d y:%d width:%d height:%d\n", x, y, width, height);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void xf_peer_live_rfx(freerdp_peer* client)
|
||||
{
|
||||
STREAM* s;
|
||||
|
@ -222,6 +244,7 @@ void xf_peer_live_rfx(freerdp_peer* client)
|
|||
uint8* data;
|
||||
xfInfo* xfi;
|
||||
XImage* image;
|
||||
XEvent xevent;
|
||||
RFX_RECT rect;
|
||||
uint32 seconds;
|
||||
uint32 useconds;
|
||||
|
@ -240,6 +263,18 @@ void xf_peer_live_rfx(freerdp_peer* client)
|
|||
height = xfi->height;
|
||||
data = (uint8*) xmalloc(width * height * 3);
|
||||
|
||||
memset(&xevent, 0, sizeof(xevent));
|
||||
|
||||
#if 0
|
||||
while (XPending(xfi->display))
|
||||
{
|
||||
memset(&xevent, 0, sizeof(xevent));
|
||||
XNextEvent(xfi->display, &xevent);
|
||||
|
||||
if (xf_peer_event_process(xfp, &xevent) != true)
|
||||
return;
|
||||
}
|
||||
#else
|
||||
while (1)
|
||||
{
|
||||
if (seconds > 0)
|
||||
|
@ -271,6 +306,7 @@ void xf_peer_live_rfx(freerdp_peer* client)
|
|||
cmd->bitmapData = stream_get_head(s);
|
||||
update->SurfaceBits(update->context, cmd);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static boolean xf_peer_sleep_tsdiff(uint32 *old_sec, uint32 *old_usec, uint32 new_sec, uint32 new_usec)
|
||||
|
@ -385,6 +421,7 @@ boolean xf_peer_post_connect(freerdp_peer* client)
|
|||
|
||||
client->settings->width = xfi->width;
|
||||
client->settings->height = xfi->height;
|
||||
|
||||
client->update->DesktopResize(client->update->context);
|
||||
xfp->activated = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue