Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
3f7bb584
You need to sign in or sign up before continuing.
Unverified
Commit
3f7bb584
authored
May 31, 2020
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/clipboard_dump' into 3.6.x
Attributes GH PR #918:
https://github.com/ArcticaProject/nx-libs/pull/918
parents
4904bfe1
49d63d92
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
41 additions
and
5 deletions
+41
-5
README.keystrokes
doc/nxagent/README.keystrokes
+4
-0
keystrokes.cfg
etc/keystrokes.cfg
+1
-0
Client.h
nx-X11/programs/Xserver/hw/nxagent/Client.h
+2
-2
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+0
-0
Clipboard.h
nx-X11/programs/Xserver/hw/nxagent/Clipboard.h
+2
-0
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+5
-0
Events.h
nx-X11/programs/Xserver/hw/nxagent/Events.h
+1
-0
Keystroke.c
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+6
-0
Keystroke.h
nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
+3
-1
NXdispatch.c
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+7
-0
NXevents.c
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+10
-2
No files found.
doc/nxagent/README.keystrokes
View file @
3f7bb584
...
...
@@ -129,6 +129,10 @@ reread_keystrokes
autograb
Toggles autograb mode
dump_clipboard
print the current internal clipboard state (for debugging) to the
log.
force_synchronization
Forces immediate drawing of elements to be synchronized which can
fix some visual bugs.
etc/keystrokes.cfg
View file @
3f7bb584
...
...
@@ -25,4 +25,5 @@
<keystroke
action=
"viewport_scroll_down"
Control=
"1"
AltMeta=
"1"
key=
"KP_Down"
/>
<keystroke
action=
"reread_keystrokes"
Control=
"1"
AltMeta=
"1"
key=
"k"
/>
<keystroke
action=
"autograb"
Control=
"1"
AltMeta=
"1"
key=
"g"
/>
<keystroke
action=
"dump_clipboard"
Control=
"1"
Shift=
"1"
AltMeta=
"1"
key=
"c"
/>
</keystrokes>
nx-X11/programs/Xserver/hw/nxagent/Client.h
View file @
3f7bb584
...
...
@@ -75,8 +75,8 @@ extern void nxagentClientStateCallback(CallbackListPtr *callbacks, void *data, v
#define nxagentClientIsDialog(pClient) \
(nxagentClientHint(pClient) == NXCLIENT_DIALOG)
#define nxagentClientInfoString(pClient)
\
(
nxagentClientPriv(pClient) -> clientInfoString
)
#define nxagentClientInfoString(pClient)
\
(
(pClient) ? nxagentClientPriv(pClient) -> clientInfoString : NULL
)
/*
* The actual reason why the client is sleeping.
...
...
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
3f7bb584
This diff is collapsed.
Click to expand it.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.h
View file @
3f7bb584
...
...
@@ -78,4 +78,6 @@ extern WindowPtr nxagentGetClipboardWindow(Atom property);
extern
int
nxagentSendNotify
(
xEvent
*
event
);
extern
void
nxagentDumpClipboardStat
(
void
);
#endif
/* __Clipboard_H__ */
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
3f7bb584
...
...
@@ -1070,6 +1070,11 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
nxagentToggleAutoGrab
();
break
;
}
case
doDumpClipboard
:
{
nxagentDumpClipboardStat
();
break
;
}
default:
{
FatalError
(
"nxagentDispatchEvent: handleKeyPress returned unknown value
\n
"
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.h
View file @
3f7bb584
...
...
@@ -52,6 +52,7 @@ enum HandleEventResult
doSwitchResizeMode
,
doSwitchDeferMode
,
doAutoGrab
,
doDumpClipboard
};
extern
CARD32
nxagentLastEventTime
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
View file @
3f7bb584
...
...
@@ -102,6 +102,8 @@ char * nxagentSpecialKeystrokeNames[] = {
"autograb"
,
"dump_clipboard"
,
NULL
,
};
...
...
@@ -142,6 +144,7 @@ struct nxagentSpecialKeystrokeMap default_map[] = {
{
KEYSTROKE_VIEWPORT_SCROLL_DOWN
,
ControlMask
,
True
,
XK_KP_Down
},
{
KEYSTROKE_REREAD_KEYSTROKES
,
ControlMask
,
True
,
XK_k
},
{
KEYSTROKE_AUTOGRAB
,
ControlMask
,
True
,
XK_g
},
{
KEYSTROKE_DUMP_CLIPBOARD
,
ControlMask
|
ShiftMask
,
True
,
XK_c
},
{
KEYSTROKE_END_MARKER
,
0
,
False
,
NoSymbol
},
};
struct
nxagentSpecialKeystrokeMap
*
map
=
default_map
;
...
...
@@ -715,6 +718,9 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
case
KEYSTROKE_AUTOGRAB
:
*
result
=
doAutoGrab
;
break
;
case
KEYSTROKE_DUMP_CLIPBOARD
:
*
result
=
doDumpClipboard
;
break
;
case
KEYSTROKE_NOTHING
:
/* do nothing. difference to KEYSTROKE_IGNORE is the return value */
case
KEYSTROKE_END_MARKER
:
/* just to make gcc STFU */
case
KEYSTROKE_MAX
:
...
...
nx-X11/programs/Xserver/hw/nxagent/Keystroke.h
View file @
3f7bb584
...
...
@@ -78,10 +78,12 @@ enum nxagentSpecialKeystroke {
KEYSTROKE_AUTOGRAB
,
KEYSTROKE_
NOTHING
,
KEYSTROKE_
DUMP_CLIPBOARD
,
/* insert more here and in the string translation */
KEYSTROKE_NOTHING
,
KEYSTROKE_MAX
,
};
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
View file @
3f7bb584
...
...
@@ -127,6 +127,7 @@ Equipment Corporation.
#include "Handlers.h"
#include "Keyboard.h"
#include "Init.h"
#include "Utils.h"
const
int
nxagentMaxFontNames
=
10000
;
...
...
@@ -584,6 +585,8 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
nxagentFreeFontData
();
#endif
/* NXAGENT_SERVER */
nxagentFreeAtomMap
();
KillAllClients
();
free
(
clientReady
);
dispatchException
&=
~
DE_RESET
;
...
...
@@ -988,6 +991,10 @@ ProcFreePixmap(register ClientPtr client)
void
CloseDownClient
(
register
ClientPtr
client
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: [%d]
\n
"
,
__func__
,
client
->
clientState
);
#endif
#ifdef NXAGENT_SERVER
/*
* Need to reset the karma counter and get rid of the pending sync
...
...
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
View file @
3f7bb584
...
...
@@ -155,9 +155,13 @@ extern void nxagentInitViewportFrame(ScreenPtr, WindowPtr);
extern
int
nxagentShadowInit
(
ScreenPtr
,
WindowPtr
);
void
ActivatePointerGrab
(
register
DeviceIntPtr
mouse
,
register
GrabPtr
grab
,
ActivatePointerGrab
(
register
DeviceIntPtr
mouse
,
register
GrabPtr
grab
,
TimeStamp
time
,
Bool
autoGrab
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: called
\n
"
,
__func__
);
#endif
xorg_ActivatePointerGrab
(
mouse
,
grab
,
time
,
autoGrab
);
#ifdef NXAGENT_SERVER
...
...
@@ -166,7 +170,7 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
* If grab is synchronous, events are delivered to clients only if they send
* an AllowEvent request. If mode field in AllowEvent request is SyncPointer, the
* delivered event is saved in a queue and replayed later, when grab is released.
* We should
export sync grab to X as async in order to avoid events to be
* We should
export sync grab to X as async in order to avoid events to be
* queued twice, in the agent and in the X server. This solution have a drawback:
* replayed events are not delivered to that application that are not clients of
* the agent.
...
...
@@ -217,6 +221,10 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
void
DeactivatePointerGrab
(
register
DeviceIntPtr
mouse
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: called
\n
"
,
__func__
);
#endif
xorg_DeactivatePointerGrab
(
mouse
);
#ifdef NXAGENT_SERVER
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment