-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pr/simplify derivations #805
base: 3.6.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uli42: Thanks for working on this massive clean-up branch. You mainly have two strategies:
-
renaming the Xserver's original function to xorg_<bla> and calling the original code from within the DDX's code (plus run some extra code before or after calling the Xserver original code): This is ok license wise.
-
Secondly, you move snippets from hw/nxagent/NX*.c to dix/*.c: This is not ok, as you mix GPL-2 code and Xserver code (licensed under MIT/X11 or some such). What is possible: put the code fragment from hw/nxagent/NX*.c into some helper function and call that helper function from within the DIX code base. This is a formalistic trick for calling nxagent code paths from within the DIX code base. (The function call comes from you, so you can license it under the Xserver's license).
free(CurrentSelections); | ||
CurrentSelections = (Selection *)NULL; | ||
NumCurrentSelections = 0; | ||
xorg_InitSelections(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhh... now I get what you are doing.
Ok. These xorg_* namespacing commits, they will work copyright wise...
*/ | ||
|
||
|| (nxagentRenderTrap && strcmp(extensions[i]->name, "RENDER") == 0) | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this bit into nxagent DDX code, then it is ok.
*/ | ||
|
||
if (nxagentRenderTrap && strcmp(extensions[i]->name, "RENDER") == 0) | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to DDX code base.
@@ -248,7 +248,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ | |||
hw/nxagent/NXglxext.o \ | |||
hw/nxagent/NXmiexpose.o \ | |||
hw/nxagent/NXresource.o \ | |||
hw/nxagent/NXdamage.o \ | |||
hw/nxagent/damage.o \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels wrong (symlinks damage.[c|o] from DIX to DDX). Why not build damage.c at its original location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the same as with some other linked files: NXdamage.c did not have any code left after cleanup, but in dix/damage.c there are NXAGENT_SERVER ifdefs. That define is only set during nxagent compilation, but not during dix compilation.
if (imageblt) | ||
(*pGC->ops->ImageGlyphBlt)(pDrawable, pGC, x, y, n, charinfo, | ||
FONTGLYPHS(pGC->font)); | ||
else | ||
(*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, n, charinfo, | ||
FONTGLYPHS(pGC->font)); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strictly thinking, this is also GPL-2 license stuff. Even if it is just an ifdef block that gets added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have taken another look into this and found I have made a mistake. This must be an #ifndef instead of #ifdef. I guess disabling code is ok, license wise. Right?
On Di 21 Mai 2019 11:53:10 CEST, Ulrich Sibiller wrote:
uli42 commented on this pull request.
> @@ -248,7 +248,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXglxext.o \
hw/nxagent/NXmiexpose.o \
hw/nxagent/NXresource.o \
- hw/nxagent/NXdamage.o \
+ hw/nxagent/damage.o \
It is the same as with some other linked files: NXdamage.c did not
have any code left after cleanup, but in dix/damage.c there are
NXAGENT_SERVER ifdefs. That define is only set during nxagent
compilation, but not during dix compilation.
Ok.
--
DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139
GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31
mail: [email protected], http://das-netzwerkteam.de
|
Hi,
On Di 21 Mai 2019 20:21:29 CEST, Ulrich Sibiller wrote:
uli42 commented on this pull request.
> if (imageblt)
(*pGC->ops->ImageGlyphBlt)(pDrawable, pGC, x, y, n, charinfo,
FONTGLYPHS(pGC->font));
else
(*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, n, charinfo,
FONTGLYPHS(pGC->font));
+#endif
I have taken another look into this and found I have made a mistake.
This must be an #ifndef instead of #ifdef. I guess disabling code is
ok, license wise. Right?
Yes, disabling original Xserver code should be ok license wise. At
least, let's assume that.
Mike
--
DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139
GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31
mail: [email protected], http://das-netzwerkteam.de
|
Ok, and what about simply calling an existing function? Is that ok or do we need a wrapper, too? I am thinking about this:
|
Hi,
Am Mittwoch, 22. Mai 2019 schrieb Ulrich Sibiller:
Ok, and what about simply calling an _existing_ function? Is that ok or do we need a wrapper, too? I am thinking about this:
```
#ifdef NXAGENT_SERVER
nxagentFlushConfigureWindow();
#endif
```
/me sighs. Dogdy case. Esp. the nxagent* is not ideal. I am thinking about patch acceptance (finally) on the Xorg upstream side. So, consider... Is that call really needed? How do other hardware DDXs handle such hook calls?
Mike
…--
Gesendet von meinem Fairphone2 (powered by Sailfish OS).
|
That's the problem with most of NX's changes: It's no easy to judge... Generally one could add hooks here and there. But you cannot have them everywhere without cluttering the whole upstream code. I am tempted to drop changes that are enclosed in ifdef TEST or DEBUG. And changes that simply print something. But there are also changes the really look important... |
Hi,
On Mi 22 Mai 2019 17:20:51 CEST, Ulrich Sibiller wrote:
That's the problem with most of NX's changes: It's no easy to
judge... Generally one could add hooks here and there. But you
cannot have them everywhere without cluttering the whole upstream
code.
Yes, I get that.
I am tempted to drop changes that are enclosed in ifdef TEST or
DEBUG. And changes that simply print something.
Please do. Feel tempted.
But there are also changes the really look important...
Truely spoken. And yet, we don't know... (urgh).
Mike
--
DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139
GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31
mail: [email protected], http://das-netzwerkteam.de
|
dbbe658
to
92eb55c
Compare
no, currently this is not uptodate. I will alert when it's time for another review. Currently I try to pull out commits from here into separate branches to get stuff included that can clearly be merged. |
ACK.
Mike
Am Dienstag, 11. Juni 2019 schrieb Ulrich Sibiller:
… no, currently this is not uptodate. I will alert when it's time for another review. Currently I try to pull out commits from here into separate branches to get stuff included that can clearly be merged.
--
You are receiving this because your review was requested.
Reply to this email directly or view it on GitHub:
#805 (comment)
--
Gesendet von meinem Fairphone2 (powered by Sailfish OS).
|
92eb55c
to
627641e
Compare
627641e
to
58cb1cc
Compare
All the current PRs are preconditions to this. Once they are merged I will
go in with this one. And Once it is merged I finally can complete my 1.4.2
patch. At least that's the plan...
Uli
Mike Gabriel <[email protected]> schrieb am Sa., 10. Aug. 2019,
14:03:
… @uli42 <https://github.com/uli42>: What's the status of the PR (#805
<#805>)? Is it ready for
review again? I left some requests / comments. Please get in touch.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#805?email_source=notifications&email_token=ABQHBZF6WHVYE242VGMBHBLQD2VBXA5CNFSM4HMS72I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4AMGBQ#issuecomment-520143622>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHBZGPCOMNBG7FCOIMBH3QD2VBXANCNFSM4HMS72IQ>
.
|
"clipboard=something" does not need to be passed on, so return after setting nxagentOptions accordingly. This fixes [nx-X11/programs/Xserver/hw/nxagent/Args.c:1584]: (error) Uninitialized variable: argc
Right at the beginnigng of nxagentParseSingleOption we check for "clipboard" and prepare argv and argc accordingly for ddxProcessArgument. The removed code thus could never be reached.
This should disable clipboard but effictively did activate clipboard=both.
NXxvdisp.c only exists to set/unset nxagentXvTrap before/after dispatch. There's no need to duplicate the original code. We now rename the original dispatch functions and call them in our dispatch code. Also drop check for sun and cygwin, as they never appeared in xorg upstream code.
instead of having an own (identical) copy
The only difference was one short code block. There's no need to clone ~100 lines just for that...
Our version only adds some commented code, so it is not really necessary. But it is cleaner to handle it that way.
no function change
58cb1cc
to
047ab33
Compare
Change ShmExtensionInit to call the unaltered upstream version and trick it to do what we want.
instead of having an identical copy in nxagent_miShmPutImage
The only difference to the dix version was a fprintf if compiled with -D TEST.
is not dependent on any root window and need only be called once on startup.
9ee3a20
to
6e5100a
Compare
Ok, I guess it is time for this one, I guess? |
I want to know if this has chances to get merged, from a license point of view. It it okay to handle derived code like I do here?