Skip to content
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

Added Validation check for screen Issue in wayland #964

Closed
wants to merge 3 commits into from
Closed

Added Validation check for screen Issue in wayland #964

wants to merge 3 commits into from

Conversation

bhavyabansal9068
Copy link

@bhavyabansal9068 bhavyabansal9068 commented Mar 25, 2023

Fix for Issue #965

@chimosky
Copy link
Member

Thanks for guiding @quozl . I have attached the error logs that we are getting after running Sugar from the GNOME terminal.

(main.py:3327): Wnck-WARNING **: 08:54:39.331: libwnck is designed to work in X11 only, no valid display found

(metacity:3334): metacity-WARNING **: 08:54:39.359: Option “--no-composite” is deprecated, use the “--compositor” instead.
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/jarabe/main.py", line 380, in <module>
    main()
  File "/usr/lib/python3/dist-packages/jarabe/main.py", line 347, in main
    _start_window_manager()
  File "/usr/lib/python3/dist-packages/jarabe/main.py", line 208, in _start_window_manager
    screen.connect('window-manager-changed', __window_manager_changed_cb)
AttributeError: 'NoneType' object has no attribute 'connect'

(metacity:3334): metacity-WARNING **: 08:54:40.261: Screen 0 on display ":0" already has a window manager; try using the --replace option to replace the current window manager.

So, what I am thinking is, if we could add a validation check at the beginning of our main code to determine whether the screen is a window manager or not, it might help. Right? This way, before executing any process or job, our code will stop its execution."

The error you posted has a workaround which is to pass GDK_BACKEND=x11 when running sugar from the terminal as we don't have Wayland support yet which is why you're getting the NoneType error.

G'day, and thanks for your input. The problem described is that the process does not exit. The process does continue running. If you think that changing the cursor theme has anything to do with it, then please do test and let us know your result, either here or as a pull request. As for me, I don't see how the cursor theme can cause a process not to exit.

I also agree with Quozl.

Haven't tested your change yet but you should check your processes if Sugar still runs after your change as you didn't indicate that in your commit messages.

@quozl
Copy link
Contributor

quozl commented Mar 25, 2023

Perhaps it would be better to check if screen is None in _start_window_manager and return if so. Also, I don't understand why you moved the Gst.init, your commit message does not explain.

@quozl
Copy link
Contributor

quozl commented Mar 25, 2023

You said this is a fix for issue 952, but I don't think it is. Issue 952 is that Sugar does not exit. These commits are to do with handling when Wnck does not work under Wayland, which is because the library explicitly refuses to, in turn because Wayland does not have the same window manager concept as X11.

@quozl
Copy link
Contributor

quozl commented Mar 25, 2023

And this makes me suddenly think; why are you trying to test issue 952 under Wayland? 😁 I've edited the issue 952 opening comment to make it clear that I was reporting the problem happens under X11.

@bhavyabansal9068
Copy link
Author

Thank you very much, @quozl and @chimosky , for clarifying and guiding me well 😄..
I realize that I misunderstood some things. I will be creating a new issue for it and raising an updated PR under that.

@bhavyabansal9068 bhavyabansal9068 changed the title Added Validation check for screen Issue#952 Added Validation check for screen Issue Mar 25, 2023
@bhavyabansal9068 bhavyabansal9068 changed the title Added Validation check for screen Issue Added Validation check for screen Issue in wayland Mar 25, 2023
@quozl
Copy link
Contributor

quozl commented Mar 25, 2023

@bhavyabansal9068 please tell me if you have reviewed #951?

@bhavyabansal9068
Copy link
Author

bhavyabansal9068 commented Mar 25, 2023

@quozl I hadn't reviewed before PR but those tasks seems quite interesting would definitely explore them..

@quozl
Copy link
Contributor

quozl commented Mar 25, 2023

Oh, good. I wondered why all this seemed familiar; I had started on it last year. ;-)

@bhavyabansal9068
Copy link
Author

Yeah @quozl i will continue on it and will raise new PR..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants