jmuehlner commented on code in PR #383:
URL: https://github.com/apache/guacamole-server/pull/383#discussion_r892879469


##########
src/terminal/terminal.c:
##########
@@ -425,27 +416,19 @@ guac_terminal* guac_terminal_create(guac_client* client,
     term->clipboard = guac_common_clipboard_alloc();
     term->disable_copy = options->disable_copy;
 
-    /* Calculate character size */
-    int rows    = height / term->display->char_height;
-    int columns = available_width / term->display->char_width;
-
-    /* Keep height within predefined maximum */
-    if (rows > GUAC_TERMINAL_MAX_ROWS) {
-        rows = GUAC_TERMINAL_MAX_ROWS;
-        height = rows * term->display->char_height;
-    }
+    /* Set available screen area on the terminal */
+    int available_width, available_height, rows, columns;
+    get_available_dimensions(term, width, height, &available_width, 
&available_height, &columns, &rows);
 
-    /* Keep width within predefined maximum */
-    if (columns > GUAC_TERMINAL_MAX_COLUMNS) {
-        columns = GUAC_TERMINAL_MAX_COLUMNS;
-        available_width = columns * term->display->char_width;
-        width = available_width + GUAC_TERMINAL_SCROLLBAR_WIDTH;
-    }
+    /* Set size of available screen area */
+    term->outer_width = width;
+    term->outer_height = height;
 
     /* Set pixel size */
-    term->width = width;
-    term->height = height;
+    term->width = available_width;
+    term->height = available_height;
 
+    /* set rows and columns size */

Review Comment:
   Uppercase please



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to