Commit Graph

68 Commits

Author SHA1 Message Date
Armin Novak
b6b05e93a4 [xfreerdp] fix sending monitor layout PDU
only send it if there are more monitors available.
2022-11-22 15:30:31 +01:00
akallabeth
3023057b16 Cleaned up some loop code in xf_monitor
Use loop variables to make it more readable
2022-11-04 14:46:58 +01:00
Armin Novak
119b8d4474 Unified command line options to list something
There are various options to list smartcards, monitors, keyboard
settings. Unify them all under a single /list:<something> option
2022-10-19 20:31:53 +02:00
Armin Novak
b2df9207e4 Fixed #8054: multimonitor settings 2022-07-07 14:24:07 +00:00
akallabeth
962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
akallabeth
7641710f60 Use a client/common context component
* Allows moving common client code from specific client to a
  generic client/common implementation
2022-02-22 09:44:13 +01:00
Armin Novak
339cdded45 Fixed memory sanitizer warnings 2022-01-11 14:32:18 +01:00
akallabeth
c762aacb3c Fixed XRRGetMonitors leak in xfreerdp 2021-09-13 11:04:03 +02:00
Armin Novak
f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Armin Novak
35474abc24 Fixed setting of primary monitor 2021-07-29 15:09:53 +02:00
akallabeth
242f1734ec Fixed dpkg-buildpackage warnings 2021-06-30 11:57:23 +02:00
Norbert Federa
689cb70da2 client/x11: fix parent window size restrictions
If a parent window id is specified, the "workarea limits" of the
display must not apply.
2021-04-16 10:28:14 +02:00
Nathan Loewen
3ee0cc6b70 Make use of percent scale if available when calculating monitor sizes 2020-04-11 09:06:00 +02:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
7d7224abd8 Added missing check for monitor indices 2019-10-23 15:03:39 +02:00
Armin Novak
e009a62f06 Fixed sign-compare warnings 2019-04-05 09:14:35 +02:00
Armin Novak
2dab778101 Fixed NULL dereferences and uninitialized values 2019-01-30 16:11:10 +01:00
Armin Novak
5343f6931d Fixed monitor width and height checks. 2018-12-07 15:22:28 +01:00
Armin Novak
9633e4576d Fixed signedness of MoniorCount 2018-10-25 14:08:20 +02:00
akallabeth
305f5d1bd5
Merge pull request #4600 from andreesteve/xfullscreen
X11: Fix fullscreen toggle
2018-10-17 17:27:29 +02:00
rbarnett
41664572a5 MonitorLocalShiftX,Y should be set when 1st monitor from MonitorIds selected as primary 2018-09-21 13:40:48 -05:00
Andre Esteve
ab0bc2a7f5 X11: Fix fullscreen toggle
1. Fix fullscreen toggle for window managers that do not have multimonitor fullscreen extension support
2. Fix current monitor detection
3. Fix calculation of vscreen boundaries when single monitor is being used
4. Fix start up position of window when starting (used to always go to the top left corener, now centered)

Still a problem:

1. Window decorations do not show when going windowed
2. Smart resizing makes i3 really sad :(
3. Moving window across monitors and going fullscreen always maximizes on startup screen (when not using /multimon)
2018-05-05 18:24:23 -07:00
Armin Novak
065a924496 Fixed format string types. 2018-04-04 10:45:57 +02:00
Kai Harms
222bf9245e Fix /size: /w: /h: with /monitor: (Fix custom sizes)
Fix weird rectangle by removing checks
2018-03-29 07:12:53 +00:00
Armin Novak
7f75b57fd6 Fixed memory leak. 2018-01-22 16:17:37 +01:00
David Fort
58b5573c82 Use more xrandr attributes when available and preserve [desktop|device]ScaleFactor
Fix a too restrictive detection of XRandr support.
Set more monitor's attributes like physical size and orientation when XRandr is
available.
Set [desktop|device]ScaleFactor when it has been given on the command line, this
should fix #4324.
2017-12-23 13:46:42 +01:00
David Fort
80dab90f1a disp: implement dynamic resolution for X11
If the display channel is available we use it to allow the user to resize the
xfreerdp window. When the window is resized we announce a new monitor layout and
the server reacts by doing a reactivation sequence to the new size.
The minimum window size is limited to 300x300 as 2012 servers crash horribly
if we send them a smaller layout.
2017-12-14 15:13:11 +01:00
David Fort
11ee81be60 Fix XRandr for old systems and MacOSX
We need a recent enough version of XRandr to correctly detect monitor.
Also this patch adds some typo or style fixes.
2017-12-08 10:59:38 +01:00
David Fort
e064aa6a99 xfreerdp: when available use xrandr to get display infos 2017-11-29 10:38:48 +01:00
Kai Harms
e2c651bce4 FreeRDP multimonitor: Use first command line element, then primary, then fallback to 0,0 2017-11-07 10:11:29 +00:00
David Fort
46c7097a86 multimon: flag the primary monitor according to the /monitors option
The first monitor of the list is considered like the primary monitor.
2017-10-17 14:31:11 +02:00
Bernhard Miklautz
4592deee72 extend /size to allow width or height percentages (#4146)
If the size parameter is used with a percentages like /size:50% now
an additional 'w' or 'h' can be appended (like /size:50%w) to specify
where the percentage should be applied. If both or none are set the
behavior is like it was before and the percentage is applied to width
and height.
2017-09-25 09:35:49 +02:00
Armin Novak
b2c29158be Scanbuild warning, argument checks and leak fixes.
* Added Stream_GetRemainingCapacity to check remaining stream size
  before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak
c8a7065f93 Refactored xfContext. 2016-10-06 13:43:06 +02:00
Norbert Federa
48be0815c1 client/X11: multimon/fullscreen fixes
- fixed wrong calculation of xfc->fullscreenMonitors.[right|bottom]
- only use _NET_WM_FULLSCREEN_MONITORS if at least 2 monitors are involved
- call XMoveWindow before setting the _NET_WM_STATE_FULLSCREEN property
2015-11-04 15:01:31 +01:00
Norbert Federa
bad2f138c1 xfreerdp: FS fixes & smart-sizing resuscitation
- make smart-sizing work again which was killed in previous commits
- removed several unnecessary/ugly workarounds
- miscellaneous small fixes
- new feature: restore previous window position when toggling out of
  fullscreen mode
- new feature: if /f is specified in combination with /smart-sizing:WxH
  we run the session in the /smart-sizing dimensions scaled to full screen
2015-04-16 17:31:22 +02:00
Norbert Federa
98505a0234 xfreerdp: removed desktopWidth/desktopHeight vars
These were basically unused (from the contexts's point of view)
and only served as temporary storage
2015-04-16 17:31:22 +02:00
Norbert Federa
b3b8306724 xfreerdp: removed unused variables from xf_monitor 2015-04-16 17:31:22 +02:00
bjcollins
d4a9a2d3a8 Remove override redirect flag for fullscreen with keyboard grab enabled. Window manager should always know about the main window.
Small cleanup of passing around decorations flag.
Limit PercentScreen to single monitor vs. entire desktop. IMO - this is better behavior in a multimonitor environment.

Handle fullscreen windows better:
1. Ensure that size hints are set to allow resizing before setting a window to fullscreen as some window managers do not behave properly.
2. Handle fullscreen toggles without destroying and recreating window.
3. Use NET_WM_STATE_FULLSCREEN Extended Window Manager Hint for fullscreen functionality
4. Use the NET_WM_FULLSCREEN_MONITORS Extended Window Manager Hint when appropriate
5. When a single monitor fullscreen is requested - use the current monitor(as determined from mouse location)
6. Handle cases where there is no local monitor at coordinate 0,0. The Windows server expect there to be a monitor at this location, so we maintain offset if necessary between our local primary monitor and the server side primary monitor located at 0,0.
2015-02-23 11:22:28 -06:00
bjcollins
ee8d0a6440 Fix remote app in xfreerdp.
Remove use of the visibleOffset, this completely breaks the display of all windows except for the main application window. Instead,
just maintain a local offset correction of the windowOffset.

Apply workaround to determining the workArea for remote app mode.
2015-02-11 17:24:06 -06:00
Marc-André Moreau
9b9fbd2ab1 xfreerdp: fix fullscreen mode 2015-02-10 15:15:30 -05:00
Bernhard Miklautz
5d4de15401 xfreerdp: fix crash with /monitor-list
Catch the case when /monitor-list was used but the X display couldn't
be opened or wasn't available.
2015-01-16 00:10:36 +01:00
Armin Novak
7913a57bc5 Using wlog for logging in clients now. 2014-09-15 08:55:00 +02:00
Marc-André Moreau
1fc2d780f7 libfreerdp-core: fix memory leaks reported by valgrind 2013-10-31 23:35:24 -04:00
Armin Novak
2f20a8c12b Fixed various memory leaks and resource deallocation problems. 2013-08-19 17:44:52 +02:00
Marc-André Moreau
bb78fb16f8 xfreerdp: refactor to make use of single xfContext* and remove xfInfo* 2013-06-12 18:57:25 -04:00
Marc-André Moreau
7cf23aff02 xfreerdp: fix workarea option 2013-04-28 19:16:23 -04:00