Commit Graph

4283 Commits

Author SHA1 Message Date
Augustin Cavalier
14d690378f app_server/DelayedMessage: Delete scheduled on error.
CID 1422581.
2017-11-23 19:40:04 +01:00
Adrien Destugues
a61d30b83b Fix app_server build for brightness support
Thanks to Hy Che for noticing this!
2017-11-22 23:17:51 +01:00
Adrien Destugues
c247a73bea app_server: handle empty drag bitmap
An application is allowed to set an empty drag bitmap. In that
case, the offset from the cursor doesn't matter, because there
is nothing to draw anyway.

app_server would end up confused by the empty bitmap (which has
no bits) and invalid offset (it would try to allocate a 2^16
x 2^16 pixels bitmap to fit both the cursor and the empty
bitmap), and eventually it would crash.

Fixes #13577.
2017-11-22 13:54:12 +01:00
Michael Lotz
cec4fe2f85 app_server: Remove stubbed HTML5 HWInterface.
It was mostly a renamed copy of the remote HWInterface with
beginnings of a webserver and client. It never became actually
functional.
2017-11-21 23:31:44 +01:00
Michael Lotz
e30d37ddd6 RemoteHWInterface: Fix build with tracing disabled. 2017-11-21 22:23:16 +01:00
Michael Lotz
778469156a RemoteHWInterface: Add mechanism to retrieve the system palette.
This isn't used by the Haiku client as the palette is hardcoded.
2017-11-21 22:18:17 +01:00
Michael Lotz
4d9d6d7ee3 RemoteMessage: Guard against NULL source/target.
To make it more obvious in case it is ever used the wrong way.
2017-11-21 22:18:17 +01:00
Michael Lotz
703667a98d RemoteEventStream: Guard against unreasonably large input. 2017-11-21 22:18:17 +01:00
Michael Lotz
60882f20e1 RemoteDrawingEngine: Reduce RP_READ_BITMAP result timeout. 2017-11-21 22:18:17 +01:00
Michael Lotz
0863572d73 RemoteDrawingEngine: Whitespace cleanup and a simplification. 2017-11-21 22:18:17 +01:00
Michael Lotz
46f8876d27 RemoteMessage: Make some message parts fixed size.
So they don't differ across architectures.
2017-11-21 22:18:17 +01:00
Michael Lotz
ebf043b962 RemoteHWInterface: Fix 64 bit build with tracing enabled. 2017-11-21 22:18:17 +01:00
Michael Lotz
82873c6ece RemoteHWInterface: Fix lost drag bitmap on cursor change.
The drag bitmap was lost because the original, uncombined, cursor was
sent on cursor change.
2017-11-21 22:18:17 +01:00
Michael Lotz
4d9e21b824 Remote{Message|DrawingEngine}: Add some more debug output. 2017-11-21 22:18:17 +01:00
Michael Lotz
5fb27ee2c4 RemoteDrawingEngine: Implement StringWidth.
It doesn't actually seem to be called though.
2017-11-21 22:18:17 +01:00
Michael Lotz
df55bcf5a0 RemoteDrawingEngine: Fix position of gradient in FillShape.
It wasn't added at the end.
2017-11-21 22:18:17 +01:00
Michael Lotz
91c1d3dbb3 RemoteDesktop: Implement support for BAffineTransform.
It is currently somewhat broken client side though.
2017-11-21 22:18:17 +01:00
Michael Lotz
f609f4fa64 RemoteHWInterface: Use screen change listener to update mode.
This allows dynamic reconfiguration of the size of the virtual desktop
to the dimensions desired by the client.
2017-11-21 22:18:17 +01:00
Michael Lotz
f3e8ed4d48 app_server: Implement screen changed hooks and notifications.
The ScreenOwner interface gets an additional ScreenChanged() hook. It
is implemented in the Desktop class to automatically set the preferred
screen mode on the changed screen.

The HWInterfaceListener, previously only used by the downstream
DrawingEngine, gets an additional ScreenChanged() hook as well to inform
an upstream client of a changed screen.

The ScreenManager ties these two mechanisms together.
2017-11-21 22:18:17 +01:00
Michael Lotz
5ed41cffff RemoteDesktop: Switch connection direction and simplify client.
Instead of the server connecting back to a listening client, make it
into a more traditional setup with the server listening on a port and
the client connecting to it.

The client can now either connect directly, unencrypted and without the
ability to trigger listening and specifying a command, or through SSH,
as before with the possibilty to run a target application and causing
the creation of the listener.

With the direction change, there's only the need for one, local, port
forward with SSH, which simplifies things.
2017-11-21 22:18:17 +01:00
Adrien Destugues
3a2b67b5ae Support for configuring screen backlight
Accelerant interface:
Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is
a float in the 0..1 range.

App_server:
Forward brightness things between BScreen and the accelerant.

intel_extreme:
Implement the hooks. Note that this only works for laptop panels, but
the driver will pretend to support it in other cases as well.

Screen preferences:
If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set
brightness with a slider. Otherwise, the slidere is hidden and these
changes aren't visible.
2017-11-21 09:12:18 +01:00
Humdinger
16af9b4c61 Style, no functional changes
Make termination consistant with that last commit hrev51521.
As wished and proof-read by waddlesplash. Hope all's well...
2017-11-16 19:47:59 +01:00
Augustin Cavalier
69da4f60e8 input_server: Delete useless functions.
As far as I can tell, these functions were "added" because they appear
in a symbols dump from R5. Nothing calls them, they don't do anything,
and they do not appear in R5 headers.
2017-11-15 17:52:39 +01:00
Adrien Destugues
1beeb1b002 "thin" fonts are B_LIGHT_FACE
In Noto fonts, "thin" is another level of "light" apparently
(somewhere in between "extralight" and "medium"... lots of choice these days).

Tell app_server about it so the proper font flags can be set. This may
help avoid confusion, as Terminal (and FontDemo, in less predictable
ways) tend to pick the "thin" variant of fonts even when "regular" is
requested.
2017-10-08 21:41:15 +02:00
Jérôme Duval
7b03148203 package_daemon: hide the problem window when done with it.
* it will be shown again when needed.
* should fix #13716.
2017-09-26 22:31:23 +02:00
Brian Hill
a657e677d9 Notification preflet and server changes
Remove unneeded classes from preflet jamfile
Fix some notification layout and bold text issues
2017-09-24 14:49:25 -04:00
Brian Hill
6aa0587222 Notifications preflet and notification_server
Notifications preflet:
-Use sliders instead of text fields for width and timeout
-Remove icon size choice (mini icon looks horrible)
-Consolidate both "Enable" checkboxes into one
-Fix Revert button, remove Apply button, add Defaults button
-All changes to settings saved immediately
-Live example notification message shown when settings changes are made
-Add setting for individual apps to specify whether their notifications
	should be muted
-Remove history list (to be implemented later)

BNotification class:
-BNotification records the signature and name of application that
	created it
-New functions to get source application signature and name

Notification Server:
-Notification pop up view layout fixes and bold font size fix
-Remove notifications history from AppUsage class (will be saved in
	cache instead)
-Remove vector of NotificationView objects which isn't needed
-Get source application info from notification object, not the received
	message which is not reliable
2017-09-23 11:41:33 -04:00
Alexander von Gluck IV
1a472d01fd servers/app: html5/remote drawing 64-bit fixes
* Still doesn't seem to work anymore.
* Documentation: TARGET_SCREEN="html5:127.0.0.1:80" DeskCalc
2017-09-23 08:46:12 -05:00
Humdinger
06b345331b Re-add accidentally removed blank line
Removed in hrev51327, spotted by axeld. Thanks!
2017-08-02 08:56:55 +02:00
Humdinger
99e5e3fd08 Package daemon notifications
* Sentence casing
* Localize notification texts in the package kit
* Have "Package daemon" as group name and "Warning" as title
* Use ::BPrivate in Bitmap.h to solve an ambiguity (as pointed out
  by PulkoMandy). Though not needed for my changes any more, since
  a the icon of the notifying app is now shown by default.

Fixes #13590.
2017-07-31 19:09:38 +02:00
Dale Cieslak
061b9eeccf Memory leaks and locking issues in GetUnicodeBlocks and IncludesUnicodeBlock
- GetTransformedFace *must* be paired with PutTransformedFace otherwise
the font style never gets unlocked.
- Also use FcCharSetDestroy when done with a fontconfig charset to
prevent leaked memory.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

ticket: #13526
2017-07-02 08:38:58 +02:00
Augustin Cavalier
8108c0dc3f mail_daemon: Delete old READMEs. 2017-06-30 19:48:59 -04:00
Sergey Avilov
a5fb17bc65 package_daemon: fix an issue with package overwrite
When overwriting a package the sequence is: remove old, add new package.
On remove we add package to ToBeDeactivated set. This is ok.
On adding new package there is a check if package exists or not. On true
return. But package still in ToBeDeactivated set.

Fixes #10038

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-06-29 16:45:21 -04:00
Sergey Avilov
d70f22ac30 package_daemon: fix crash on system update
We can't delete old volume state while it's still active and can be
accessed until reboot.

Fixes #10898

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-06-29 16:37:54 -04:00
Dale Cieslak
33c9787d10 Fixes #13526 so that BFont::Blocks properly set bitmask for Unicode blocks in a font.
ParseFcMap had several logic errors.
- fixed variable being initialized in the wrong part of the loops
- fixed problem of ANDing bit with 0x8 instead of 0x1
- changed some variable names; 'foundStartBlock' implies a boolean but
it is a block number, so it is now just 'startBlock'
- added const BITS_PER_BLOCK for magic number 32
- added short-circuit for empty full or partial blocks
- initialized variables to -1 when 0 is a valid value
- added code to handle when the end of a block is reached and a range
was started but never finished.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13526
2017-05-22 20:53:12 +02:00
dsizzle
9b6b158b88 Implementation of BFont::Blocks
BFont::Blocks is now implemented in ServerFont, via a call through the
app_server.  It uses fontconfig to iterate through a charset of a font
and stores the defined blocks in a bitmap.

A new API was added, BFont::IncludesBlock, that will allow for arbitrary
testing of a given Unicode block. Since nothing is cached, searching
through an entire charset for a series of Unicode blocks can be quite
slow. In a given block there may be only 1 or 2 characters actually
defined so every character within a block needs to be checked until one
is found, which in a degenerate case will mean the entire block is
checked.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-05-08 22:17:53 +02:00
Adrien Destugues
fd8d1d5656 launch_daemon: fix check for existing directory
BEntry.InitCheck returns B_OK even if the leaf does not exist. So the
code in launch daemon to create directories (/tmp and
/var/shared_memory) was never run.

Fixes #12760.
2017-04-10 21:56:31 +02:00
Axel Dörfler
bc600adbd8 launch_daemon: Don't allow restarting.
* Check if the port already exists on startup. This fixes #12901.
2017-04-07 18:01:14 +02:00
Brian Hill
b105213b81 SoftwareUpdater improvements
*Bug fix- list item colors use Appearance settings
*Problem Solver window buttons right aligned, window now app modal
*The main window's stripe and icon now use the same scaling as BAlert
*A pop-up menu displays an option to view more details (replaces the
	tooltips)
*New prompt at application start to choose between doing an Update or
	a Full Sync.  Also lays the ground work for implimenting silent
	check-only feature.
2017-04-01 12:40:39 -04:00
Fredrik Holmqvist
f1361497b0 Revert min / max change and set timeout_t nice way
Mixing up seconds and micro-seconds made me do it.
2017-03-25 15:00:55 +01:00
Fredrik Holmqvist
3bbff30d9e DHCP initial timeout 0.25s from 4s
Connecting to wifi is very slow, there are several issues.
Easiest to find and fis is that on my wifi DHCP always took
4s, as first request fails. Still investigating why..
Reducing timeout to 0.25s makes DHCP process fast.

Moved timout handling into its own struct, and changed state
timeout from max(remaing, 60s) to min(remaining, MAX_TIMEOUT)
Not sure about that change, but why would you want a max value
that is at least 60s?
2017-03-25 13:42:08 +01:00
Brian Hill
a652a5fed3 Reorder fallback fonts. Fixes #13389
Put the Noto Sans Symbols font last in the list of fallback fonts.
2017-03-21 18:57:53 -04:00
Brian Hill
93b87bac1f Add Noto Sans Symbols as a fallback font
Haiku should be able to display more symbol characters now with this
as a fallback font.
2017-03-16 18:10:18 -04:00
Adrien Destugues
34fbc56b3f Complete the transition to Noto as the default font.
- Both Noto and Noto Sans CJK JP are now used as font fallbacks,
  allowing to cover a rather large range of characters. This also makes
  it possible to mix the two fonts easily.
- Remove VL-Gothic from packages and from AboutSystem
- Add Noto fonts to the dependencies of the Haiku package.

This provides a similar look for all languages as discussed on the
mailing list.
2017-03-05 12:58:17 +01:00
Augustin Cavalier
7abafe9f3f Revert "Revert "Switch from DejaVu to Noto font""
This reverts commit 2423ba8470.
2017-02-19 12:09:33 -05:00
Augustin Cavalier
2423ba8470 Revert "Switch from DejaVu to Noto font"
This reverts commit 945566ff43.

As discussed on the mailing lists and with Humdinger off-list:
 * The general design concensus tends slightly towards DejaVu, as metrics
   of DejaVu look much better (DejaVu 12 and Noto 13 are roughly the same size,
   but Noto has much wider margins with that)
 * While Noto does have a wider set of fonts with support for lots of
   different languages, DejaVu actually has built-in support for more
   Unicode languages (the default Noto has, as far as I can tell, only
   Latin/Greek/Cyrillic [2416 glyphs], while DejaVu also has Armenian, Georgian,
   and a few other scripts too [5119 glyphs].)
 * The worse rendering of DejaVu appears to have been somewhat rectified by
   disabling the average-based subpixel filter in app_server.
2017-02-18 14:36:36 -05:00
Humdinger
cf0ba058ec Add localization to package daemon and solver
Thanks to Adrien and Rene for reviewing and guidance.
Fixes #13282.
2017-02-11 10:56:27 +01:00
Augustin Cavalier
b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
Augustin Cavalier
ae0dad00b7 app_server: Remove erroenous comment as per Julian's review. 2017-02-04 16:06:53 -05:00
Augustin Cavalier
d10e64f851 app_server: Enable the RGB subpixel rendering codepath.
This change will have no effect if your FreeType was compiled without subpixel
rendering support, but since FreeType is now binary compatible between versions
with and without subpixel rendering, all you have to do after this change
is to recompile and reinstall FreeType.
2017-02-02 19:55:56 -05:00