Opened 13 years ago

Closed 10 years ago

#693 closed bug (fixed)

Cannot Change Resolution per Workspace (easy)

Reported by:… Owned by: anevilyak
Priority: normal Milestone: R1
Component: Servers/app_server Version:
Keywords: Cc: diver, maxluebbe
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by axeld)

If I change the resolution in one of the Workspaces say from 1024x768, to 800x600 any bpp, it changes it for all workspaces, even though I have only set for Current Workspace, then after I restart it has gone back to the original setting ie 1024x768. If I change resolution to 800x600 any bpp for all Workspaces, as set in the Preferences, Screen Application, all the Workspaces are properly set. So I can change the screen resolution but I have to change it for all workspaces at once for it to work properly and stay at that setting after a reboot. The version of Haiku I tested this on is: rev17910_raw.tar.bz2

Attachments (1)

693.diff (8.0 KB) - added by anevilyak 10 years ago.
Preliminary patch

Download all attachments as: .zip

Change History (24)

comment:1 Changed 13 years ago by axeld

Yes, that's a known app_server bug (or rather, unimplemented feature). Thanks for reporting! I wonder why no one noticed that before :-)

comment:2 Changed 13 years ago by axeld

Component: PreferencesServers

comment:3 Changed 13 years ago by diver

Cc: diver added

comment:4 Changed 13 years ago by axeld

Description: modified (diff)
Platform: All
Priority: normalhigh

comment:5 Changed 13 years ago by axeld

Component: GeneralUser Interface/app_server

comment:6 Changed 12 years ago by axeld

Priority: highnormal

comment:7 Changed 12 years ago by wkornewald

Summary: Cannot Change Resolution per WorkspaceCannot Change Resolution per Workspace (easy)

comment:8 Changed 12 years ago by max luebbe

Cc: max luebbe added

comment:9 Changed 12 years ago by max luebbe

Cc: maxluebbe added; max luebbe removed

comment:10 Changed 12 years ago by max luebbe

Working on this bug by first trying to reproduce it -

When I go to switch the resolution via preferences->screen

My workspace count on the left is 4, yet my choices for changing the workspace resolutions are: all workspaces (checked) and current workspace which is ghosted.

Changing the resolution and trying to apply it, I get a msg saying that my hardware isnt supported (geforce 6250go) and ill get my new resolution after a reboot.

Am I trying to change the resolution of a specific workspace incorrectly since that option doesn't seem to exist here, or is this another bug?

I'm running a vmware image I built from source revision 21967.

comment:11 Changed 12 years ago by tangobravo

vmware does not present the guest OS with the actual graphics card in your machine. I've found a driver in the tree for VMWare graphics, but perhaps this is not added to the image by default.

Without support for your graphics card, Haiku will use standard VESA mode, but that does not allow for changing resolutions on the fly. That means you won't be able to work on this bug under VESA, as per-workspace resolutions require the resolution to be changed on demand. In short, not allowing you to highlight "Current Workspace" is the correct behaviour under VESA. I don't know if that's just luck though - perhaps it's always disabled as the feature hasn't been implemented - not sure.

comment:12 Changed 12 years ago by axeld

Indeed, you'll have to have a supported graphics card to do this. The VMware graphics driver is currently not on the image, because it uses some optimizations which disable the kernel debugger - and since Haiku is not really stable yet, this is a very handy tool we don't want to lose yet.

However, you can put it on the image manually, using your build/jam/UserBuildConfig - alternatively, you can also change your HaikuImage build file to include the driver again, but you'll then have to make sure you don't commit it accidently :-)

Finally, you only have the two options "current" and "all" because you are supposed to be on the workspace you change the resolution of. This way, it's guaranteed that you see what you do. The other preference applications (like Backgrounds) are working in the same way. You can either switch workspaces using Cmd+F1..12 or by using the Workspaces application.

Thanks for looking into this!

comment:13 Changed 12 years ago by axeld

BTW the "easy" in the title could be a bit misleading - it's only a couple of lines of code, but you'll probably have to be a bit familiar with the app_server to do it properly.

comment:14 Changed 12 years ago by axeld

Milestone: R1R1/alpha

comment:15 Changed 12 years ago by stippi

Considering the goal of that release, why was this bug moved to the R1/alpha milestone?

comment:16 Changed 12 years ago by axeld

Milestone: R1/alphaR1

I somehow identified this as a prominent feature of Haiku that the alpha version shouldn't miss. But I guess you're right :-)

comment:17 Changed 11 years ago by aldeck

i disabled the "current workspace" option for now. hrev24280

comment:18 Changed 10 years ago by anevilyak

Owner: changed from axeld to anevilyak

I can try and have a look at this one.

Changed 10 years ago by anevilyak

Attachment: 693.diff added

Preliminary patch

comment:19 Changed 10 years ago by anevilyak

Status: newassigned

Initial patch attached - allows per workspace resolutions to be used. Known caveats:

1) If you attempt to call BScreen::SetMode() with a workspace ID that is not the active workspace, it will clone the active workspace's settings to that workspace instead of the mode specified in the call.

2) In order to avoid unnecessary resolution switches on workspace changes, a mode switch is skipped if the display modes are identical except for their flags. This shouldn't actually matter in any user-visible way, though it begs the question of how we want to handle the case of wanting to switch a mode's flags without touching anything else.

Happy testing!

comment:20 Changed 10 years ago by anevilyak

Note also, that caveat #1 is not currently user-visible that I know of - the Screen preflet only makes calls in this manner when setting the resolution of all workspaces, in which case by definition the modes of all workspaces will match that of the active one.

comment:21 Changed 10 years ago by luroh

Interesting feature :) An observation:

Start the Workspaces applet
Move the applet up to somewhere below the desktop icons
Switch to the top right workspace
Open Preferences -> Screen
Set the resolution for current workspace to 800x600
Start switching between the two top workspaces

Result: the position of the Workspace applet is not constant, it keeps moving around vertically.

comment:22 Changed 10 years ago by luroh

For better effect, move the applet window a bit between switching workspaces.

comment:23 Changed 10 years ago by anevilyak

Resolution: fixed
Status: assignedclosed

Fixed in hrev28785 - the last problem you mentioned I filed a separate ticket for since I've had no luck tracking down why it occurs.

Note: See TracTickets for help on using tickets.