Window borders #477

Closed
SirCmpwn opened this Issue Jan 25, 2016 · 30 comments

Comments

Projects
None yet
8 participants
@SirCmpwn
Member

SirCmpwn commented Jan 25, 2016

Discussion on how best to implement window borders. Two main choices:

  • Draw them with GL in wlc's pre-render hook
  • Create rgba surfaces for each window that sit behind each window and draw the border around it

I'm really not convinced either way is the obvious solution. Discuss.

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Jan 25, 2016

Contributor

Just a few thoughts. Which is the easiest to implement right now and what
would be the performance of each? We might not know that yet though
On 26 Jan 2016 8:19 am, "Drew DeVault" notifications@github.com wrote:

Discussion on how best to implement window borders. Two main choices:

Draw them with GL in wlc's pre-render hook
Create rgba surfaces for each window that sit behind each window and draw
the border around it

I'm really not convinced either way is the obvious solution. Discuss.


Reply to this email directly or view it on GitHub.

Contributor

crondog commented Jan 25, 2016

Just a few thoughts. Which is the easiest to implement right now and what
would be the performance of each? We might not know that yet though
On 26 Jan 2016 8:19 am, "Drew DeVault" notifications@github.com wrote:

Discussion on how best to implement window borders. Two main choices:

Draw them with GL in wlc's pre-render hook
Create rgba surfaces for each window that sit behind each window and draw
the border around it

I'm really not convinced either way is the obvious solution. Discuss.


Reply to this email directly or view it on GitHub.

@SethBarberee

This comment has been minimized.

Show comment
Hide comment
@SethBarberee

SethBarberee Jan 25, 2016

Contributor

With rgba surfaces, wouldn't that mean that the user could specify the colors too and hence a colored border? I think that would be good choice in terms of customization...

Contributor

SethBarberee commented Jan 25, 2016

With rgba surfaces, wouldn't that mean that the user could specify the colors too and hence a colored border? I think that would be good choice in terms of customization...

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Jan 25, 2016

Contributor

You can specify color in gl too :)
On 26 Jan 2016 8:36 am, "Seth Barberee" notifications@github.com wrote:

With rgba surfaces, wouldn't that mean that the user could specify the
colors too and hence a colored border? I think that would be good choice in
terms of customization...


Reply to this email directly or view it on GitHub
#477 (comment).

Contributor

crondog commented Jan 25, 2016

You can specify color in gl too :)
On 26 Jan 2016 8:36 am, "Seth Barberee" notifications@github.com wrote:

With rgba surfaces, wouldn't that mean that the user could specify the
colors too and hence a colored border? I think that would be good choice in
terms of customization...


Reply to this email directly or view it on GitHub
#477 (comment).

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 25, 2016

Member

Probably easier to implement with GL. Unsure about the performance.

Member

SirCmpwn commented Jan 25, 2016

Probably easier to implement with GL. Unsure about the performance.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 25, 2016

Member

Text rendering in GL (for window titles) is a pain in the ass, fwiw

Member

SirCmpwn commented Jan 25, 2016

Text rendering in GL (for window titles) is a pain in the ass, fwiw

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Jan 25, 2016

Contributor

We can use Cairo for that can't we
On 26 Jan 2016 8:42 am, "Drew DeVault" notifications@github.com wrote:

Text rendering in GL (for window titles) is a pain in the ass, fwiw


Reply to this email directly or view it on GitHub
#477 (comment).

Contributor

crondog commented Jan 25, 2016

We can use Cairo for that can't we
On 26 Jan 2016 8:42 am, "Drew DeVault" notifications@github.com wrote:

Text rendering in GL (for window titles) is a pain in the ass, fwiw


Reply to this email directly or view it on GitHub
#477 (comment).

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 25, 2016

Member

Probably, but the GL backend for cairo is experimental. Not sure what that implies.

Member

SirCmpwn commented Jan 25, 2016

Probably, but the GL backend for cairo is experimental. Not sure what that implies.

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Jan 25, 2016

Contributor

Hmm most wayland client code/tutorials that I have seen all use egl and cairo and they all run ok

Contributor

crondog commented Jan 25, 2016

Hmm most wayland client code/tutorials that I have seen all use egl and cairo and they all run ok

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 25, 2016

Member

Well, if it works, it works.

Member

SirCmpwn commented Jan 25, 2016

Well, if it works, it works.

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Jan 25, 2016

Contributor

Would the surface method be something like

  • Create a surface and attach to a view
  • When rendering the view also render the surface
Contributor

crondog commented Jan 25, 2016

Would the surface method be something like

  • Create a surface and attach to a view
  • When rendering the view also render the surface
@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 25, 2016

Member

The surface method would be to create a new surface every time a view is created that needs window borders and somehow associate it with that window, then move it during the layout arrangement.

Member

SirCmpwn commented Jan 25, 2016

The surface method would be to create a new surface every time a view is created that needs window borders and somehow associate it with that window, then move it during the layout arrangement.

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Jan 25, 2016

Contributor

I am leaning towards the pre hook method as we only need to calculate and draw the border instead of dealing with creating/linking/moving/drawing another object

Contributor

crondog commented Jan 25, 2016

I am leaning towards the pre hook method as we only need to calculate and draw the border instead of dealing with creating/linking/moving/drawing another object

@ViktorNova

This comment has been minimized.

Show comment
Hide comment
@ViktorNova

ViktorNova Jan 26, 2016

I'm just chiming in with my 2 cents, but I really hope Sway is planning to support window buttons at some point in the future, and that whatever decision is made will allow for that feature down the road!!

I know i3 does not do this and has no plans to do so, but it would be great if Sway did

I'm just chiming in with my 2 cents, but I really hope Sway is planning to support window buttons at some point in the future, and that whatever decision is made will allow for that feature down the road!!

I know i3 does not do this and has no plans to do so, but it would be great if Sway did

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 26, 2016

Member

I have no intention of implementing window buttons.

Member

SirCmpwn commented Jan 26, 2016

I have no intention of implementing window buttons.

@ViktorNova

This comment has been minimized.

Show comment
Hide comment

Aww sad.

@yacinehmito

This comment has been minimized.

Show comment
Hide comment
@yacinehmito

yacinehmito Jan 26, 2016

Contributor

How will this interfere with client-side window decoration?

Contributor

yacinehmito commented Jan 26, 2016

How will this interfere with client-side window decoration?

@mikkeloscar

This comment has been minimized.

Show comment
Hide comment
@mikkeloscar

mikkeloscar Jan 26, 2016

Collaborator

@gpyh they will just be inside the borders drawn by sway.

Collaborator

mikkeloscar commented Jan 26, 2016

@gpyh they will just be inside the borders drawn by sway.

@ke7ofi

This comment has been minimized.

Show comment
Hide comment
@ke7ofi

ke7ofi Jan 26, 2016

@ViktorNova if you're sad and have the skills, fork it. For something keyboard-operated like Sway, there's no reason to have them.

ke7ofi commented Jan 26, 2016

@ViktorNova if you're sad and have the skills, fork it. For something keyboard-operated like Sway, there's no reason to have them.

@ke7ofi

This comment has been minimized.

Show comment
Hide comment
@ke7ofi

ke7ofi Jan 26, 2016

I'm not very familiar with the current situation, but isn't it basically just using the wallpaper? With i3, there's no “justification” for having wallpaper, as it's never shown while windows (except the floating kind) are up, but here, the wallpaper could be the borders, providing a practical reason to have one.

Basically, I'm suggesting not implementing custom borders at all, but I don't know if that would entail a loss of functionality.

ke7ofi commented Jan 26, 2016

I'm not very familiar with the current situation, but isn't it basically just using the wallpaper? With i3, there's no “justification” for having wallpaper, as it's never shown while windows (except the floating kind) are up, but here, the wallpaper could be the borders, providing a practical reason to have one.

Basically, I'm suggesting not implementing custom borders at all, but I don't know if that would entail a loss of functionality.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 26, 2016

Member

I don't really understand what you're suggesting.

Member

SirCmpwn commented Jan 26, 2016

I don't really understand what you're suggesting.

@mikkeloscar

This comment has been minimized.

Show comment
Hide comment
@mikkeloscar

mikkeloscar Jan 26, 2016

Collaborator

@ke7ofi borders are very helpful to see what window has focus, in i3 the focused window has a blue border while the others have a grey border (by default).

Also the title of the window is nice to have.

Collaborator

mikkeloscar commented Jan 26, 2016

@ke7ofi borders are very helpful to see what window has focus, in i3 the focused window has a blue border while the others have a grey border (by default).

Also the title of the window is nice to have.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 26, 2016

Member

Borders are also very useful in the tiled and stacking layouts.

Member

SirCmpwn commented Jan 26, 2016

Borders are also very useful in the tiled and stacking layouts.

@ke7ofi

This comment has been minimized.

Show comment
Hide comment
@ke7ofi

ke7ofi Jan 26, 2016

@mikkeloscar I rarely use the titles except when they're forced (in tabbing mode), but I definitely see why that's important. Focus is also important, so I suppose my suggestion didn't make sense, sorry.

ke7ofi commented Jan 26, 2016

@mikkeloscar I rarely use the titles except when they're forced (in tabbing mode), but I definitely see why that's important. Focus is also important, so I suppose my suggestion didn't make sense, sorry.

@ledti

This comment has been minimized.

Show comment
Hide comment
@ledti

ledti Jan 27, 2016

Also worth noting is the hide_edge_borders feature, since its potential implementation might affect the consideration of how to implement window borders.


As for the discussion, I see titlebars and borders as two separate features:

Titlebars are definitely needed for stacking/tabbed layouts.

Borders are only necessary as an indicator of focus, but otherwise they're just a cosmetic feature.

ledti commented Jan 27, 2016

Also worth noting is the hide_edge_borders feature, since its potential implementation might affect the consideration of how to implement window borders.


As for the discussion, I see titlebars and borders as two separate features:

Titlebars are definitely needed for stacking/tabbed layouts.

Borders are only necessary as an indicator of focus, but otherwise they're just a cosmetic feature.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Jan 27, 2016

Member

As for the discussion, I see titlebars and borders as two separate features:

They aren't, really.

Member

SirCmpwn commented Jan 27, 2016

As for the discussion, I see titlebars and borders as two separate features:

They aren't, really.

@ke7ofi

This comment has been minimized.

Show comment
Hide comment
@ke7ofi

ke7ofi Jan 28, 2016

I'm not sure how separate you're thinking of, but I think i3's semi-optional titlebars are a reasonable implementation. (I guess reasonable design is a large part of why I like i3 so much, actually.)

ke7ofi commented Jan 28, 2016

I'm not sure how separate you're thinking of, but I think i3's semi-optional titlebars are a reasonable implementation. (I guess reasonable design is a large part of why I like i3 so much, actually.)

@SirCmpwn SirCmpwn closed this Mar 30, 2016

@ViktorNova

This comment has been minimized.

Show comment
Hide comment
@ViktorNova

ViktorNova Apr 13, 2016

The reason this makes me sad is because right now there is no such thing as a tiling window manager that is touchscreen-friendly. However, i3 accidentally turned out to be damn near perfect for a touchscreen, but because of the main developers ideals, they 'will never add window decoration buttons'.

I was hoping with Sway's broader goals and a different crew that I might be able to persuade you to at least consider this feature that, if implemented, could possible make Sway a major contender in the rapidly growing touchscreen market that is currently only served by window managers that are floating and/or fullscreen only.

Sadly I am not a coder, or I would absolutely fork it myself!

The reason this makes me sad is because right now there is no such thing as a tiling window manager that is touchscreen-friendly. However, i3 accidentally turned out to be damn near perfect for a touchscreen, but because of the main developers ideals, they 'will never add window decoration buttons'.

I was hoping with Sway's broader goals and a different crew that I might be able to persuade you to at least consider this feature that, if implemented, could possible make Sway a major contender in the rapidly growing touchscreen market that is currently only served by window managers that are floating and/or fullscreen only.

Sadly I am not a coder, or I would absolutely fork it myself!

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Apr 13, 2016

Member

We're going to be adding multitouch bindings in the future, so you could bind a gesture to do whatever the buttons could do.

Member

SirCmpwn commented Apr 13, 2016

We're going to be adding multitouch bindings in the future, so you could bind a gesture to do whatever the buttons could do.

@mikkeloscar

This comment has been minimized.

Show comment
Hide comment
@mikkeloscar

mikkeloscar Apr 13, 2016

Collaborator

@ViktorNova what about CSD? Most clients has it enabled by default in wayland so the buttons are already there.

Collaborator

mikkeloscar commented Apr 13, 2016

@ViktorNova what about CSD? Most clients has it enabled by default in wayland so the buttons are already there.

@ViktorNova

This comment has been minimized.

Show comment
Hide comment
@ViktorNova

ViktorNova Apr 18, 2016

@SirCmpwn - That is EXCELLENT to hear, I will definitely keep my eye on the project! =)

@mikkeloscar - This is unfortunately true only for GTK3 apps, which only accounts for a portion of Linux desktop software

@SirCmpwn - That is EXCELLENT to hear, I will definitely keep my eye on the project! =)

@mikkeloscar - This is unfortunately true only for GTK3 apps, which only accounts for a portion of Linux desktop software

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment