Cannot interact with certain modal views #505

Closed
crondog opened this Issue Mar 6, 2016 · 16 comments

Comments

Projects
None yet
4 participants
@crondog
Contributor

crondog commented Mar 6, 2016

Part of the font selection modal view from lxappearance is unselectable.

Steps to reproduce:

  • Open lxappearance
  • Click the font selection box
  • You are now unable to move/resize the window from the bottom and you are unable to click the OK and Cancel buttons

This works as expected inside wlc/example

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Mar 9, 2016

Contributor

An update on this: If lxappearance is set to floating, and then you open the font selection you are able to resize and click the buttons

Contributor

crondog commented Mar 9, 2016

An update on this: If lxappearance is set to floating, and then you open the font selection you are able to resize and click the buttons

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Mar 11, 2016

Member

I can reproduce this and have similar issues for many other kinds of windows. I will investigate this soon.

Member

SirCmpwn commented Mar 11, 2016

I can reproduce this and have similar issues for many other kinds of windows. I will investigate this soon.

@SirCmpwn SirCmpwn changed the title from Cannot interact with part of modal view to Cannot interact with certain modal views Mar 24, 2016

@mikkeloscar mikkeloscar referenced this issue Mar 30, 2016

Merged

Implement Window borders #551

7 of 7 tasks complete
@mikkeloscar

This comment has been minimized.

Show comment
Hide comment
@mikkeloscar

mikkeloscar Mar 30, 2016

Collaborator

This problem is more clearly exposed with borders enabled:

2016-03-30-101713_swaygrab

Collaborator

mikkeloscar commented Mar 30, 2016

This problem is more clearly exposed with borders enabled:

2016-03-30-101713_swaygrab

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Mar 30, 2016

Member

Thanks. Window borders does reveal a lot about this problem. Pulled in @Cloudef, since I'm betting this is a wlc thing.

Member

SirCmpwn commented Mar 30, 2016

Thanks. Window borders does reveal a lot about this problem. Pulled in @Cloudef, since I'm betting this is a wlc thing.

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Mar 30, 2016

Contributor

It looks like the floating view has an offset of the parent view origin.

Contributor

crondog commented Mar 30, 2016

It looks like the floating view has an offset of the parent view origin.

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Mar 30, 2016

Contributor

But the borders are correctly calculated

Contributor

crondog commented Mar 30, 2016

But the borders are correctly calculated

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Mar 30, 2016

Member

Right. I'm thinking that wlc is giving us one geometry for the window and rendering it in a different place. It's probably more subtle than that, though, because interactivity with these windows is weird.

Member

SirCmpwn commented Mar 30, 2016

Right. I'm thinking that wlc is giving us one geometry for the window and rendering it in a different place. It's probably more subtle than that, though, because interactivity with these windows is weird.

@Cloudef

This comment has been minimized.

Show comment
Hide comment
@Cloudef

Cloudef Mar 30, 2016

Both parented view's and subsurfaces have special logic. If this is either one of them, I would not be surprised if there was bugs. If input coordinates are wrong, then the surface is not rendered in correct place or vice versa.

Cloudef commented Mar 30, 2016

Both parented view's and subsurfaces have special logic. If this is either one of them, I would not be surprised if there was bugs. If input coordinates are wrong, then the surface is not rendered in correct place or vice versa.

@Cloudef

This comment has been minimized.

Show comment
Hide comment
@Cloudef

Cloudef Mar 30, 2016

@SirCmpwn Did you guys use wlc_get_visible_geometry that was recently added for visual stuff though?

Cloudef commented Mar 30, 2016

@SirCmpwn Did you guys use wlc_get_visible_geometry that was recently added for visual stuff though?

@crondog

This comment has been minimized.

Show comment
Hide comment
@crondog

crondog Mar 30, 2016

Contributor

Doing the below will set the floating view to the parents x,y. Not sure how to fix it yet though

diff --git a/sway/container.c b/sway/container.c
index 21a929b..75eb8c1 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -311,8 +311,8 @@ swayc_t *new_floating_view(wlc_handle handle) {
        wlc_view_get_visible_geometry(handle, &geometry);

        // give it requested geometry, but place in center
-       view->x = (swayc_active_workspace()->width - geometry.size.w) / 2;
-       view->y = (swayc_active_workspace()->height- geometry.size.h) / 2;
+       view->x = 0;
+       view->y = 0;
        view->width = geometry.size.w;
        view->height = geometry.size.h;
Contributor

crondog commented Mar 30, 2016

Doing the below will set the floating view to the parents x,y. Not sure how to fix it yet though

diff --git a/sway/container.c b/sway/container.c
index 21a929b..75eb8c1 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -311,8 +311,8 @@ swayc_t *new_floating_view(wlc_handle handle) {
        wlc_view_get_visible_geometry(handle, &geometry);

        // give it requested geometry, but place in center
-       view->x = (swayc_active_workspace()->width - geometry.size.w) / 2;
-       view->y = (swayc_active_workspace()->height- geometry.size.h) / 2;
+       view->x = 0;
+       view->y = 0;
        view->width = geometry.size.w;
        view->height = geometry.size.h;
@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Mar 30, 2016

Member

It uses sway's internal state for that view, which is calculated by sway and handed to wlc_view_set_geometry.

Member

SirCmpwn commented Mar 30, 2016

It uses sway's internal state for that view, which is calculated by sway and handed to wlc_view_set_geometry.

@mikkeloscar

This comment has been minimized.

Show comment
Hide comment
@mikkeloscar

mikkeloscar Mar 30, 2016

Collaborator

We only use wlc_view_get_visible_geometry now with the border stuff merged fwiw. (I kind of forgot about this, but it is the right thing to do anyway).

Doesn't solve this problem directly though.

Collaborator

mikkeloscar commented Mar 30, 2016

We only use wlc_view_get_visible_geometry now with the border stuff merged fwiw. (I kind of forgot about this, but it is the right thing to do anyway).

Doesn't solve this problem directly though.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Mar 30, 2016

Member

Really? So far as I can tell, that's not the case (after reading through the relevant code).

Member

SirCmpwn commented Mar 30, 2016

Really? So far as I can tell, that's not the case (after reading through the relevant code).

@mikkeloscar

This comment has been minimized.

Show comment
Hide comment
@mikkeloscar

mikkeloscar Mar 30, 2016

Collaborator

It was sneaked in here: 5a13cb0#diff-5125e6a182d823f6a2ad1c0b7a576892L907 and 2 other places in that commit, to replace wlc_view_get_geometry

Collaborator

mikkeloscar commented Mar 30, 2016

It was sneaked in here: 5a13cb0#diff-5125e6a182d823f6a2ad1c0b7a576892L907 and 2 other places in that commit, to replace wlc_view_get_geometry

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
@SirCmpwn

SirCmpwn Mar 30, 2016

Member

Ah. Cool.

Member

SirCmpwn commented Mar 30, 2016

Ah. Cool.

@SirCmpwn

This comment has been minimized.

Show comment
Hide comment
Member

SirCmpwn commented Mar 31, 2016

Fixed by Cloudef/wlc#145

@SirCmpwn SirCmpwn closed this Mar 31, 2016

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