After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 453981 - Add wnck_workspace_set_geometry()
Add wnck_workspace_set_geometry()
Status: RESOLVED OBSOLETE
Product: libwnck
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: 2.20.x
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-05 15:45 UTC by Vincent Untz
Modified: 2018-01-24 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (11.30 KB, patch)
2007-07-10 10:22 UTC, Vincent Untz
none Details | Review

Description Vincent Untz 2007-07-05 15:45:00 UTC
With this, we could make the workspace switcher configure the viewport.
Comment 1 Vincent Untz 2007-07-05 15:45:34 UTC
Hrm, we probably also need a "geometry-changed" signal.
Comment 2 Vincent Untz 2007-07-07 09:32:23 UTC
Hrm, we have wnck_screen_move_viewport(), so maybe this should be done in screen.c. Since I can't test this, I'll just wait for GUADEC and make a patch there.
Comment 3 Vincent Untz 2007-07-10 10:22:13 UTC
Created attachment 91535 [details] [review]
Patch

I'm not sure about the naming of the API. And I'm also thinking that we might want to have a WnckViewport object (I'll discuss this more later, or at GUADEC).
Comment 4 Vincent Untz 2007-07-10 12:58:52 UTC
(In reply to comment #3)
> And I'm also thinking that we might
> want to have a WnckViewport object (I'll discuss this more later, or at
> GUADEC).

I have some more time right now :-)

So, there are basically two uses for viewport:

 + standard viewport (ie, just a large desktop);

 + viewport used to simulate workspaces (workspace as in WnckWorkspace).

Most people using viewport are using viewport for the second reason. I believe it'd make sense to provide some convenience functions to handle this case as if we had WnckWorkspace. Let's call the new object a WnckViewspace (viewport workspace, isn't it original?)

So we could have wnck_window_move_to_viewspace(), wnck_viewspace_get_neighbor(), wnck_screen_get_viewspace(), wnck_window_set_viewspace_layout(), etc.

And we'd also have a wnck_screen_uses_viewspace() which would be this:

gboolean
wnck_screen_uses_viewspace (WnckScreen *screen)
{
  WnckWorkspace *space;

  g_return_val_if_fail (WNCK_IS_SCREEN (screen), FALSE);

  if (wnck_screen_get_workspace_count (screen) != 1)
    return FALSE;

  space = wnck_screen_get_workspace (screen, 0);

  return ((wnck_workspace_get_width (space) % wnck_screen_get_width (screen) == 0) &&
          (wnck_workspace_get_height (space) % wnck_screen_get_height (screen) == 0));
}

This makes it easy to know when we're in the second use case of viewport.

I can already see how this would be useful in the pager, and in the selector.

Any opinion on this?
Comment 5 Vincent Untz 2007-07-10 13:03:10 UTC
(In reply to comment #3)
> Created an attachment (id=91535) [edit]
> Patch
> 
> I'm not sure about the naming of the API.

In fact, what I was wondering is: should we put this API as wnck_workspace_set_geometry() (since we have wnck_workspace_get_width()/get_height()) or as wnck_screen_set_workspace_geometry() (since the workspace geometry is the same for all workspaces on a screen).

If we go with the latter, we might want to deprecate wnck_workspace_get_width()/get_height() and change them to wnck_screen_get_workspace_geometry().

I really don't know what's good here.
Comment 6 GNOME Infrastructure Team 2018-01-24 13:40:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libwnck/issues/89.