-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
TaskBar: Show xwayland mark even if name is not shown #166
base: master
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.
This way we have no tooltip_text for X apps, if not settings["show-app-name"] . Please fix.
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.
Setting tooltip text should not depend on not len(name) > 0
but on settings["show-app-name"]
.
if settings["show-app-name"]:
(...)
else:
self.set_tooltip_text(_name)
Yes but if |
Just check if X11 apps have tooltips. They have not on my side. |
Oops, my bad when xwayland mark is added to |
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.
You do need to test your code before submission. It still doesn't work as it should.
If I understand well, you want the label to show up regardless of the "show-app-name"
value, if the app has no app_id
(runs on XWayland). IMO the simplest way to achieve this result is:
if con.name:
check_key(settings, "show-app-name", True)
check_key(settings, "name-max-len", 20)
name = con.name[:settings["name-max-len"]] if len(con.name) > settings["name-max-len"] else con.name
if settings["mark-xwayland"] and not con.app_id:
name = "X|" + name
label = Gtk.Label()
if settings["show-app-name"]:
label.set_text(name)
else:
self.set_tooltip_text(name)
if not con.app_id:
label.set_text("X")
label.set_angle(settings["angle"])
if settings["show-app-name"] or (settings["mark-xwayland"] and not con.app_id):
self.box.pack_start(label, False, False, 0)
This makes more sense to me to allow xwayland mark to be shown when I don't need the window name