mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 11:17:54 +00:00
[client] x11: pass large struct by reference
This commit is contained in:
parent
3c1405719c
commit
b70811dcb9
3 changed files with 11 additions and 11 deletions
|
@ -60,38 +60,38 @@ static void x11CBSelectionIncr(const XPropertyEvent e);
|
|||
static void x11CBSelectionNotify(const XSelectionEvent e);
|
||||
static void x11CBXFixesSelectionNotify(const XFixesSelectionNotifyEvent e);
|
||||
|
||||
bool x11CBEventThread(const XEvent xe)
|
||||
bool x11CBEventThread(const XEvent * xe)
|
||||
{
|
||||
switch(xe.type)
|
||||
switch(xe->type)
|
||||
{
|
||||
case SelectionRequest:
|
||||
x11CBSelectionRequest(xe.xselectionrequest);
|
||||
x11CBSelectionRequest(xe->xselectionrequest);
|
||||
return true;
|
||||
|
||||
case SelectionClear:
|
||||
x11CBSelectionClear(xe.xselectionclear);
|
||||
x11CBSelectionClear(xe->xselectionclear);
|
||||
return true;
|
||||
|
||||
case SelectionNotify:
|
||||
x11CBSelectionNotify(xe.xselection);
|
||||
x11CBSelectionNotify(xe->xselection);
|
||||
return true;
|
||||
|
||||
case PropertyNotify:
|
||||
if (xe.xproperty.state != PropertyNewValue)
|
||||
if (xe->xproperty.state != PropertyNewValue)
|
||||
break;
|
||||
|
||||
if (xe.xproperty.atom == x11atoms.SEL_DATA)
|
||||
if (xe->xproperty.atom == x11atoms.SEL_DATA)
|
||||
{
|
||||
if (x11cb.lowerBound == 0)
|
||||
return true;
|
||||
|
||||
x11CBSelectionIncr(xe.xproperty);
|
||||
x11CBSelectionIncr(xe->xproperty);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (xe.type == x11.eventBase + XFixesSelectionNotify)
|
||||
if (xe->type == x11.eventBase + XFixesSelectionNotify)
|
||||
{
|
||||
XFixesSelectionNotifyEvent * sne = (XFixesSelectionNotifyEvent *)&xe;
|
||||
x11CBXFixesSelectionNotify(*sne);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "interface/displayserver.h"
|
||||
|
||||
bool x11CBEventThread(const XEvent xe);
|
||||
bool x11CBEventThread(const XEvent * xe);
|
||||
|
||||
bool x11CBInit(void);
|
||||
void x11CBNotice(LG_ClipboardData type);
|
||||
|
|
|
@ -897,7 +897,7 @@ static int x11EventThread(void * unused)
|
|||
XNextEvent(x11.display, &xe);
|
||||
|
||||
// call the clipboard handling code
|
||||
if (x11CBEventThread(xe))
|
||||
if (x11CBEventThread(&xe))
|
||||
continue;
|
||||
|
||||
switch(xe.type)
|
||||
|
|
Loading…
Reference in a new issue