-
-
Notifications
You must be signed in to change notification settings - Fork 85
Make screen option of icon boxes work again #1230
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
base: main
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.
Thanks for this. A few comments in-line for your consideration.
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.
Hmm. I don't like this approach at all.
First of all, fvwm's codebase is really old, and has all manner of interesting edge-cases. You're seeing one of them here, with how we want to try and make IconBoxes work.
Over the years, there's been a few attempts at making multiple monitors (screens) work better than they did when Xinerama was in use.
I introduced that, but what I haven't done is necessarily update any of the existing APIs, which is the case here.
With your renewed proposal though, you're introducing yet another convoluted change which makes no practical sense for me.
I think the confusion you're alluding to with @p
, @g
, etc., comes from the fact that geometry strings in fvwm3, can have that suffix after them to indicate the string, such as: 80x100+0+0@p
-- which would explicitly apply that geometry to the primary monitor.
What it isn't though, is a specifier for the monitor name in general.
We already have a mechanism of looking up monitor names in libs/FScreen.c:monitor_resolve_name()
and I see no reason why we couldn't use this, such that with your changes, we do something like:
struct monitor *m = monitor_resolve_name(icon_boxes_ptr->IconScreen);
ref.x = m->si->x;
ref.y = m->si->y;
ref.width = m->si->w;
ref.height = m->si->h;
...
That way, we're not special casing anything, and this works the same for other places which are looking up monitors to use.
I hope that makes sense. Let me know if you've any other questions.
Still not sure why you're changing monitor_resolve_name(), it's not required. |
So it seems like a lot of this code you're adding is in support of appeasing If you look at where it's being used:
... in, In, What I think we should do here, is not add all of this stuff to |
What exactly do you mean here?
leads on DVI-0 with
that |
Also some lines after
|
Make IconBox screen option working again even with several monitors. Signed-off-by: Werner Fink <werner@suse.de>
Depends on what the behaviour should be. What do you think? I thought we defaulted to either the global screen or primary screen, so maybe it should be one of those? |
Could you be more specific? I've lost the context of your question. |
if (FScreenIsRectangleOnScreen(fscr, FSCREEN_XYPOS, &ref)) | ||
if (IsRectangleOnThisPage(m, &ref, t->Desk)) |
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.
Why have you changed from FScreenIsRectangleOnScreen()
to IsRectangleOnThisPage()
?
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.
As otherwise the defined IconBox of the user does not match but that of the global_icon_box_ptr
while(do_all_iconboxes(t, &icon_boxes_ptr))
{
struct monitor *m;
fprintf(stderr, "FFFF: %s %d\n", icon_boxes_ptr->IconScreen, loc_ok);
if (loc_ok == True)
leads to
loaded [0]: /suse/werner/.fvwm/config
FFFF: DVI-1 0
FFFF: (null) 0
on stderr output of fvwm3 (here with a not set global_icon_box_ptr->IconScreen
)
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.
So?
My point is that this is an entirely different function call you're changing. Why?
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.
What is your proposal to make the users IconBox win here. Using NULL
for fscreen_scr_arg *arg
in FScreenIsRectangleOnScreen()
does not help
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.
What is your proposal to make the users IconBox win here. Using
NULL
forfscreen_scr_arg *arg
inFScreenIsRectangleOnScreen()
does not help
What I'm asking, is why you changed from FScreenIsRectangleOnScreen()
to IsRectangleOnThisPage()
-- it's a completely different function.
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.
compare with my current test in #1230 (comment)
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.
We're going round in circles, @bitstreamout
What I'm saying about FScreenIsRectangleOnScreen()
is it's only used in two places.
Rather than write all this additional crap in icons.c
, we should change FScreenIsRectangleOnScreen()
's implementation. We already have both "rectangles" to compare, so we should stop it from looking up monitors, etc., and just pass the relevant information in.
As a consequence ef doing this, we will need to update conditionals.c
as well.
Would you prefer if I did this?
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.
Would you prefer if I did this?
Indeed before I do the next crap ;)
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.
Maybe it is enough to use FSCREEN_GLOBAL
with FScreenIsRectangleOnScreen()
as DVI-1
has an y
offset of 1920 and the global screen has twice the size aka 3840
global_icon_box_ptr->IconGrid[1] = 80; | ||
global_icon_box_ptr->IconFlags = ICONFILLHRZ; | ||
global_icon_box_ptr->IconScreen = "p"; | ||
global_icon_box_ptr->do_free_screen = 0; |
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.
Why add do_free_screen here?
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.
Simply to be sure that the static string is not freed ... even it free_icon_boxes()
will currently not reach this.
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.
Is an unnecessary addition.
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.
Is an unnecessary addition.
How to resolve the NULL
for the IconScreen
of the last IconBox
seen from do_all_iconboxes()
in the loop?
Make IconBox screen option working again even with several monitors.
Compare with issue #1229
It fixes issue #1229
Please read comment #1229 (comment)
It also allows the `@' symbol be the prefix character for screen names as the
manual page is not clear here.
In comparision to the attached patch in issue #1229
Ihere is also a change included which should set the
loc_ok
toTrue
for a specfic monitor likemy test with
@DVI-1
for my second monitor.