aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-05 17:52:34 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:44:08 +0200
commitb393bca69640e27671e44a6c283b1499da9cacf9 (patch)
tree803c9966e0ce05a4197569800c48d8ac4912d2e6 /nx-X11
parentcb3e44a17e288fc68ce55e22e8e56a6a8f97258e (diff)
downloadnx-libs-b393bca69640e27671e44a6c283b1499da9cacf9.tar.gz
nx-libs-b393bca69640e27671e44a6c283b1499da9cacf9.tar.bz2
nx-libs-b393bca69640e27671e44a6c283b1499da9cacf9.zip
Clipboard.c: scope improvements
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 319070d47..7d6b9ae2b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -805,8 +805,6 @@ static void endTransfer(Bool success)
void nxagentTransferSelection(int resource)
{
- int result;
-
if (lastClientClientPtr -> index != resource)
{
#ifdef DEBUG
@@ -823,6 +821,8 @@ void nxagentTransferSelection(int resource)
{
case SelectionStageQuerySize:
{
+ int result;
+
PrintClientSelectionStage();
/*
* Don't get data yet, just get size. We skip
@@ -870,6 +870,8 @@ void nxagentTransferSelection(int resource)
}
case SelectionStageQueryData:
{
+ int result;
+
PrintClientSelectionStage();
/*
@@ -1210,8 +1212,6 @@ void nxagentNotifySelection(XEvent *X)
void nxagentResetSelectionOwner(void)
{
- int i;
-
if (lastServerRequestor != None)
{
#ifdef TEST
@@ -1226,7 +1226,7 @@ void nxagentResetSelectionOwner(void)
* Only for PRIMARY and CLIPBOARD selections.
*/
- for (i = 0; i < nxagentMaxSelections; i++)
+ for (int i = 0; i < nxagentMaxSelections; i++)
{
XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[i].selection, serverWindow, CurrentTime);
@@ -1415,8 +1415,6 @@ FIXME: Why this pointer can be not a valid
int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
Window requestor, Atom property, Atom target, Time time)
{
- const char *strTarget;
-
if (agentClipboardStatus != 1 ||
nxagentOption(Clipboard) == ClipboardServer)
{
@@ -1479,7 +1477,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
validateString(NameForAtom(property)), validateString(NameForAtom(target)));
#endif
- strTarget = NameForAtom(target);
+ const char *strTarget = NameForAtom(target);
if (strTarget == NULL)
{
@@ -1682,7 +1680,6 @@ WindowPtr nxagentGetClipboardWindow(Atom property)
int nxagentInitClipboard(WindowPtr pWin)
{
- int i;
Window iWindow = nxagentWindow(pWin);
#ifdef DEBUG
@@ -1763,7 +1760,7 @@ int nxagentInitClipboard(WindowPtr pWin)
fprintf(stderr, "%s: Registering for XFixesSelectionNotify events.\n", __func__);
#endif
- for (i = 0; i < nxagentMaxSelections; i++)
+ for (int i = 0; i < nxagentMaxSelections; i++)
{
XFixesSelectSelectionInput(nxagentDisplay, iWindow,
lastSelectionOwner[i].selection,
@@ -1803,7 +1800,7 @@ int nxagentInitClipboard(WindowPtr pWin)
* Only for PRIMARY and CLIPBOARD selections.
*/
- for (i = 0; i < nxagentMaxSelections; i++)
+ for (int i = 0; i < nxagentMaxSelections; i++)
{
if (lastSelectionOwner[i].client && lastSelectionOwner[i].window)
{