Skip to content

Send icons for legacy X11 Apps #231

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alimirjamali
Copy link
Contributor

Since very old X11 Apps (Xterm, Xcalc, Xlogo, Xclock, Xeyes, ...) do not have the _NET_WM_ICON Atom, revert to WM_HINT and extract icons and their transparency with that technology. This is mostly useful for Xterm

fixes: QubesOS/qubes-issues#9973

@qubesos-bot
Copy link

qubesos-bot commented May 30, 2025

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025060120-4.3&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025031804-4.3&flavor=update

  • system_tests_whonix

    • whonix_torbrowser: unnamed test (unknown)
    • whonix_torbrowser: Failed (test died)
      # Test died: no candidate needle with tag(s) 'anon-whonix-tor-brows...
  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/dcWzE-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

Failed tests

8 failures
  • system_tests_whonix

    • whonix_torbrowser: unnamed test (unknown)
    • whonix_torbrowser: Failed (test died)
      # Test died: no candidate needle with tag(s) 'anon-whonix-tor-brows...
  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/dcWzE-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/132953#dependencies

14 fixed
  • system_tests_whonix

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

  • system_tests_suspend

    • suspend: unnamed test (unknown)
    • suspend: Failed (test died)
      # Test died: no candidate needle with tag(s) 'SUSPEND-FAILED' match...
  • system_tests_basic_vm_qrexec_gui

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • clipboard_and_web: unnamed test (unknown)

    • clipboard_and_web: Failed (test died)
      # Test died: no candidate needle with tag(s) 'qubes-website' matche...

    • clipboard_and_web: wait_serial (wait serial expected)
      # wait_serial expected: "lspci; echo 2E8vz-\$?-"...

  • system_tests_audio

  • system_tests_whonix@hw7

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

  • system_tests_guivm_vnc_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'files-work' matched...

Unstable tests

  • system_tests_update

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw1

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw7

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw13

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...

Performance Tests

Performance degradation:

17 performance degradations
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 236272.00 :small_red_triangle: ( previous job: 446963.00, degradation: 52.86%)
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 85801.00 :small_red_triangle: ( previous job: 129298.00, degradation: 66.36%)
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 115731.00 :small_red_triangle: ( previous job: 294295.00, degradation: 39.32%)
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 34194.00 :small_red_triangle: ( previous job: 95454.00, degradation: 35.82%)
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 21397.00 :small_red_triangle: ( previous job: 79803.00, degradation: 26.81%)
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 5197.00 :small_red_triangle: ( previous job: 6149.00, degradation: 84.52%)
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 191266.00 :small_red_triangle: ( previous job: 250795.00, degradation: 76.26%)
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 3914.00 :small_red_triangle: ( previous job: 4903.00, degradation: 79.83%)
  • fedora-41-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 123850.00 :small_red_triangle: ( previous job: 162081.00, degradation: 76.41%)
  • fedora-41-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 244537.00 :small_red_triangle: ( previous job: 318716.00, degradation: 76.73%)
  • fedora-41-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 48392.00 :small_red_triangle: ( previous job: 87940.00, degradation: 55.03%)
  • fedora-41-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 2533.00 :small_red_triangle: ( previous job: 3599.00, degradation: 70.38%)
  • fedora-41-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 132476.00 :small_red_triangle: ( previous job: 170062.00, degradation: 77.90%)
  • fedora-41-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 47623.00 :small_red_triangle: ( previous job: 61534.00, degradation: 77.39%)
  • fedora-41-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 328810.00 :small_red_triangle: ( previous job: 369868.00, degradation: 88.90%)
  • fedora-41-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 82131.00 :small_red_triangle: ( previous job: 179949.00, degradation: 45.64%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 3037.00 :small_red_triangle: ( previous job: 5672.00, degradation: 53.54%)

Remaining performance tests:

39 tests
  • debian-12-xfce_exec: 7.26 🔺 ( previous job: 7.12, degradation: 102.01%)
  • debian-12-xfce_exec-root: 28.41 🟢 ( previous job: 28.65, improvement: 99.16%)
  • debian-12-xfce_socket: 8.67 🔺 ( previous job: 8.60, degradation: 100.83%)
  • debian-12-xfce_socket-root: 8.06 🟢 ( previous job: 8.52, improvement: 94.51%)
  • debian-12-xfce_exec-data-simplex: 74.44 🔺 ( previous job: 71.62, degradation: 103.93%)
  • debian-12-xfce_exec-data-duplex: 69.53 🟢 ( previous job: 70.34, improvement: 98.84%)
  • debian-12-xfce_exec-data-duplex-root: 71.36 🟢 ( previous job: 82.72, improvement: 86.27%)
  • debian-12-xfce_socket-data-duplex: 162.74 🔺 ( previous job: 156.96, degradation: 103.68%)
  • fedora-41-xfce_exec: 9.25 🟢 ( previous job: 9.27, improvement: 99.83%)
  • fedora-41-xfce_exec-root: 58.59 🟢 ( previous job: 61.51, improvement: 95.26%)
  • fedora-41-xfce_socket: 8.87 🔺 ( previous job: 8.63, degradation: 102.75%)
  • fedora-41-xfce_socket-root: 8.11 🟢 ( previous job: 8.71, improvement: 93.13%)
  • fedora-41-xfce_exec-data-simplex: 66.59 🟢 ( previous job: 75.53, improvement: 88.16%)
  • fedora-41-xfce_exec-data-duplex: 76.92 🔺 ( previous job: 71.56, degradation: 107.49%)
  • fedora-41-xfce_exec-data-duplex-root: 97.99 🟢 ( previous job: 109.13, improvement: 89.80%)
  • fedora-41-xfce_socket-data-duplex: 139.86 🟢 ( previous job: 150.61, improvement: 92.86%)
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 12073.00 :green_circle: ( previous job: 10795.00, improvement: 111.84%)
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 4537.00 :small_red_triangle: ( previous job: 4826.00, degradation: 94.01%)
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 472757.00 :green_circle: ( previous job: 382273.00, improvement: 123.67%)
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 436724.00 :small_red_triangle: ( previous job: 437636.00, degradation: 99.79%)
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 197119.00 :green_circle: ( previous job: 184752.00, improvement: 106.69%)
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 101940.00 :green_circle: ( previous job: 62195.00, improvement: 163.90%)
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 7103.00 :green_circle: ( previous job: 6479.00, improvement: 109.63%)
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 7942.00 :green_circle: ( previous job: 7669.00, improvement: 103.56%)
  • fedora-41-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 378137.00 :green_circle: ( previous job: 368309.00, improvement: 102.67%)
  • fedora-41-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 86419.00 :green_circle: ( previous job: 82694.00, improvement: 104.50%)
  • fedora-41-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 7766.00 :small_red_triangle: ( previous job: 8485.00, degradation: 91.53%)
  • fedora-41-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 580.00 :green_circle: ( previous job: 542.00, improvement: 107.01%)
  • fedora-41-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 371308.00 :small_red_triangle: ( previous job: 373957.00, degradation: 99.29%)
  • fedora-41-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 330885.00 :small_red_triangle: ( previous job: 334687.00, degradation: 98.86%)
  • fedora-41-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 78799.00 :small_red_triangle: ( previous job: 80283.00, degradation: 98.15%)
  • fedora-41-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 3958.00 :green_circle: ( previous job: 2215.00, improvement: 178.69%)
  • fedora-41-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 8268.00 :green_circle: ( previous job: 7540.00, improvement: 109.66%)
  • fedora-41-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 1083.00 :small_red_triangle: ( previous job: 1130.00, degradation: 95.84%)
  • fedora-41-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 293062.00 :small_red_triangle: ( previous job: 324737.00, degradation: 90.25%)
  • fedora-41-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 128025.00 :green_circle: ( previous job: 17567.00, improvement: 728.78%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 83141.00 :green_circle: ( previous job: 79021.00, improvement: 105.21%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8179.00 :green_circle: ( previous job: 7867.00, improvement: 103.97%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 2055.00 :green_circle: ( previous job: 1953.00, improvement: 105.22%)

Since very old X11 Apps (Xterm, Xcalc, Xlogo, Xclock, Xeyes, ...) do not
have the `_NET_WM_ICON` Atom, revert to `WM_HINT` and extract icons and
their transparency with that technology. This is mostly useful for Xterm

fixes: QubesOS/qubes-issues#9973
@alimirjamali
Copy link
Contributor Author

Reason for amendment:

While I could not find any program which uses 8bit/pixel pixel_mask (on Qubes OS 4.3 & Xfwm), It would be better to write the code for the hypothetical scenario and be safe than sorry.

@@ -49,6 +52,7 @@ class IconRetriever(object):
self.conn = xcffib.connect()
self.setup = self.conn.get_setup()
self.root = self.setup.roots[0].root
self.display = Display()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't make the second X11 connection with another library, use XCB connection that is here already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I rewrote the entire patch using xcffib in another commit. I can squash the two commits into one commit. But I believe it might be a good idea to keep a history of Xlib patch. So in few years, if anyone looks at history, they can find out how it is done with either of the libraries.

Since xcffib is preferred over Xlib and the method for `_NET_WM_ICON` is
already implemented via xcffib, rewrite the previous patch with xcffib

related: QubesOS/qubes-issues#9973
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show Xterm icon (as well as other legacy X11 Apps which do not support _NET_WM_ICON Atom)
3 participants