Opened 7 years ago

Last modified 2 years ago

#8535 assigned enhancement

BRoster should expose a public API to show or hide a team

Reported by: hey68you Owned by: nobody
Priority: normal Milestone: R1
Component: Kits/Application Kit Version: R1/Development
Keywords: BRoster Cc: hey68you@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

There are 2 private API functions that Deskbar uses to show and hide all windows of a running application:

The 2 private functions are:

They are declared in headers/private/interface/WindowInfo.h and implemented in InterfaceDefs.cpp

do_minimize_team(...);
do_bring_to_front_team(...);

I would be nice if these could be exposed as public APIs in BRoster (which already has the related public function):

status_t ActivateApp(team_id team) const;

(The problem with ActivateApp() is that if the application is currently hidden, this method will not un-hide it).

It was proposed as a start that we create 2 new public functions in BRoster:

status_t HideTeam(team_id team);
status_t BringTeamToFront(team_id team);

Change History (3)

comment:1 by X512, 7 years ago

Don't forget that this functions potentially dangerous. Some bad program can always minimize all apps or always bring it's window to front and make system unusable.

For now sequrity is not a priority of Haiku, but I don't think that opening new sequrity holes is good idea.

Last edited 7 years ago by X512 (previous) (diff)

comment:2 by hey68you, 7 years ago

@X512 - re: security....

A few of points.

1) These functions are already available if you forward declare them in you app and link against libbe.

2) The tasks of minimiziing all apps and bringing your "dangerous" window to front is also already available through scripting (using the hey command in the shell or send programatically)

3) The user would always be able to press ctrl+alt+del to kill the "dangerous" app.

Regards.

comment:3 by axeld, 2 years ago

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.