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

Fix minimum height not being applied #1952

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

Suyooo
Copy link
Contributor

@Suyooo Suyooo commented Jun 1, 2024

Checklist

  • I have described the changes
  • I have linked to any relevant GitHub issues, if applicable
  • Documentation in doc/ has been updated
  • All new code is licensed under GPLv3

Description

Small commit to fix a regression introduced in 2d50767. The min/max methods of vec return the result as a new vector, but the return value is never assigned.

Output

Test config:

conky.config = {
	own_window = true,
	minimum_width = 100,
	minimum_height = 100,
	
	lua_load = "/home/chris/.config/conky/test.lua",
	lua_draw_hook_post = "main"
}
conky.text = [[]];
require 'cairo'
require 'cairo_xlib'

function conky_main()
	if conky_window==nil then return end
	print("window size: ", conky_window.width, "x", conky_window.height)
end

Running in HEAD:

> conky -D -c ~/.config/conky/test.conf
DEBUG(0) [/home/chris/software/conky/src/conky.cc:1955]: reading contents from config file '/home/chris/.config/conky/test.conf'
DEBUG(0) [/home/chris/software/conky/src/x11.cc:244]: enter init_x11()
DEBUG(0) [/home/chris/software/conky/src/x11.cc:363]: Fixed xinerama area to: 0 0 1920 1080
DEBUG(0) [/home/chris/software/conky/src/x11.cc:288]: leave init_x11()
DEBUG(0) [/home/chris/software/conky/src/x11.cc:481]: enter x11_init_window()
DEBUG(0) [/home/chris/software/conky/src/x11.cc:363]: Fixed xinerama area to: 0 0 1920 1080
conky: desktop window (0x1e3) is root window
conky: window type - normal
conky: drawing to created window (0x5000001)
DEBUG(0) [/home/chris/software/conky/src/x11.cc:895]: leave x11_init_window()
DEBUG(0) [/home/chris/software/conky/src/display-output.cc:39]: HTTP display output disabled. Enable by recompiling with 'BUILD_HTTP' flag enabled.
DEBUG(0) [/home/chris/software/conky/src/display-output.cc:39]: Wayland display output disabled. Enable by recompiling with 'BUILD_WAYLAND' flag enabled.
conky: FOUND: console
conky: FOUND: ncurses
conky: FOUND: file
conky: FOUND: x11
DEBUG(0) [/home/chris/software/conky/src/display-output.cc:109]: Initialized display output 'x11'... 
conky: 'herbstluftwm' x11 session running '(null)' desktop
window size: 	0.0	x	0.0
window size: 	0.0	x	0.0
DEBUG(0) [/home/chris/software/conky/src/x11.cc:176]: X window Error:
Display: 5601bf6c6e30, XID: 0, Serial: 530
error code: [major: 12, minor: 0]
window size: 	113.0	x	0.0
window size: 	113.0	x	0.0
window size: 	113.0	x	0.0
...

Running in this commit:

> conky -D -c ~/.config/conky/test.conf
DEBUG(0) [/home/chris/software/conky/src/conky.cc:1955]: reading contents from config file '.config/conky/test.conf'
DEBUG(0) [/home/chris/software/conky/src/x11.cc:244]: enter init_x11()
DEBUG(0) [/home/chris/software/conky/src/x11.cc:363]: Fixed xinerama area to: 0 0 1920 1080
DEBUG(0) [/home/chris/software/conky/src/x11.cc:288]: leave init_x11()
DEBUG(0) [/home/chris/software/conky/src/x11.cc:481]: enter x11_init_window()
DEBUG(0) [/home/chris/software/conky/src/x11.cc:363]: Fixed xinerama area to: 1920 0 3280 768
conky: desktop window (0x1e3) is root window
conky: window type - normal
conky: drawing to created window (0x5000001)
DEBUG(0) [/home/chris/software/conky/src/x11.cc:895]: leave x11_init_window()
DEBUG(0) [/home/chris/software/conky/src/display-output.cc:39]: HTTP display output disabled. Enable by recompiling with 'BUILD_HTTP' flag enabled.
DEBUG(0) [/home/chris/software/conky/src/display-output.cc:39]: Wayland display output disabled. Enable by recompiling with 'BUILD_WAYLAND' flag enabled.
conky: FOUND: console
conky: FOUND: ncurses
conky: FOUND: file
conky: FOUND: x11
DEBUG(0) [/home/chris/software/conky/src/display-output.cc:109]: Initialized display output 'x11'... 
conky: 'herbstluftwm' x11 session running '(null)' desktop
window size: 	0.0	x	0.0
window size: 	113.0	x	100.0
window size: 	113.0	x	100.0
window size: 	113.0	x	100.0
...

@github-actions github-actions bot added the sources PR modifies project sources label Jun 1, 2024
Copy link

netlify bot commented Jun 1, 2024

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit b935645
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/665b129a2ab985000855ba3d

@brndnmtthws brndnmtthws requested a review from Caellian June 1, 2024 14:12
@brndnmtthws
Copy link
Owner

Unrelated build issue should be fixed with #1953.

@Caellian Caellian merged commit c8b127d into brndnmtthws:main Jun 1, 2024
62 of 63 checks passed
@brndnmtthws brndnmtthws added the bug Bug report or bug fix PR label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report or bug fix PR sources PR modifies project sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants