theme.c: Use window icon for the menu button if available#778
theme.c: Use window icon for the menu button if available#778City-busz wants to merge 1 commit intolinuxmint:masterfrom
Conversation
This makes it consistent with the client-side decoration of GTK. Also, fix scaling of the icon.
| int x, y; | ||
|
|
||
| width = cairo_image_surface_get_width (surface) / scale; | ||
| height = cairo_image_surface_get_height (surface) / scale; |
There was a problem hiding this comment.
I only thought about this because I ran into different surface types somewhere else...
mini_icon can potentially be a cairo_xlib_surface (though it's very unlikely), but we should probably use cairo_surface_get_type() and use the the correct get_width/get_height functions.
See https://github.com/linuxmint/muffin/blob/master/src/x11/iconcache.c#L340-L365 (if !mask)
|
I was looking at gtk and their headerbar code, and the 'menu' decorator option isn't for the standard window-manager menu there, it's for an application menu - it means two different things. I'm not sure using the app icon makes sense for the button on server-decorated windows, other than 'because we can'. I'm having trouble even finding an app that calls |
|
Using the app icon doesn't make sense at all. That certainly wouldn't make it consistent. In fact, I'm not sure why this button should even be supported in the server side decorations. It would just be a placeholder for the right click window menu. I honestly don't see anything "consistent" about having this button. |
This makes it consistent with the client-side decoration of GTK.
Also, fix scaling of the icon.