Skip to content

add an offset on the Y axis to the panel protocol#89

Open
shrub900 wants to merge 1 commit into
michaelforney:masterfrom
shrub900:master
Open

add an offset on the Y axis to the panel protocol#89
shrub900 wants to merge 1 commit into
michaelforney:masterfrom
shrub900:master

Conversation

@shrub900

Copy link
Copy Markdown

This adds an option to offset the geometry of a panel by set amount of pixels
New function provided and accesible via the protocol: set_y_offset

this commit comes from neuswc: it allows the use of the mojito bar that was designed for neuswc with normal swc compositors like velox

This adds an option to offset the geometry of a panel by set amount of pixels

New function provided and accesible via the protocol: set_y_offset
Comment thread libswc/panel.c
break;
case SWC_PANEL_EDGE_LEFT:
x = screen->x;
y = screen->y + screen->height - view->height - panel->offset;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the left and right edges also consider y_offset? Right now offset is not always x offset but also behaves like y offset for left and right panels.

Maybe we could call it edge_offset and side_offset?

Comment thread protocol/swc.xml

<request name="set_y_offset">
<arg name="offset" type="uint" />
</request>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we could just deprecate and rename set_offset, and add a new request that handles both edge and side offset.

In any case, the behavior we introduce here should be consistent and easily explained. As proposed, we have something like

  • Top: offset is from left, y_offset is from top.
  • Bottom: offset is from left, y_offset is from bottom.
  • Left: offset is from bottom, y_offset doesn't do anything.
  • Right: offset is from bottom, y_offset doesn't do anything.

Though also I think we're in agreement that we should just use layer shell, so maybe it's not worth worrying to much about this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants